Calculating the dimension of $U + W$ Consider $U=\{(a,b,c,d):b-2c+d=0\}$ and $W=\{(a,b,c,d):a=d,b=2c\}$
I have to find the dimension of $U + W$
I put the given conditions in a matrix form as
\begin{bmatrix}
       1 & 0 & 0 & 1 \\
        0 & 1 & -2&0 \\
        0 & 1 & -2 & 1 \\
        \end{bmatrix}
But I am getting the number of free variables as $3$,the answer is 4.
How is the dimension 4 in this case?
 A: I'm not sure if there is any specific method you would want, but here is one way. 
Based on the descriptions of $U, W$ we have that 
$$U = \{ (a, b, b/2, a)\;|\; a, b\in\mathbb{R} \} \quad\text{and}\quad W = \{ (a, b, c, 2c-b) \;|\; a, b, c\in\mathbb{R} \}. $$
Then $U + W$ is the set of elements $\alpha\vec{u} + \beta\vec{w}$ where $\alpha,\beta$ are scalars and $\vec{u}\in U, \vec{w}\in W$. In this case, $\alpha\vec{u}$ is of the form $(a_{1}, b_{1},b_{1}/2, a_{1})$, and $\beta\vec{w}$ is of the form $(a_{2}, b_{2}, c_{2}, 2c_{2}-b_{2})$.
Then the possible elements of $U + W$ are of the form 
$$ (a_{1} + a_{2}, b_{1} + b_{2}, b_{1}/2 + c_{2}, a_{1} + 2c_{2} - b_{2}). $$
Now one ad hoc thing you can do is show that $(1, 0, 0, 0), \ldots, (0, 0, 0, 1)\in U + W$, which would imply that all points of $\mathbb{R}^{4}$ are in $U+W$ and hence it is of dimension $4$. 

Actually, perhaps you can consider this.
We know that all elements of $U + W$ are of the form
$$ (x, y, z, w) = (a_{1} + a_{2}, b_{1} + b_{2}, b_{1}/2 + c_{2}, a_{1} + 2c_{2} - b_{2}). $$
In other words, 
$$\begin{bmatrix} 
1 & 1 & 0 & 0 & 0 \\
0 & 0 & 1 & 1 & 0 \\
0 & 0 & \tfrac{1}{2} & 0 & 1 \\
1 & 0 & 0 & -1 & 2
\end{bmatrix} \begin{bmatrix}
a_{1} \\ a_{2} \\ b_{1} \\ b_{2} \\ c_{2}
\end{bmatrix} = \begin{bmatrix}
x \\ y \\ z \\ w
\end{bmatrix}. $$
This means that $U+W$ is the range (output space) of the matrix on the left.
Once you compute the rank of the matrix, you will have the dimension of your space.
