# Find a basis for subspace

Let $$W = \left[ \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{pmatrix} \in R^4\mid x_1+x_3=x_4 \right]$$

This is what I've done so far. I can re-arrange the equation to $x_1=-3x_3+x_4$ and from this get the basis

$$\begin{pmatrix} -3 \\ 0 \\ 1 \\ 0 \end{pmatrix} \; \begin{pmatrix} 1 \\ 0 \\ 0 \\ 1 \end{pmatrix}$$

I'm not too sure if I have done this correct. Can anyone confirm? Should $x_{2}=0$ since it does not appear in the equation?

$x_2$ can be any real number. The condition $x_1 + x_3 = x_4$ is independent of it. Now notice that for a vector $\underline x = (x_1 \; x_2 \; x_3 \; x_4 )^T$ to be in $W$ it must satisfy the equation $x_1 + x_3 = x_4$. Notice then that $\underline x \in W$ if and only if $\underline x$ is of the form, $$\underline x = (x_1, \; x_2, \; x_3, \; x_3 + x_1 )^T = x_1(1,0,0,1)^T + x_2( 0,1,0,0)^T + x_3 ( 0,0,1,1 )^T$$
where $x_1, x_2, x_3$ can be any real number or they can be viewed as arbitrary scalars.