How to check if two vector subspaces are a direct sum? 
Given $U=\{(x,y,z,t) \in \mathbb{R^4}|x+5y+4z+t=0 \land y+2z+t=0\}$ and $W=\{(x,y,z,t) \in \mathbb{R^4}|x+z+3t=0 \land 2x-3y-4z+3t=0\}$ check if $U\oplus W=\mathbb{R^4}$.

First we can say that $U,W$ are subspaces of $\mathbb{R^4}$ because they are vector spaces of the solutions to homogenous equations. 
In my understanding we need to prove two things: 


*

*$dimU+dimW=dim\mathbb{R^4}$

*$U+W=\mathbb{R^4}$


Regarding point 1. the basis of $U$ after row reduction is:
$$
\begin{pmatrix}1&5&4&1\\0&1&2&1\end{pmatrix}
$$
Similarly the basis for $W$:
$$
\begin{pmatrix}1&0&1&3\\0&1&2&1\end{pmatrix}
$$
While point 1. is satisfied point 2. clearly doesn't hold because if try to find the basis of $U+W=Sp\{B_U \cup B_W\}$ we can see that $B_U \cup B_W$ are linearly dependent therefore $dim(B_U \cup B_W) \le 3$ so $U\oplus W \neq \mathbb{R^4}$.
Am  in the right direction?
 A: Any vector, (x, y, z, t), in U must satisfy both x+5y+4z+t=0 and y+2z+t=0. Subtracting the second equation from the first x+ 4y+ 2z= 0 so that x= -4y- 2z.  In that case x+ 5y+ 4z+ t= -4y- 2z+ 5y+ 4z+ t= y+ 2z+ t= 0 or t= -y- 2z.  Any vector in U is of the form (-4y- 2z, y, z, -y- 2z)= y(-4, 1, 0, -1)+ z(-2, 0, 1, -2)z.
Any vector, (x, y, z, t), in V must satisfy both x+z+3t=0 and 2x−3y−4z+3t=0.  Subtracting the first equation from the second, x- 3y- 5z= 0 so x= 3y+ 5z.  Putting that into the first equation, 3y+ 5z+ z+ 3t= 3y+ 6z+ 3t= 0.  So 3t= -3y- 6z and t= -y- 2z.  Any vector in V is of the form (3y+ 5z, y, z, -y- 2z)= y(3, 1, 0, -1)+ z(5, 0, 1, -2).  
$R^4$ is the direct sum of those two vector spaces if and only if the four vectors, (-4, 1, 0, -1), (-2, 0, 1, -2), (3, 1, 0, -1), and (5, 0, 1, -2), are independent.  To determine that we look for numbers, a, b, c, d, such that a(-4, 1, 0, -1)+ b(-2, 0, 1, -2)+ c(3, 1, 0, -1)+ d(5, 0, 1, -2)= (0, 0, 0, 0).  If the only solution is a= b= c= d= 0, then they are independent and $R^4$ is the direct sum of the two vector spaces.
That vector equation reduces to the four equations -4a- 2b+ 3c+ 5d= 0, a+ c= 0, b+ d= 0, and -a- 2b- c- 2d= 0. From a+ c= 0 and b+ d= 0, c= -a and d= -b.  Putting those into the other two equations, -4a- 2b- 3a- 5b= -7a- 7b= 0 and -a- 2b+ a+ 2b= 0= 0 for all a and b. From a+ b= 0, b= -a So any (a, b, c, d)= (a, -a, -a, a) satisfies all four equations.  The four vectors are NOT independent and $R^4$ is NOT the direct sum of the two vector spaces.$
