Finding a basis and dimension for subspaces of $R^{4}$

I have an homework question I can't understand how to solve.

Let $U$ and $W$ be subspaces of $\mathbb{R}^{4}$ such that $$\dim U>\dim W,$$ $$U\cap W=\operatorname{span}\{(1,2,3,4),(1,1,1,1),(-1,0,1,2)\},$$ $$(0,0,1,0)\notin U+W.$$

I need to find $\dim(U+W)$ and a basis for $W$.

$\begin{bmatrix}1 & 2 & 3 & 4\\ 1 & 1 & 1 & 1\\ -1 & 0 & 1 & 2 \end{bmatrix}\overset{R_{3}\rightarrow R_{3}+R_{2}}{\underset{R_{1}\rightarrow R_{1}-R_{2}}{\Rightarrow}}\begin{bmatrix}0 & 1 & 2 & 3\\ 1 & 1 & 1 & 1\\ 0 & 1 & 2 & 3 \end{bmatrix}\overset{R_{3}\rightarrow R_{3}-R_{1}}{\Rightarrow}$

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

From here I know that $\dim(U\cap W )=2$

I know that $U\cap W$ is a subspace of $W$ and $U$, then $2\leq \dim U$ and $2\leq \dim W$.

I also know that $(0,0,1,0)\notin U+W$ and we know that $(0,0,1,0)\in \mathbb{R}^{4}$

means that $U+W\ne R^{4}$

This is where I got so far.

Thanks in advance .

Note that $(0,0,1,0) \not\in U+W$, so $U+W$ is not whole $\mathbb{R}^4$, so it's dimension must be $<4$. On the other hand $\dim W \cap U=2$ ,so $4>\dim U+W \geq \dim U>\dim W \geq \dim W \cap U=2$. Because $\dim$ is an integer this inequality implies that $\dim U=\dim W+U=3$ and $\dim W=2$ (there's only one possibility to satisfies inequalities).
Because $\dim W=\dim W \cap U$ and $W, W\cap U$ are linear spaces you have $W=W\cap U$.Because $\dim W=2$, you should find two linear independent vectors $v_1,v_2 \in W$, for example $v_1=(1,2,3,4),v_2=(1,1,1,1)$. It's a basis of $W$.
dim $\mathbb{R}^4 >$ dim $U + W \geq$ dim $U >$ dim $W \geq$ dim $U \cap W$
• why $dimR^{4}>dim(U+W)$? does $U+W\ne R^{4}$ means that $dim U+W\ne dimR^{4}$? @user73985 Dec 16, 2014 at 15:17
• Yes. Suppose dim $U + W =$ dim $\mathbb{R}^4$. Then suppose $(v_1, ..., v_4)$ are a basis for $U + W$ then they will be linearly independent and so - since there are dim $\mathbb{R}^4 = 4$ of them - they will span $\mathbb{R}^4$, and so $U + W =$ span $\{(v_1, ..., v_4)\} = \mathbb{R}^4$. Dec 16, 2014 at 15:25