I am trying to understand the proof of the following: Suppose $U,W$ are vector subspace of $V$, then $\dim (U+W)+\dim (U \cap W)= \dim (U) +\dim (W).$
The proof goes like this: Let $S: V \rightarrow V/W$ be the natural surjection. Then we have $\dim (V) = \dim (W) +\dim (V/W)$ by rank-nullity. Now let $T: U \rightarrow (U+W)/W$. Then we have $\dim \ker (T)= \dim (U \cap W)$ and $\dim Im (T)= \dim (U+W) - \dim (W)$ and the result follows.
Basically I don't understand what is going on after "Now let $T$..." I don't understand how is $T$ actually define, and why the rank and nullity of $T$ equals that (which I think will be clear once I know how $T$ is defined), could someone please help, thanks!