# Find dimension from subspace equations

In order to calculate its dimension, I need the basis of the subspace. How can I get it from the equations?

Find the dimension of the following subspaces of $\mathbb{R}^5$: $$U = \{(x_1,x_2,x_3,x_4,x_5) \ | \ 2x_1 - x_2 - x_3 = 0, x_4-3x_5=0 \}\\ V = \{(x_1,x_2,x_3,x_4,x_5) \ | \ 2x_1 - x_2 + x_3 + 4x_4 + 4x_5 = 0 \}.$$

Let $W$ be the subspace satisfying all 3 equations. Is it true that dim($W) = 5$?

• It is not true that you need a basis to get the dimension, although it's certainly a good way to do it. In general, how can you solve systems of equations? – LSpice Jun 3 '16 at 21:24
• $W$ is the intersection of $U$ and $V$, so its dimension is no greater than the smaller of the two. – amd Jun 4 '16 at 8:46

The rank of the system of linear equations is equal to the codimension of the null space, by the rank-nullity theorem.

You can find the dimension by finding the dimension of the nullspace of the matrix

$$\begin{bmatrix} 2& -1 & -1 & 0 & 0\\ 0&0&0&1&-3 \end{bmatrix}$$

The rank of this matrix is $2$, so the dimension of the nullspace is equal to $5-2 = 3$ by the rank+nullity theorem.

If $(x_1,x_2,x_3,x_4,x_5) \in U$, then $x_1 = \frac{1}{2}x_2 + \frac{1}{2}x_3$ and $x_4 = 3x_5$.

So $$\begin{pmatrix} x_1\\ x_2\\ x_3\\ x_4\\ x_5\\ \end{pmatrix} = \begin{pmatrix} \frac{1}{2}x_2 + \frac{1}{2}x_3\\ x_2 \\ x_3 \\ 3x_5 \\ x_5 \end{pmatrix}= x_2\begin{pmatrix} \frac{1}{2}\\ 1\\ 0\\ 0\\ 0\\ \end{pmatrix}+ x_3 \begin{pmatrix} \frac{1}{2}\\ 0\\ 1\\ 0\\ 0\\ \end{pmatrix} + x_5 \begin{pmatrix} 0\\ 0\\ 0\\ 3\\ 1\\ \end{pmatrix}$$

So we see that these three vectors form a basis for $U$. Hence dim($U) = 3$.

Now if $(x_1,x_2,x_3,x_4,x_5) \in V$, then $x_2 = 2x_1 + x_3 + 4x_4 + 4x_5$.

So $$\begin{pmatrix} x_1\\ x_2\\ x_3\\ x_4\\ x_5\\ \end{pmatrix} = \begin{pmatrix} x_1\\ 2x_1 + x_3 + 4x_4 + 4x_5\\ x_3\\ x_4\\ x_5\\ \end{pmatrix}= x_1 \begin{pmatrix} 1\\ 2\\ 0\\ 0\\ 0\\ \end{pmatrix} + x_3 \begin{pmatrix} 0\\ 1\\ 1\\ 0\\ 0\\ \end{pmatrix} + x_4 \begin{pmatrix} 0\\ 4\\ 0\\ 1\\ 0\\ \end{pmatrix} + x_5 \begin{pmatrix} 0\\ 4\\ 0\\ 0\\ 1\\ \end{pmatrix}$$

So we see that these four vectors form a basis for $V$. Hence dim($V)=4$.

For $W$, rather than go through the same sort of computation, note that $W = U \cap V$. So $dim(W) \leq \min\{dim(U),dim(V)\} = 3$. So $dim(W) \neq 5$.