TITLE: Prove that $AB = 0 \iff \mathrm{im}(B) \subseteq \ker(A)$
QUESTION [5 upvotes]: Problem 1. Prove that for any $\ell \times m$-matrix $A$ and any $m \times n$-matrix $B$,
$$
AB = 0 \quad\text{ if and only if }\quad \mathrm{im}(B) \subseteq \ker(A)
$$
I have no idea on how to start this... 
I'm new to proofs and this is my first proof.

REPLY [2 votes]: suppose $AB = 0$.  you need to show $im B \subset ker A$  so pick an element $y$ in $im B$ that means $y = Bx$ for some $x.$ look at $Ay = ABx = 0$ because $AB = 0.$ now we have shown that for any $y \in im B $ implies $Ay = 0$ so $y \in kerA$ we are done showing if $AB = 0$, then $im B \subset ker A$
suppose $im B \subset ker A,$ we need to show $AB = 0$ we will show it by contradiction. suppose $AB \neq 0.$ that means there is an $x$ such that $ABx \neq 0$ since $Bx \in im B$ and $im B \subset ker A$. that means $Bx \in kerA$  and $ABx = 0$ the contradiction we sought.