Show that $\dim \operatorname{Ker} f -\dim (W/ \operatorname{Im} f) = \dim V - \dim W$

For finite-dimensional vector spaces $V$ and $W$ and $f \in \operatorname{Hom}(V,W)$ show that $\dim \operatorname{Ker} f -\dim (W/ \operatorname{Im} f) = \dim V - \dim W$

$V \cong \operatorname{Ker}f \oplus V/\operatorname{Ker}f \cong \operatorname{Ker}f \oplus \operatorname{Im}f \Rightarrow \operatorname{dim}V = \operatorname{dim} \operatorname{Kerf} + \operatorname{dim} \operatorname{Im}f$. Also $\operatorname{dim} W = \operatorname{dim} \operatorname{Im}f + \operatorname{dim} W/\operatorname{Im}f$.
• I understand the first half. Why is it that $\dim W= \dim \operatorname{Im}f+ \dim W/\operatorname{Im}f$? Feb 7 '13 at 4:50
• Is it because if the $\operatorname{Im}f \neq W$ then $\dim W / \operatorname{Im}f$ is the remaining "bits of the vector space"--like you're zeroing out the image and taking the dimension of what's left. That makes sense. Feb 7 '13 at 4:53
• Correct. More formally, if $U$ is a subspace of $V$, then $dimU+dim V/U=dimV$. Feb 7 '13 at 14:53