[Math] Find a basis for the subspace given two equations

linear algebramatrices

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.

Best Answer

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.

Related Question