When I compute the determinant analytically in Mathematica, I do it with

Det[{{a, b}, {c, d}}]

which gives the output

-b c + a d

I would like to see this formula even if the determinant is zero as

Det[{{a, b}, {-a, -b}}]

which yields the output


instead of something like

-b (-a) + a (-b)

This is just a small example, but my matrices are a little larger, and I need to figure out analytically why some determinants are zero and some are not.

Any ideas?


2 Answers 2


One possibility is to temporarily inactivate the arithmetic operators, like so:

Block[{Times = Inactive[Times], Plus = Inactive[Plus]}, 
      Det[{{a, b}, {-a, -b}}]]

You could try:

m = {{a, b}, {-a, -b}};

Det[Map[ToBoxes, m, {2}]] // DisplayForm
(* -b (-a)+a (-b) *)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.