# Determining whether a set of vectors spans $\mathbb{R^n}$

In this post, I will list the specific problem that has caused me to ask this question, and then generalize it.

Let $T_A$ be the matrix operator, denoting multiplication by matrix $A$. Thus we define $T_A:\mathbb{R^3}\rightarrow\mathbb{R^2}$, multiplication by matrix $A$. If $\vec{u_1}=(0,1,1), \vec{u_2}=(2,-1,1),$ and $\vec{u_3}=(1,1,-2)$ and if $A=\begin{pmatrix} 1&1&0\\ 0&1&-1\\ \end{pmatrix}$, then does the set $\lbrace T_A(\vec{u_1}),T_A(\vec{u_2}), T_A(\vec{u_3})\rbrace$ span $\mathbb{R^2}$?

I begin by noting $T_A(\vec{u_1})=(1,0)$, $T_A(\vec{u_2})=(1,-2)$, and $T_A(\vec{u_3})=(2,3)$.

To test if a set of vectors span a space, we check to see if any arbitrary vector in the space can be written as a linear combination of our supposed spanning vector set, more specifically: we can find, given any vector $\vec{b}$, real numbers $a,b,c$ such that the system below is satisfied. $$\vec{b}=a(T_A(\vec{u_1}))+b(T_A(\vec{u_2}))+c(T_A(\vec{u_3}))$$ The task of solving this question can be tackled by finding the determinant of the coefficient matrix of the system formed by taking the individual vectors of the spanning set as column vectors in a coefficient matrix. However, this problem yields a coefficient matrix \begin{pmatrix} 1&1&2\\ 0&-2&3\\ \end{pmatrix}

which does not have a defined determinant.

So I formed the three distinct matrices ($2\times2$) that are made up of the combinations of the vectors in the supposed spanning set and asked if each of the coefficient matrices had a nonzero determinant i.e.

Do $\begin{pmatrix} 1&1\\ 0&-2\\ \end{pmatrix}, \begin{pmatrix} 1&2\\ 0&3\\ \end{pmatrix}, \begin{pmatrix} 1&2\\ -2&3\\ \end{pmatrix}$ have nonzero determinants?

It turns out they do, so I say that the set $\lbrace T_A(\vec{u_1}),T_A(\vec{u_2}), T_A(\vec{u_3})\rbrace$ spans $\mathbb{R^2}$. Is this reasoning correct?

Let me generalize my question. If I have more than $n$ vectors with $n$ entries in my supposed spanning set of $\mathbb{R^n}$, can I still use the determinant to determine if this set of vectors spans my space by taking all possible combinations of vectors that give me a square coefficient matrix and seeing if all matrices have a nonzero determinant?

Note that if $S$ spans ${\Bbb R}^n$ then so does any set containing $S$. (If you are not familiar with this, it is easy to prove - please try it.)

So, given more than $n$ vectors in ${\Bbb R}^n$, you can take all possible selections of $n$ vectors and find the determinants of the corresponding (square) matrices. If any one of these determinants is non-zero then the corresponding $n$ vectors form a spanning set, and so does your whole set.

Conversely, if you have a spanning set for ${\Bbb R}^n$, some $n$-vector subset is a basis (any spanning set contains a basis), so some determinant is non-zero.

In practice, you could compute these determinants one at a time, and as soon as you get a non-zero result, you know that you have a spanning set. Example: take the vectors $\def\mv#1{{\bf v}_{#1}}\mv1=(1,2)$, $\mv2=(2,4)$, $\mv3=(2,1)$. Then $$\det\pmatrix{1&2\cr2&4\cr}=0$$ so $\{\mv1,\mv2\}$ is not a spanning set. Next, $$\det\pmatrix{1&2\cr2&1\cr}\ne0\ ,$$ so $\{\mv1,\mv3\}$ is a spanning set, so $\{\mv1,\mv2,\mv3\}$ is a spanning set. No need to try $\{\mv2,\mv3\}$.

Yes the method by determinants is correct and it suffices to find at least one sub-matrix n-by-n with $\det \neq 0$.

Note also that the column (and row) vectors of that matrix (or matrices) form a basis for $\mathbb{R}^n$.

Note also that if r-by-r is the maximum order we can find for a sub-matrix such that $\det \neq 0$, then $r$ is equal to the rank of the matrix.

• So you're saying that I don't have to ask if all three distinct matrices have a nonzero determinant, I just have to ask if there exists a single matrix with a nonzero determinant? – coreyman317 Apr 9 '18 at 6:50
• @coreyman317 Yes of course, think to the identity matrix with a column (1,0,...,0) added. – gimusi Apr 9 '18 at 6:52
• Ah I see. Thanks @gimusi you've been a great help these last few days! – coreyman317 Apr 9 '18 at 6:53
• @coreyman317 You are welcome! I'm happy for that. Bye – gimusi Apr 9 '18 at 6:55