I have a matrix M = {{0,1,b},{a,0,1},{1,c,0}}.

For my work, I need to assume that $M$ is singular, i.e. $abc+1=0$. The issue is that I am trying to work out NullSpace[M], it assumes that the determinant is nonzero. I have tried using Refine, but it seems to make no difference, even if I add Assumptions -> {a==1,b==-1,c==1}. Any ideas on how I can make Mathematica interpret the matrix as singular?

  • $\begingroup$ Can you just replace c with -1/(a b)? $\endgroup$
    – evanb
    Feb 9 at 12:57
  • $\begingroup$ That makes sense, thanks. I guess I kept thinking that I'd see $a,b,c$ in the final expression that I didn't even think of replacing them. Thanks! $\endgroup$
    – Jacques
    Feb 9 at 13:11

1 Answer 1


Create an explicit matrix-times-vector equation, with extra conditions that the vector not vanish and the determinant vanish.

mat = {{0, 1, b}, {a, 0, 1}, {1, c, 0}};
vec = Array[x, Length[mat]];
Solve[Flatten[{Det[mat], mat . vec, vec[[1]] - 1}] == 0, vec, 
 MaxExtraConditions -> Infinity]

(* Out[183]= {{x[1] -> ConditionalExpression[1, 1 + a b c == 0], 
  x[2] -> ConditionalExpression[a b, 1 + a b c == 0], 
  x[3] -> ConditionalExpression[-a, 1 + a b c == 0]}} *)

Here I forced the first vector component to be 1. In cases where it has to vanish this won't work, but one could do similar but setting a random linear combination of the vector components to 1.


Your Answer

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

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