# If $V=W_1+\cdots+W_k$ and $\dim(V) =\sum_{i=1}^{k}\dim(W_i)$, prove that $V = W_1 \oplus\cdots\oplus W_k$

Let $$V$$ be a vector space and let $$W_1,\ldots,W_k$$ be subspaces of $$V$$ such that $$V = W_1 +\cdots+ W_k$$ and $$\dim(V) = \dim(W_1) +\cdots+ \dim(W_k)$$. Prove that $$V = W_1 \oplus\cdots\oplus W_k$$.

My attempt: $$k=1$$ is trivial, for $$k=2$$,

$$\dim(W_1+W_2)=\dim(W_1)+\dim(W_2)-\dim(W_1 \cap W_2)$$ which gives us $$\dim(W_1 \cap W_2)=0$$, which implies $$W_1 \cap W_2=\{0\}$$. Hence $$V = W_1 \oplus W_2$$.

For $$k=3$$, we get $$\dim(W_1+W_2+W_3)=\dim(W_1+W_2)+\dim(W_3)-\dim((W_1+ W_2)\cap W_3)$$, which implies $$\dim(W_1 \cap W_2)+\dim((W_1+ W_2)\cap W_3)=0$$. We get the following:

$$1. \,W_1 \cap W_2 = \{ 0 \}$$

$$2. \, (W_1+ W_2)\cap W_3 = \{0\}$$ , $$(W_1+ W_3)\cap W_2 = \{0\}$$ and $$(W_2+ W_3)\cap W_1 = \{0\}$$

Are conditions $$1$$ and $$2$$ enough to prove that $$V = W_1 \oplus W_2 \oplus W_3$$ ? This method isn't good for solving this problem for general $$k$$, is there any better way to prove this?

In fact $$\begin{cases} W_1 \cap W_2 = \{ 0 \} \\ (W_1+ W_2)\cap W_3 = \{0\} \end{cases}$$ are sufficient conditions. The second one implies $$(W_1+W_2) + W_3= (W_1+W_2) \oplus W_3$$ and the first one that $$W_1 + W_2 = W_1\oplus W_2$$. Therefore $$V= W_1+W_2+W_3 = W_1\oplus W_2 \oplus W_3.$$
However for the general case, I would rather proceed by induction on the dimension $$n = \dim V$$:
1. Easy for $$n=2$$...
2. Suppose that the result is true for $$n \ge 2$$ and that $$V = W_1 +···+ W_k$$ with $$\dim V = \displaystyle\sum_{i=1}^{k} \dim W_i = n+1$$. Without loss of generality, we can suppose that $$\dim W_k \ge 1$$. Then $$V = (W_1 +···+ W_{k-1})+ W_k$$ and $$\dim V = \dim (W_1 +···+ W_{k-1})+ \dim W_k$$. With what you proved in your question, you have $$V = W \oplus W_k$$ where $$W = W_1 +···+ W_{k-1}$$. Now $$\dim W \le n$$. So you can apply induction hypothesis to it, getting $$W = W_1 \oplus···\oplus W_{k-1}$$ and finally $$V = W_1 \oplus···\oplus W_{k-1} \oplus W_k$$ as desired.
You have a map $$T$$ from the external direct sum $$W_1\oplus\cdots W_k$$ to $$V$$ taking $$(w_1,\ldots,w_k)$$ to $$w_1+\cdots+w_k$$. Its image is $$W_1+\cdots+W_k=V$$. But both $$W_1\oplus\cdots W_k$$ and $$V$$ have the same dimension, so $$T$$ is an isomorphism. The injectivity of $$T$$ implies that inside $$V$$, $$W_1+\cdots+W_k$$ is an internal direct sum.