# Direct Sum Test for more than 2 subspaces

I know that if 2 subspace $U_1,U_2$ of V ,can be written as direct sum iff
1) $U_1+U_2$=V
2) $U_1\cap U_2={0}$
I can prove this .But Now to extend this defination to more than 2 subspaces then there is problem even though that subspaces are mutually intersect only at {0}.
Example:$U_1$={$x,y,0|x,y\in R$},$U_2$={$0,0,z|z\in R$},$U_3$={$0,y,y|y\in R$} these are subspaces of $R^3$.As any 2 subspaces has intersection {0} but still this is not direct sum
As we cannot write as 0 uniquely as {0,0,0}={0,0,0}+{0,0,0}+{0,0,0}={0,1,0}+{0,0,1}+{0,-1,-1} So $U_1+U_2+U_3$ is not direct sum of $R^3$.

So my question what is more condition required to make more than 2 subspace to be direct sum?

• One condition is, the dimensions have to add up. In your example, $2+1+1>3$. But this is not sufficient. – Gerry Myerson Aug 4 '18 at 6:33

$$U_4=U_2+U_3$$
which is a direct sum since $U_2\cap U_3=\{\emptyset\}$ and then $U_4$ has dimension 2.
Therefore since also $U_1$ has dimension $2$
$$U_1\cap U_4\neq \{\emptyset\}$$
and $U_1+U_4=U_1+U_2+U_3$ is not a direct sum of $\mathbb{R^3}$.