# System of linear equations: When are we guaranteed a unique solution?

I was reading about systems of linear equations. Even if we have the same number of unknowns and equations, we may still have infinitely many or no solutions. But if in addition to that the determinant of the matrix of coefficients does not vanish, then does it necessarily imply that we have a unique solution?

Surprisingly or not, I haven't found an answer to the above question.

kent davidge
For the system $Ax = b$ with $A\in\mathrm{Mat}_{m, n}(K)$, there are $n-\mathrm{rank}(A)$ free variables. If $K=\mathbb R$ (or any other infinite field), then having at least one variable free means there are infinitely many solutions. Also, a solution can be unique only if the matrix $A$ is a square matrix (i.e only if number of variables = number of equations).

Of course, if the underlying field is finite, there can't be infinitely many solutions. That's something a lot of my students get wrong. They remember from school that if number of eqs is smaller than number of variables, then there are automatically infinitely many solutions. Not necessarily.

Last edited:
kent davidge and StoneTemplePython
mathwonk
Good point. The system $Ax=b$ has a solution if and only if $\mathrm{rank}(A) = \mathrm{rank}(A|b)$ by Kronecker-Capelli.