# Proving the dimension formula for subsets using the dimension formula for linear maps

Let K be a field, $U_1, U_2 \subset V$ subspaces of a vector space $V$ over $K$.

Prove that $$\dim_K(U_1)+\dim_K(U_2)=\dim_K(U_1+U_2)+\dim_K(U_1 \cap U_2)$$

using

$$\dim_K(\ker(f))+\dim_K(\operatorname{im}(f))=\dim_K(H)$$

for a linear map $f: H \rightarrow W$ for vector spaces $H, W$ over $K$.

I would love some hints, I know how to prove this using the basis of the subspaces, but this way is unknown to me.

• It should be $H$ instead of $W$ on the second equation, right? – Fimpellizieri Dec 15 '16 at 7:12
• Correct! Thank you – B.Swan Dec 15 '16 at 7:15
• I suppose you mean subspaces instead of subsets. – Gribouillis Dec 15 '16 at 7:29

Use the linear map $(u_{1}, u_{2}) \mapsto u_{1} + u_{2}$ from $U_{1} \times U_{2}$ to $U_{1}+U_{2}$.
• Ok, I understand now. $$dim_K(ker(f))=dim_K(U_1 \cap U_2)$$ $$dim_K(im(f))=dim_K(U_1 + U_2)$$ $$dim_K(U_1 \times U_2)=dim_K(U_1)+dim_K(U_2)$$ Correct? – B.Swan Dec 15 '16 at 8:19
• I reversed your edit. It is really $U_1 \times U_2$, that is to say the set of all pairs $(u_1, u_2)$ when $u_1\in U_1$ and $u_2\in U_2$ and not $U_1 \oplus U_2$. The latter is only a notation for $U_1+U_2$ in the special case where $U_1\cap U_2=\{0\}$ – Gribouillis Dec 16 '16 at 7:33
• I have been taught that $V \oplus W=(V\times W, +, \cdot )$, excuse me if I was wrong. – B.Swan Dec 16 '16 at 10:50