Rank of matrices, prove inequality [duplicate]

Today I'm having hard time with linear algebra problems; this is one:

$\forall A,B\in M_n(\mathbb{K})$,

$\mathrm{rank}(A)+\mathrm{rank}(B)\le \mathrm{rank}(AB)+n$

$M_n(\mathbb{K})$ is the space of square matrices in the field $\mathbb{K}$, for instance $\mathbb{C}$ or $\mathbb{R}$.

.

If I consider A and B as linear mappings from $\mathbb{K}^n$ to $\mathbb{K}^n$ I have:

$\mathrm{rank}(A)=\mathrm{dim}(\mathrm{Im}(A))=n-\mathrm{dim}(\mathrm{Ker}(A))$

$\mathrm{rank}(AB)=n-\mathrm{dim}(\mathrm{Ker}(AB))$

so, the inequality becomes:

$\mathrm{dim}(\mathrm{Ker}(A))+\mathrm{dim}(\mathrm{Ker}(B))\ge\mathrm{dim}(\mathrm{Ker}(AB))$

Is this correct? Now, how can I conclude?

.

I thought that if $\mathbb{K}=\mathbb{C}$ then A and B are for sure triangularizable and then, maybe in some way developing the products I can show directly that the inequality holds??

.

Thank you.

marked as duplicate by Dietrich Burde, Elaqqad, Calle, user147263, Rolf HoyerApr 18 '15 at 1:04

As you said, consider $A$ and $B$ as linear mappings from $\mathbb{K}^n\rightarrow\mathbb{K}^n$. Consider another linear mapping $$\phi:\mathrm{Im}B\rightarrow\mathbb{K}^n, \quad\phi(x)=Ax,$$ where $\mathrm{Im}B$ is the range of $B$. So mapping $\phi$ is just $A$ restricted to $\mathrm{Im}B\subset \mathbb{K}^n$. What you want to prove is $$\mathrm{rank}(AB)+n-\mathrm{rank}A\geq \mathrm{rank}B,$$ or equivalently $$\mathrm{rank}(AB)+\mathrm{dim}\mathrm{Ker}A\geq \mathrm{rank}B.$$ This is true because $\mathrm{Im}\phi=\mathrm{Im}(AB)$, $\mathrm{Ker}\phi\subset \mathrm{Ker}A$ and $$\mathrm{dim}\mathrm{Im}\phi+\mathrm{dim}\mathrm{Ker}\phi=\mathrm{dim}\mathrm{Im}B.$$