# If $A$ is a singular square matrix, then $Ax = b \neq \vec{0}$ has $0$ or many solutions

https://www.math.ohiou.edu/courses/math3600/lecture10.pdf

and it tells you that

if $A$ is a singular square matrix, then $Ax = b \neq \vec{0}$ has $0$ or many solutions.

My question is: when does it have $0$ and when it has many solutions? In other words, how does $b$ influence the number of solutions for this linear system of equations in this case?

Note, I'm not asking why such a system of equations doesn't have a unique solution.

• If $b\in \mathcal R(A)$, then the equation has infinitely many solution, else there's no solution. – BigbearZzz May 1 '16 at 13:08
• I don't get your question. What do you mean with $b$ influencing the number of solutions? Can you give an example of an answer you might expect (even if it is wrong)? – Git Gud May 1 '16 at 13:12
• @GitGud I suppose that he was referring to the situation where $b$ is (or isn't) in the range of $A$, a singular matrix. – BigbearZzz May 1 '16 at 13:19

The system of equation $$Ax=b$$ has solutions if and only if $$\operatorname{rank}(A)=\operatorname{rank}(Ab)$$ (the augmented matrix).
If so, the set of solutions is an affine subspace with codimension $$r=\operatorname{rank}(A)$$.