# $\dim C(AB)=\dim C(B)-\dim(\operatorname{Null}(A)\cap C(B))$

Let $A \in M_{n \times m}\left(F\right)$ and $B\in M_{m \times p}\left(F\right)$ for a field $F$.

Prove: $\dim C(AB)=\dim C(B)-\dim(\operatorname{Null}(A)\cap C(B))$, where $C(X)$ denotes the column span of a matrix $X$.

Start by considering the map $T : C(B) \to C(AB)$ given by $T(y) = Ay$, for all $y\in C(B)$. It's a linear transformation because if $c\in F$ and $y_1,y_2\in C(B)$, say $y_1 = Bx_1$ and $y_2 = Bx_2$, then
$$T(cy_1 + y_2) = T(B(cx_1 + x_2)) = AB(cx_1 + x_2) = cABx_1 + ABx_2 = cT(y_1) + T(y_2).$$
Further, the kernel of $T$ is $\operatorname{Null}(A) \cap C(B)$. Indeed, $y\in \operatorname{ker}(T)$ if and only if $y\in C(B)$ and $Ay = 0$, if and only if $y\in \operatorname{Null}(A)\cap C(B)$. The map $T$ is onto, since for each $z\in C(AB)$, there is an $x$ such that $ABx = z$, i.e., $T(Bx) = z$. Now use the rank-nullity theorem to obtain the result.
• Why is T is onto, it has to do something to the matrix being $n \times n$?
• @gbox I gave an explanation in my answer. To prove that $T$ is onto, one must show that for every $z\in C(AB)$, there exists $y\in C(B)$ such that $T(y) = z$. Given $z\in C(AB)$, there exists a column vector $x$ such that $ABx = z$. So letting $y = Bx$, we have $y\in C(B)$ and $T(y) = z$.