# A set of n vectors spans $\mathbb R^{n}$ if and only if the determinant of the matrix they form is nonzero?

A set of $n$ vectors spans $\mathbb R^{n}$ if and only if the determinant of the matrix they form is nonzero?

I get why it's true in one direction; that if the determinant of the matrix is nonzero, it spans $\mathbb R^ {n}$ -- because of the fact that if the determinant of a matrix A is 0, then Ax = b has a unique solution for every b.

But if the determinant of the matrix is zero, it doesn't mean that there is no solution for every b, it just means that there isn't a unique solution for every b, correct? So couldn't there be an infinite amount of solutions for every b, or a unique solution for some values of b and an infinite amount for others, in which case the set of vectors would, in fact, span $\mathbb R^{n}$? Maybe I'm thinking about this wrong. I tried looking at a similar question on here, but the answers talked about basis, which isn't something my book covers until the next section.

• No unique solution to $Ax=b$ for some particular $b$ $\implies$ nontrivial nullspace of $A$ $\implies$ no unique solution for any vector $b$ – user137731 Dec 4 '16 at 3:53
• some vectors can be made infinitely many ways, others can't be made at all... – imranfat Dec 4 '16 at 3:55
• I'm not sure how you arrived at no unique solution for any vector b; I haven't learned about nontrivial nullspace...Also, even if I accept that that's true, couldn't there still be an infinite amount of solutions for every vector b? – dagny Dec 4 '16 at 4:00
• @dagny I am confused - how can you have covered Gaussian elimination but not pivots? They are a central concept to understand elimination. Maybe you call them with a different name? How do you call the positions of the "steps" in the echelon form? – Federico Poloni Dec 5 '16 at 23:31
• @dagny Indeed, those leading ones are called pivots in the rest of the world. :) – Federico Poloni Dec 6 '16 at 14:55

There are a number of ways to prove this. Here's an algebraic approach:

Let $A$ be an $n \times n$ matrix of determinant $0$. Let $B$ be this matrix in row echelon form. We can write $B = E_1E_2 \cdots E_nA$, where the $E_k$'s are elementary matrices corresponding to the various row operations that put $A$ into row-echelon form. Bearing in mind that determinant is multiplicative, we can take the determinant of both sides above to get: $$\det(B) = \det(E_1E_2 \cdots E_nA) = \det(E_1)\det(E_2) \cdots \det(E_n)\det(A) = 0$$

$B$ is an upper triangular matrix, so its determinant is given by the product of its diagonal entries. Since $\det(B) = 0$ and it is a square matrix in row echelon form, it is forced that at least one row of $B$ is a row of zeros. This tells us that a nontrivial linear combination of rows of $A$ yields the zero vector. Therefore, the $n$ row vectors of $A$ cannot be linearly independent $\implies$ they do not span $\mathbb{R}^n$.

• "Therefore, the n row vectors of A cannot be linearly independent ⟹ they do not span Rn" I thought a set of linearly dependent vectors could still span Rn? – dagny Dec 4 '16 at 4:22
• Sure @dagny, but it'd need to be more than $n$ of them. If a set of $n$ dependent vectors spanned $\mathbb{R}^n$, then you could find a linearly independent subset of them that would still span $\mathbb{R}^n$. But $\mathbb{R}^n$ is of dimension $n$, meaning the smallest possible spanning set of vectors for the space has $n$ elements. – Kaj Hansen Dec 4 '16 at 4:37
• Ohh, that makes sense. – dagny Dec 4 '16 at 4:51
• Okay, so using R^2 as an example, am I now correct in thinking that the only situations in which a set of vectors wouldn't span R^2 are if 1) all the vectors in the set lie in the same line, or 2) there are less than 2 vectors in the set? I didn't really have that understanding before...I'm only just getting used to concept of spanning. So that makes things a lot clearer. Correct me if I'm wrong though. – dagny Dec 4 '16 at 5:17
• That's correct! On the other hand, if you have two vectors that do not lie on the same line, they span all of $\mathbb{R}^2$. – Kaj Hansen Dec 4 '16 at 9:08

You say that you have seen the general solution of a linear system using free variables. You have probably seen that to solve a linear system you should apply Gaussian elimination operations on the rows of the matrix $A$, and then repeat them on the entries of $b$ (or apply them to the matrix $[A\,\, b]$, which is effectively the same), producing respectively $R$ and $f$. The set of solutions of $Rx=f$ is the same as the set of solutions of $Ax=b$.

If a matrix is square and singular, then this procedure produces a zero row (or more) at the bottom of $R$ (this is how you have defined "singular", I guess?). There are some choices of the starting vector $b$ that produce a zero in the last position of $f$; for instance, $b=0$. There are some choices of $b$ that produce a nonzero in the last position of $f$; for instance, if no row exchanges are required for Gaussian elimination, you can take $b=\begin{bmatrix}0\\0\\\vdots\\0\\1\end{bmatrix}$.

These correspond, respectively, to a system with an infinite number of solutions and a system with no solutions (by the general solution algorithm). So we have proved that for each square singular $A$ there are choices of $b$ that produce an infinite number of solutions and some that produce no solutions.