How to show that $\dim\ker(AB) \le \dim \ker A + \dim \ker B $? I want to show that
$$ \dim \ker(AB) \le \dim \ker A + \dim \ker B. $$
My problem
I thought that I can do that in this way: 
Let consider $x \in\ker B$
$$Bx  = 0$$
Let multiplicate this from left side by A and we get:
$$ABx = 0$$
so $$ker B \subset\ker AB $$
so  $$\dim \ker(B) \le \dim\ker AB$$
We can do the same thing with $\ker A$
let consider $ \vec{y} \in \operatorname{im}(AB) $
so $$ y = (AB)x $$
what is equivalent to $$ \vec{y} = A(B\vec{x}) = A\vec{w} $$
So
$$ \vec{y} \in \operatorname{im}(AB) \rightarrow \vec{y} \in \operatorname{im}(A)$$
so
$$ \operatorname{rank} AB \le  \operatorname{rank} A \leftrightarrow  \dim \ker A \le \dim \ker AB $$
But I am not sure what I should do later...
edited
I have seen this post $A, B$ are linear map and dim$null(A) = 3$, dim$null(B) = 5$ what about dim$null(AB)$ but I haven't got nothing like $\operatorname{im}(A|_{\operatorname{im}(B)})$ on my algebra lecture and I can't use that so I search for another proof (or similar without this trick)
 A: This is a proof in general where $A:V\to W$ and $B:U\to V$ are linear maps.   Here $U$, $V$, and $W$ are arbitrary vector spaces over a base field $F$, and they do not necessarily have finite dimensions.  That is,
$$\dim \ker (AB) \leq \dim \ker A+\dim\ker B$$
is true whether or not the relevant dimensions are finite cardinals.
Note that $x\in \ker(AB)$ iff $Bx\in \ker A$, which is the same as saying $$x\in B^{-1}(\ker A\cap \operatorname{im}B).$$  Recall from the isomorphism theorems that $\operatorname{im} B\cong U/\ker B$ so there exists an isomorphism $$\varphi: U\overset{\cong}{\longrightarrow} \ker B\oplus \operatorname{im}B.$$  In other words,
$$\varphi\big(B^{-1}(\ker A\cap \operatorname{im}B)\big)=\ker B\oplus (\ker A\cap \operatorname{im}B).$$
Consequently,
\begin{align}\dim\ker(AB)&=\dim\big(\ker B\oplus (\ker A\cap \operatorname{im}B)\big)\\&=\dim\ker B+\dim(\ker A\cap \operatorname{im}B).\end{align}
Since $\ker A\cap \operatorname{im}B\subseteq \ker A$, we obtain the desired inequality.
A: Here is a less general proof that works for any $p \times m$ matrix $A$ and $m \times n$ matrix $B$ (so that $AB$ is defined as a $p \times n$ matrix) with real entries. We will show $\text{nullity}(AB) \leq \text{nullity}(A) + \text{nullity}(B)$. ("Nullity" denotes "dimension of kernel" and "rank" denotes "dimension of image".)
First note that
$$\text{nullity}(AB) = n - \text{rank}(AB) \quad \quad (*)$$
by the rank-nullity theorem.
Now consider the linear transformation $A_{|\text{im}B} : \text{im}B \to \mathbb{R}^p$ defined by  $A_{|\text{im}B}(v)=Av$ for all $v \in \text{im}B \subseteq \mathbb{R}^m$, i.e. restrict $A$ to domain $\text{im}B$. Notice that $\text{im}A_{|\text{im}B}=\text{im}AB$. Using rank-nullity on $A_{|\text{im}B}$ yields
$$\text{rank}AB=\text{rank}A_{|\text{im}B} = \text{rank}B - \text{nullity}A_{|\text{im}B}$$
Notice (using rank-nullity a third time) that $\text{rank}B=n-\text{nullity}B$, so we have shown that
$$\text{rank}AB= n-\text{nullity}B - \text{nullity}A_{|\text{im}B} \quad \quad (**)$$
Now we can combine (*) and (**) to obtain
$$\text{nullity}(AB) = \text{nullity}A_{|\text{im}B} + \text{nullity}B \quad \quad $$
To conclude, notice that $\text{ker}A_{|\text{im}B} = \text{ker}A \cap \text{im}B$ is a subspace of $\text{ker}A$, so $\text{nullity}A_{|\text{im}B} \leq \text{nullity}A$ and thus
$$\text{nullity}(AB) \leq  \text{nullity}A + \text{nullity}B$$
