# problem of rank-nullity theorem with a given set

Let $A$ be an $m \times n$ matrix and $B$ be an $n \times p$ matrix. Let

$$S=\left \{Bx\mid x\in \mathbb{R}^p \text{ and } ABx=0\right \}$$

Prove that $\dim(S)=\operatorname{rank}(B)-\operatorname{rank}(AB)$

What I thought is actually the collection of vector spanning by the column vector of $B$, so it seems that $\operatorname{rank}(S)$ is somehow equal to $\operatorname{rank}(B)$ (I don't know how to prove it, or maybe I'm wrong)
Then, I tried to use rank-nullity theorem
$$\dim(S)=\operatorname{rank}(B)+\operatorname{rank}(S)$$ But I already get stuck here

• It is helpful to take a vector space and linear transformation point of view. – Zhanxiong Jun 27 '15 at 17:45

Identify $A \in L(\mathbb{R}^n, \mathbb{R}^m)$, $B \in L(\mathbb{R}^p, \mathbb{R}^n)$, and $AB \in L(\mathbb{R}^p, \mathbb{R}^m)$. Let $\mathscr{R}(A), \mathscr{R}(B), \mathscr{R}(AB)$ be the range subspaces of $A$, $B$, $AB$, respectively, and let $\mathscr{N}(A), \mathscr{N}(B), \mathscr{N}(AB)$ be the null spaces of $A$, $B$, $AB$, respectively.
Notice that $S$ can be viewed as the range space of the linear transformation $B$ restricted to the subspace $\mathscr{N}(AB)$, apply the rank-nullity theorem once more, it follows that $$\dim(S) + \dim(\mathscr{N}(B)) = \dim(\mathscr{N}(AB))$$
Plug $(1)$ and $(2)$ into the above equation, we conclude
$$\dim(S) + (p - \text{rank}(B)) = p - \text{rank}(AB)$$
That is, $\dim(S) = \text{rank}(B) - \text{rank}(AB)$.