# Finding basis for the space spanned by some vectors.

Find a subset of vectors $\{v_1, v_2, v_3, v_4, v_5\}$ that forms the basis for the space spanned by these vectors: $$v1=\left ( \begin{array}{c} 1\\-2\\0\\3 \end{array}\right), v2= \left ( \begin{array}{c} 2\\-5\\-3\\6\end{array}\right)\, ,\, v3=\left ( \begin{array}{c}1\\-1\\3\\1\end{array} \right)\, ,\, v4=\left(\begin{array}{c} 2\\-1\\4\\-7\end{array} \right )\, ,\, v5=\left (\begin{array}{c}3\\2\\14\\-17\end{array} \right).$$

• Take as many vectors as you can while remaining linearly independent. This is your basis and the number of vectors you picked is the dimension of your subspace. – oldrinb Sep 24 '13 at 20:57
• As, at most 4 vectors among these can be linearly independent, Do I need to proceed through combinatorial approach? Or is there any particular procedure to solve this problem? – Shakib Ahmed Sep 24 '13 at 20:59

You don't need to guess; just write down the matrix having the vectors as columns: $$\begin{bmatrix} 1 & 2 & 1 & 2 & 3 \\ -2 & -5 & -1 & -1 & 2 \\ 0 & -3 & 3 & 4 & 14 \\ 3 & 6 & 1 & -7 & -17 \end{bmatrix}$$ and proceed with Gaussian elimination; first do $R_2+2R_1$ (sum to the second row the first multiplied by $2$) and then $R_4+(-3)R_1$ to get $$\begin{bmatrix} 1 & 2 & 1 & 2 & 3 \\ 0 & -1 & 1 & 3 & 8 \\ 0 & -3 & 3 & 4 & 14 \\ 0 & 0 & -2 & -13 & -24 \end{bmatrix}$$ I usually do pivot reduction, so multiply the second row by $-1$ and then do $R_3+3R_2$ to get $$\begin{bmatrix} 1 & 2 & 1 & 2 & 3 \\ 0 & 1 & -1 & -3 & -8 \\ 0 & 0 & 0 & -5 & -10 \\ 0 & 0 & -2 & -13 & -24 \end{bmatrix}$$ Now swap the third and fourth rows; if you also do pivot reduction you get
$$\begin{bmatrix} 1 & 2 & 1 & 2 & 3 \\ 0 & 1 & -1 & -3 & -8 \\ 0 & 0 & 1 & 13/2 & 12 \\ 0 & 0 & 0 & 1 & 2 \\ \end{bmatrix}$$
Since we have pivots in the first four columns, we conclude that $v_1, v_2, v_3, v_4$ span your subspace. But, of course, since the dimension of the subspace is $4$, it is the whole $\mathbb{R}^4$, so any basis of the space would do.
These computations are surely easier than computing the determinant of a $4\times 4$ matrix. Note that if the dimension of the subspace were less than $4$, computing a determinant built with any set of four vectors would lead to nothing, while the elimination always works.
We know the dimension of the space is at most $4$. So, let's guess $v_1,v_2,v_3,v_4$ form a basis of the space. To verify that this guess is correct, it is sufficient to check that $$\det\begin{bmatrix} 1 & -2 & 0 & 3 \\ 2 & -5 & -3 & 6 \\ 1 & -1 & 3 & 1 \\ 2 & -1 & 4 & -7 \\ \end{bmatrix} \neq 0.$$ If this turns out to be true, since the matrix has non-zero determinant, the rows are linearly independent and thus span a $4$-dimensional space (which must be the whole space).