Well, this is "by design". It might not be the behaviour you are after, of course.

To get the behaviour you need, the solution is to explicitly tell Maxima to use non-commutative multiplication inside matrix products. The relevant flag is `matrix_element_mult`

:

(%i19) amat:matrix([a_1,b_1]); (%o19) [ a_1 b_1 ] (%i20) bmat:matrix([b_1],[-a_1]); [ b_1 ] (%o20) [ ] [ - a_1 ] (%i21) ldisp([amat,bmat,amat.bmat]), matrix_element_mult="."; [ b_1 ] (%t21) [[ a_1 b_1 ], [ ], a_1 . b_1 - b_1 . a_1] [ - a_1 ] (%o21) [%t21] (%i22) ldisp([amat,bmat,amat.bmat]), matrix_element_mult="*"; [ b_1 ] (%t22) [[ a_1 b_1 ], [ ], 0] [ - a_1 ] (%o22) [%t22]

The default behaviour is `matrix_element_mult = "*"`

, which gave the zero you didn't want.

I agree that it feels slightly clunky to have to tell Maxima how to do multiplication. I guess another option for you would be to permanently bind `matrix_element_mult`

to "." and then to explicitly declare things scalar. I haven't checked, but I think that should work. (It sounds like it would quickly get very annoying though!)

Anyway, I'm closing this bug, because I think it's a case of the design not being quite what you were expecting, rather than an implementation bug. Obviously, feel free to re-open and explain what I've misunderstood about the report if I'm wrong.