# Find the dimension of the subspace of $\mathbb{R}^4$ spanned by $x_1= (1, 2, -1, 0)$, $x_2=(2, 5, -3, 2)$, $x_3=(2, 4, -2, 0)$, $x_4=(3, 8, -5, 4)$

Find the dimension of the subspace of $$\mathbb{R}^4$$ spanned by the vectors $$x_1= \begin{bmatrix} 1 & 2 & -1& 0 \end{bmatrix}^T, \qquad x_2= \begin{bmatrix} 2 & 5 & -3& 2 \end{bmatrix}^T$$ $$x_3= \begin{bmatrix} 2 & 4 & -2& 0 \end{bmatrix}^T, \quad \text{and} \quad x_4= \begin{bmatrix} 3 & 8 & -5& 4 \end{bmatrix}^T.$$

The answer The subspace $$Span(x_1,x_2,x_3,x_4)$$ is the same as the column space of the matrix $$X = \begin{pmatrix} 1 & 2 & 2 & 3 \\ 2 & 5 & 4 & 8 \\ -1 & -3 & -2 & -5 \\ 0 & 2 & 0 & 4 \end{pmatrix}$$ The row echelon form of X is $$\begin{pmatrix} 1 & 2 & 2 & 3 \\ 0 & 1 & 0 & 2 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix}$$ The first two columns x1,x2 of X will form a basis for the column space of X. Thus, dim $$Span(x_1 , x_2 ,x_3 ,x_4)=2$$

My question I know how to reduce the row echelon form of X, but I have no idea how to know which coloums form a basis a column space and why not use row space?

• When reducing X to row echelon form, the number of non-zero columns is equal to the rank of X, aka the dimension of the subspace spanned by it's column vectors, because they are linearly independent. Since for quadratic matrices the row and column space dimensions are always equal, it's probably just a choice to use columns instead of rows. – Viktor Glombik Jan 6 at 9:11
• @Viktor Glombik Thanks! But how can I know which columns form a basis for the column space or which rows form a basis for the row space? – Shadow Z Jan 6 at 9:15
• The row reduced matrix only has two rows, which are non-trivial i.e. non zero. The zero vectors won't form a basis. The other two are linearly independent, therefore form a basis. – Viktor Glombik Jan 6 at 9:17
• @ViktorGlombik Notice that the OP has used row transformations in a matrix where the original vectors were written column-wise, mixing up the co-ordinates. The basis vectors can't be determined from $REF(X);CEF(X)$ is needed for that. – Shubham Johri Jan 6 at 10:59
• @ShubhamJohri You are mistaken: a basis for the column space can be determined from the row-reduced matrix. Although it can’t be read directly from the row-reduced form as it can for the row space, the columns of the original matrix that correspond to pivot columns in the row-reduced matrix form a basis for the column space. – amd Jan 6 at 21:20

The dimension of the subspace $$S$$ of $$\Bbb R^4$$ is the column rank of the matrix

$$X=\begin{bmatrix}\color{blue}1&\color{red}2&\color{green}2&\color{brown}3\\ \color{blue}2&\color{red}5&\color{green}4&\color{brown}8\\ \color{blue}{-1}&\color{red}{-3}&\color{green}{-2}&\color{brown}{-5}\\ \color{blue}0&\color{red}{2}&\color{green}0&\color{brown}4 \end{bmatrix}$$

since you have written the spanning vectors as the column vectors of the matrix and it is the column rank that gives the number of linearly independent column vectors. The column rank is found by using column transformations to obtain the column echelon form of $$X$$.

The dimension of the subspace $$S$$ of $$\Bbb R^4$$ is also the row rank of the matrix

$$X'=\begin{bmatrix}\color{blue}1&\color{blue}2&\color{blue}{-1}&\color{blue}0\\ \color{red}2&\color{red}5&\color{red}{-3}&\color{red}2\\ \color{green}2&\color{green}4&\color{green}{-2}&\color{green}0\\ \color{brown}3&\color{brown}8&\color{brown}{-5}&\color{brown}4 \end{bmatrix}$$

where the spanning vectors have been written as row vectors of the matrix and the row rank gives the number of linearly dependent row vectors. The row rank is found by using row transformations to obtain the row echelon form of $$X'$$.

You have made use of the useful property that the row rank and column rank of a matrix are identical. This means you can alternatively obtain the row echelon form of $$X$$, as you have done, or the column echelon form of $$X'$$.

Edit. As mentioned in a useful comment, the basis of the column space of $$X$$ consists of the column vectors of $$X$$ corresponding to the pivot columns in $$REF(X)$$. In your case, it is the first two columns, giving the basis as $$\{(1,2,-1,0),(2,5,-3,2)\}$$. To see why, note that if you remove the last two columns of $$X$$, it will still have rank $$2$$, meaning that the first $$2$$ columns are independent. Adding the third/fourth column will not change the rank.

The given vectors are the columns of $$A = \left[\begin{array}{rrrr} 1 & 2 & 2 & 3 \\ 2 & 5 & 4 & 8 \\ -1 & -3 & -2 & -5 \\ 0 & 2 & 0 & 4 \end{array}\right]$$ The reduced row echelon form of $$A$$ is $$\operatorname{rref}(A)=\left[\begin{array}{rrrr} 1 & 0 & 2 & -1 \\ 0 & 1 & 0 & 2 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{array}\right]$$ The first two columns of $$\operatorname{rref}(A)$$ are the pivot columns. This means that the first two columns of $$A$$ form a basis of $$\operatorname{Col}(A)$$.

Additionally, the nonzero rows of $$\operatorname{rref}(A^\top)$$ form a basis of $$\operatorname{Col}(A)$$.