rank of product of full rank matrices Please help me with the following question: 
Let $A$ be $m \times n$, $B$ be $n \times p$ matrices with $\text{rank}(A)=m$, $\text{rank}(B)=p$, where $p < m < n$.
What are conditions such that $\text{rank}(AB)=\text{rank}(B)$???
Thanks!
 A: No, $\begin{pmatrix} 1 & -2 & 0\\ 0 & -2 & 4\end{pmatrix}\begin{pmatrix} 4 & 0 & 0 \\ 0 & 2 & 0\\ 0 & 0 & 1\end{pmatrix}\begin{pmatrix}1\\ 1 \\ 1\end{pmatrix}=(0)$. 
This is a simple counter-example for $(p,m,n)=(1,2,3)$.
A: View $A,B,D$ as linear transformation, let $V$ be the domain of $B$, a vector space of dimension $p$. 
Recall that for any linear transormation $T$, rank$(T)$ is the dimension of the image of the linear transformation that is given by multiplication by $T$.
rank$(B)=p$ means dim$(B(V))=p$. $D$ is diagonal positive definite matrix implies $D(B(V))=B(V)$. As a result, rank$(ADB)=$dim$(ADB(V))=$dim$(AB(V))=$rank$(AB)=p$.
A: No. In general that is wrong, consider the following example: $p= 1$, $m=2$, $n=3$, $\def\M#1#2{\operatorname{Mat}_{#1,#2}(\mathbf R)}$ 
$$ B = \begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix} \in \M 31, 
   D = \begin{pmatrix} 2 & 0 & 0\\
                       0 & 1 & 0\\
                       0 & 0 & 1 \end{pmatrix} \in \M 33, 
   A =\begin{pmatrix} -1 & 2 & 0\\
                       0 & 0 & 1  \end{pmatrix} \in \M 23 $$
Then $A$, $B$ and $D$ have full rank, we have
$$ AB = \begin{pmatrix} 1\\ 0\end{pmatrix},
   AD = \begin{pmatrix} -2 & 2 & 0\\ 0 & 0 & 1 \end{pmatrix}, ADB = \begin{pmatrix} 0 \\ 0\end{pmatrix}  
$$
so $\def\r{\operatorname{rank}}\r AB = p = 1 > 0 = \r ADB$.
