Proof for $\dim(U+W)$ I was studying linear algebra today when I got a formula that gives me the dimensions of a sum between two subspaces:
$$
\dim (u+w) = \dim(u) + \dim(w) - \dim(u \cap w)
$$And there's a proof below it... But before reading the proof, I wanted to give it a try... Here's what I've got:
$U$ and $W$ are subspaces.
$t = \dim(U)$ and $s = \dim(W)$
1)My proof for direct sum:
If i have $V =  U\oplus W$, I can assume that $U \cap W = 0$ and for any $z \in V$ it can be written as a linear combination between the vectors of the basis $U$ and $W$:
$$
z = \sum_{i=1}^{t} \beta_{i}\cdot U_{i} + \sum_{i=1}^{s} \gamma_{i}\cdot W_{i} : \forall U_{i} \in U, W_{i} \in W, \beta,\gamma \in R
$$
Because of that two affirmatives, I can assume that the vectors in the basis $U$ and $W$ will be L.I, therefore, will be a basis for $V$, and $V$ will have: $\dim(V) = \dim(U) + \dim(W) = t+s$.
2)My proof for sum with intersection:
Now if I have that $V = U+W$, I can assume that $U \cap W \neq 0 $, and because of that, there are some vectors different than the trivial one, that can be written as a linear combination of the vectors in the basis $U$ and simultaneously as a linear combination fo the vectors in the basis $W$:
$$
z = \sum_{i=1}^{t} \beta_{i}\cdot U_{i} = \sum_{i=1}^{s} \gamma_{i}\cdot W_{i}\\ \forall U_{i} \in U, W_{i} \in W, \beta,\gamma \in R
$$
Now, what I think is the best to be done is to find solutions for $z$ that will give me the set of vectors that are in the intersection of $U$ and $W$.
Having in hands the numbers of vectors in the set $z$, I can see that $U+W$ will give me an L.D set (because it has some intersection $z$), compound of vectors in the basis $U$ and basis $W$, and since I know that this L.D set needs to be L.I to be a basis for V, I need to remove some dependent vectors, that are directly related to the intersection... That's why:
$$
\dim (u+w) = \dim(u) + \dim(w) - \dim(u \cap w)
$$
That's what I've got by my intuition and knowledge at the moment. Please correct me because I know that I'm not being rigorous, and tell me what you think... Am I in the way? Is that a good approach to the real proof?
Thanks
 A: If you can use the kernel-image theorem (aka rank-nullity theorem), then consider the linear transformation $T: U \times W \to V$ given by $T(u,w)=u+w$ and prove that the image of $T$ is $U+W$ and the kernel of $T$ is $U \cap W$.
A: To spell out what I am suggesting in my comments, for a finite dimensional vector space, $V$, with subspaces $U$ and $W$, such that $V=U+W$, but not necessarily $U\cap W = \{0\}$.
Let $\{b_i\}$ be a basis for $U\cap W$, then, in particular, since $U\cap W$ is a subspace of $U$ we have that $\{b_i\}$ spans a (sub)space of $U$. We construct a basis for $U$ based on the given basis for that (sub)space as follows:
If $\operatorname{span}\{b_i\}\neq U$, then we find a vector $u_1\in U$ which is not in $\operatorname{span}\{b_i\}$, and append it to the set, so we now have $\{b_i,u_1\}$. If this set spans $U$, we are done, other we repeat the above process to obtain a $u_2$. This process is continued until $\operatorname{span}\{b_i,u_j\}=U$, which will happen in finitely many steps, since $U$ must be finite dimensional because $U$ is a subspace of $V$ and $V$ is finite dimensional (See note at end).
Hence the set $\{b_i,u_j\}$ is a basis for $U$. We perform the analogous construction for $W$, obtaining basis $\{b_i,w_k\}$ for $W$. Now the set $\{b_i,u_j,w_k\}$ must span $V$ because every vector in $V$ is a sum of a vector in $U$ with a vector in $W$ and hence can be expressed as a linear combination of the form
$v=\sum_{i\in I} r_ib_i+\sum_{j\in J}s_ju_j+\sum_{k\in K}t_kw_k$
(side note, all of the $s_j$'s or all of the $t_k$'s can be $0$ depending on which of $U$ or $W$ it lives in).
Now we remark that $\dim V=|I|+|J|+|K|$, where $|A|$ denotes cardinality of $A$ (i.e. "size"). We further observe that $\dim U=|I|+|J|$, $\dim W=|I|+|K|$, and $\dim (U\cap W)=|I|$. Therefore, we conclude that
$\dim U+\dim V-\dim(U\cap W)=(|I|+|J|)+(|I|+|K|)-|I|=|I|+|J|+|K|=\dim V$.
Note: I used finiteness of $V$ to construct the basis. For infinite dimensional $V$, this theorem still holds (edit: as long as $\dim(U\cap V)<\dim V$), if you interpret the $+$ and $-$ as cardinal arithmetic operators instead of real number arithmetic operators. But you need to use a different method to get the required basis (or a different approach to proving the theorem altogether).
