# Find a basis of a subspace $S=\{(x_1,x_2,x_3,x_4,x_5)\in\mathbb{R^5}|x_1=x_3=x_5,x_2-x_4=2x_1-x_3\}$

Let $S=\{(x_1,x_2,x_3,x_4,x_5)\in\mathbb{R^5}|x_1=x_3=x_5,x_2-x_4=2x_1-x_3\}$ is a subspace of $\mathbb{R^5}$. Find a basis of $S$. Expand a basis to a basis of $\mathbb{R^5}$.

Question: How to find a basis and dimension of $(x_1,x_2,x_3,x_4,x_5)\in\mathbb{R^5}$ without first expanding a basis?

One of the vectors that satisfies given condition is $(1,1,1,0,1)\Rightarrow$ $$\begin{pmatrix} 1 & 1 & 1 & 0 & 1 \\ \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \\ x_3\\ x_4\\ x_5\\ \end{pmatrix}=0\Rightarrow x_1=-(x_2+x_3+0x_4+x_5)=0$$ $1)$ Setting $x_2=1,x_3=x_4=x_5=0\Rightarrow x_1=-1\Rightarrow\begin{pmatrix} -1 \\ 1 \\ 0\\ 0\\ 0\\ \end{pmatrix}$

$2) x_3=1,x_2=x_4=x_5=0\Rightarrow x_1=-1\Rightarrow \begin{pmatrix} -1 \\ 0 \\ 1\\ 0\\ 0\\ \end{pmatrix}$

$3) x_4=1,x_2=x_3=x_5=0\Rightarrow x_1=0\Rightarrow \begin{pmatrix} 0 \\ 0 \\ 0\\ 1\\ 0\\ \end{pmatrix}$

$4) x_5=1,x_2=x_3=x_4=0\Rightarrow x_1=-1\Rightarrow \begin{pmatrix} -1 \\ 0 \\ 0\\ 0\\ 1\\ \end{pmatrix}$

A basis after expansion is $\left\{\begin{pmatrix} 1 \\ 1 \\ 1\\ 0\\ 1\\ \end{pmatrix},\begin{pmatrix} -1 \\ 1 \\ 0\\ 0\\ 0\\ \end{pmatrix},\begin{pmatrix} -1 \\ 0 \\ 1\\ 0\\ 0\\ \end{pmatrix},\begin{pmatrix} 0 \\ 0 \\ 0\\ 1\\ 0\\ \end{pmatrix},\begin{pmatrix} -1 \\ 0 \\ 0\\ 0\\ 1\\ \end{pmatrix}\right\}$

• Your "basis" is wrong: $(0,0,0,1,0)$ is not in your subspace. – YoTengoUnLCD Jan 18 '16 at 20:15

This is a system of equations. You have three independent equations and $5$ variables, so the solution is 2-dimensional. More formally, the kernel of the linear map given by the matrix $$A=\begin{pmatrix} 1 & 0 & -1 & 0 & 0\\ 1 & 0 & 0 & 0 & -1\\ 2 & -1 & -1 & 1 & 0 \end{pmatrix}$$ is $5-\mathrm{rank}(A)=5-3=2$.
This is not right. Since, notice that if you pick values for $x_1$ and $x_2$, then the values of the remaining variables are determined by the equations. So, $x_1$ and $x_2$ are independent. Hence a basis is $$\left\{\begin{pmatrix}1 \\0\\1\\-1\\1\end{pmatrix},\begin{pmatrix}0\\1\\0\\1\\0\end{pmatrix}\right\}.$$
Notice the choice of $x_1=1,x_2=0$ and $x_1=0,x_2=1$.