# Find a basis for the subspace given two equations

I want to find a basis for the following subspace, $$W=\{\left( \begin{array}{c} x_1\\ x_2\\ x_3\\ x_4 \end{array} \right)\in\mathbb{R}^4:x_1-x_2=-x_4,\,\mbox{and}\,x_1-x_2+x_3+x_4=0\}.$$

I know that if I had a subspace such as,

$$W=\{\left( \begin{array}{c} x_1\\ x_2\\ x_3\\ x_4 \end{array} \right)\in\mathbb{R}^4:x_1-x_2=-x_4\},$$

I would set $x_1=x_2-x_4$, and let $x_2=x_4=1$, such that the first basis vector would become, $$\left(\begin{array}{c}0\\1\\0\\1\end{array}\right),$$ and then the second would account for $x_3$ as, $$\left(\begin{array}{c}0\\0\\1\\0\end{array}\right).$$

For the system of equations, I wrote a matrix,

$$\left(\begin{array}{c}1&-1&0&1\\1&-1&1&1\end{array}\right),$$

and row-reduced to,

$$\left(\begin{array}{c}1&-1&0&1\\0&0&1&0\end{array}\right).$$

This tells me that $x_3$ is $0$, and then I have only the first basis vector from my earlier basis. Is this correct? I feel as though I'm doing something incorrectly.

• $x_3$ will indeed be zero, however you are incorrect about how to find the basis vector(s) given the condition $x_1=x_2-x_4$. Notice that $(1,1,0,0)$ is a solution yet is not included in the span of your proposed basis for example. – JMoravitz Dec 7 '16 at 19:43
• Would I simply have to use $x_2$ and $x_4$ separately to find the basis? That is, would it simply be, $(1,\,1,\,0,\,0)$ and $(-1,\,0,\,0,\,1)$? – quanticbolt Dec 7 '16 at 19:46
• in essence, yes. Generally, any variables corresponding to columns which don't contain a pivot can be regarded as free variables and each free variable will contribute a vector in the basis. Keep in mind though that there are infinitely many correct answers and the basis need not specifically be $(1,1,0,0),(-1,0,0,1)$. It would have been equally correct to give the basis $(1,2,0,1),(0,1,0,1)$ – JMoravitz Dec 7 '16 at 19:48

When defining a subspace by equations, the dimension of the subspace is $n-k$, where $n$ is the ambient space (in this case, $n=4$) and $k$ is the number of linearly independent equations; in this case, $k=2$.
Hence, you need only find two ($4-2$) linearly independent vectors on your subspace, that is, two linearly independet solutions yo your equation.
For instance, if you take $x_1=1,x_2=0$ then $x_4=-1$ and $x_3=0$, so one of them might be $(1,0,0,-1)$. Similarly, another option might be $(2,1,0,-1)$. You can check that they're linearly independent.