Hello

Both of the below theorems are listed as properties 6 and 7 on the wikipedia page for the rank of a matrix.

I want to prove the following,

If $\displaystyle A$ is an M by n matrix and $\displaystyle B$ is a square matrix of rank n, then $\displaystyle rank(AB)$ = $\displaystyle rank (A) $.

Apparently this is a corollary to the theorem

If $\displaystyle A$ and $\displaystyle B$ are two matrices which can be multiplied, then $\displaystyle rank(AB)$ $\displaystyle \leq$ $\displaystyle min(rank (A), rank (B))$.

which I know how to prove. But I can't prove the first theorem. Any ideas?