# Show that $\mathbf{F}^n = U_1 \oplus \dots \oplus U_n$

This is an example from Axler's "Linear Algebra Done Right":

Suppose $$U_j$$ is a subspace of $$\mathbf{F}^n$$ of those vectors whose coordinates are all $$0$$, except possibly in the $$j^\text{th}$$ slot (thus, for example, $$U_2 = \{ (0, x, 0, \dots, 0) \in \mathbf{F}^n | x \in \mathbf{F} \}$$. Then $$\mathbf{F}^n = U_1 \oplus \dots \oplus U_n$$, as you should verify.

The definition of direct sum is given as

"The sum $$U_1+\dots+U_n$$ is called a direct sum if each element of $$U_1 + \dots + U_m$$ can be written in only one way as a sum $$u_1+ \dots + u_m$$, where each $$u_j$$ is in $$U_j$$."

Proof: Let $$v$$ be an arbitrary vector.

$$(\leftarrow)$$ Suppose that $$v \in U_1 \oplus \dots \oplus U_n$$. Then we know that $$v$$ can be written as $$v = u_1 + u_2 + \dots + u_n$$ for $$u_i \in U_i$$. Since each $$u_i \in \mathbf{F}^n$$ and $$\mathbf{F}^n$$ is a vector space, $$v = u_1 + u_2 + \dots + u_n \in \mathbf{F}^n$$ by closure under addition.

$$(\rightarrow)$$ Now suppose that $$v \in \mathbf{F} ^ n$$. Then we can write $$v$$ as $$v = (v_1, v_2, \dots, v_n)$$. For $$1 \leq i \leq n$$, let $$u_i \in U_i$$ be a vector with $$v_i$$ as its $$i^\text{th}$$ coordinate, and zero everywhere else. It follows that $$v = u_1 + u_2 + \dots + u_n$$, so $$v \in U_1 + U_2 + \dots + U_n$$. Now let $$w_1 \in U_1, w_2 \in U_2, \dots w_n \in U_n$$ be arbitrary such that $$v = w_1 + \dots + w_n$$ ...

How do I finish this part of the proof formally (it makes sense intuitively)? I was thinking of showing that $$u_1 + u_2 + \dots + u_n = v = w_1 + \dots + w_n$$ and $$u_1 + u_2 + \dots + u_n - (w_1 + \dots + w_n) = 0$$, so $$(u_1 - w_1) + \dots + (u_n - w_n) = 0$$, but I get stuck here. Any hints would be appreciated!

• @Matematleta That seems to be stated later on in the book. How do I finish it without that knowledge? – Iyeeke Sep 11 '20 at 23:52
• @Matematleta, having $U_{i} \cap U_{j} = \{0 \}$ if $i \neq j$ is not enough when dealing with $3$ or more subspaces. To quote an example from Axler, consider $$U_{1} = \{ (x,y, 0) \in \mathbb{R}^{3} \mid x, y \in \mathbb{R} \},$$ $$U_{2} = \{ (0,0, z) \in \mathbb{R}^{3} \mid z \in \mathbb{R} \},$$ $$U_{3} = \{ (0, y, y) \in \mathbb{R}^{3} \mid y \in \mathbb{R} \}.$$ They satisfy the previous condition but their sum is not a direct one. – Kevin Aquino Sep 12 '20 at 0:37
• @Matematleta The definition is given as "The sum $U_1 + \dots + U_n$ is called a direct sum if each element of $U_1 + \dots + U_m$ can be written in only one way as a sum $u_1 + \dots + u_m$, where each $u_j$ is in $U_j$." – Iyeeke Sep 12 '20 at 1:17
• @Kevin López Aquino Yes, correct sorry I meant to write and should have written $U_i\cap\sum_{j\neq i}U_i = \{0\}$ for $1\le i\le n$ – Matematleta Sep 12 '20 at 4:07

$$u_{1}+\cdots+u_{n}=w_{1}+\cdots+w_{n}$$
$$u_{1}-w_{1}=w_{2}+\cdots+w_{n}-u_{2}-\cdots-u_{n}$$
The left side is in $$U_{1}$$, while the right side is in $$U_{2}\oplus\cdots \oplus U_{n}$$, and the intersections between this two subspaces is $$\{ 0 \}$$ because they are in direct sum. Then as $$u_{1}-w_{1}$$ belong to both of them, it must be zero; this implies $$u_{1}=w_{1}$$. If you applies the same pocedure to the rest of the coordinates you willl conclude all the $$u_{i}$$ are equall to the $$w_{i}$$.