Given two subspaces $U_1, U_2$, I understand the concept of direct sum
$$ W= U_1 \oplus U_2 \iff W= U_1 + U_2, \quad U_1 \cap U_2 = \{ 0 \}$$
Where $W$ is a subspace of $V$.
I am trying to generalize it for more than $2$ subspaces, say $3$. I thought of the following.
$$ W= U_1 \oplus U_2 \oplus U_3 \iff U_1 \cap U_2 = \{ 0 \}, U_1 \cap U_3 = \{ 0 \}, U_2 \cap U_3 = \{ 0 \}, U_1 + U_2 + U_3 = W $$
It does not seem to have the same structure that for the statement with $k$ subspaces
\begin{align*} W= U_1 \oplus U_2 \oplus ... \oplus U_k \iff& U_i \cap \left(U_1 + ... + U_{i-1} + U_{i+1} + ... + U_k\right) = \{ 0 \} \\ &U_1 + U_2 + ... + U_k = W \end{align*}
In particular, the issue lies on the intersection statement. Might you explain why my thought is faulty? I should be able to find a counterexample once I see it :)
Edit 0
Let us use the following definition for the direct sum (Axler, page 21)
$U_1 + U_2 + \ ... \ + U_k$ is a direct sum if $x \in U_1 + U_2 + \ ... \ + U_k$ can be written in a unique way as $x = u_1 + u_2 + \ ... \ + u_k$, where $u_i \in U_i$
I think I found a counterexample:
$$U_1 = \{ (x, 0) | x \in \Bbb R\}, \quad U_2 = \{ (y, y) | y \in \Bbb R\}, \quad U_3 = \{ (0, y) | y \in \Bbb R\}$$
These subspaces satisfy $U_1 \cap U_2 = \{ 0 \}, U_1 \cap U_3 = \{ 0 \}, U_2 \cap U_3 = \{ 0 \}, U_1 + U_2 + U_3 = \Bbb R^2$ but not $\Bbb R^2= U_1 \oplus U_2 \oplus U_3$ because we can write, say, the zero vector in (at least) two ways
$$(0, 0) = (1, 0) + (-1, -1) + (0, 1) \quad \text{and} \quad (0, 0) = (0, 0) + (0, 0) + (0, 0)$$
Do you agree? :)