TITLE: When is $\ker AB = \ker A + \ker B$?
QUESTION [21 upvotes]: Prove/ Disprove: Let $n$ be a positive integer. Let $A$, $B$ be two $n \times n$ square matrices over the complex numbers. If $AB = BA$ and $\ker A = \ker A^2$ and $\ker B = \ker B^2$ 
then $\ker AB = \ker A + \ker B$.
(Recall that $\ker A$ is the set of all vectors $v$ such that $Av = 0$.)
Background: I am teaching linear algebra this semester. I did not like the standard proof of the Jordan canonical form I found in the textbooks, and thought I could prove it differently, directly from the axioms for a vector space, without using either the determinant, or the classification theorem for finite abelian groups. If the statement above is true, I believe I have a proof for the Jordan canonical form for $T$ by setting $A = (T-\lambda_1I)^{n_1}$ and $B=(T-\lambda_2I)^{n_2}$ for appropriate $n_1$ and $n_2$.
Note 1: If $A = B =  \left( \begin{array}{cc}
0 & 1\\\0 & 0 \end{array} \right)$ then $AB = BA$ but $\ker AB \neq \ker A + \ker B$.
Note 2: It is easy to find $A, B$ such that $\ker A = \ker A^2$ and $\ker B = \ker B^2$ and $B$ maps a vector outside $\ker A + \ker B$ to $\ker A$, so that $\ker AB \neq \ker A + \ker B$.
Hence, both conditions are necessary.

REPLY [7 votes]: Here's another statement of more or less the same result. The ideas in the proof are from this proof in German that Martin Brandenburg linked to in his comment. 
Claim:  Let $n$ be a non-negative integer. Let $A$, $B$ be two $n×n$ square matrices over the complex numbers. If $AB=BA$ and $\ker A \cap \ker B = \{0\}$ then $\ker AB=\ker A \bigoplus \ker B$.
Note: Assuming that $\ker A\cap\ker B=\{0\}$ is not a big restriction, since we can always quotient out to eventually reduce to this case.
Proof: Since $A,B$ commute, it is clear that $\ker A \bigoplus \ker B\subseteq \ker AB$. Further,  $\ker AB$ is invariant under $A, B$. Since all the action is taking place within $\ker AB$, we may assume without loss of generality that $\ker AB$ is the entire space, of dimension $n$. This implies $\operatorname{im} B\subseteq \ker A$.
By the rank-nullity theorem, $\dim\ker B + \dim\operatorname{im} B = n$.  Hence, $\dim\ker A + \dim\ker B\geq n$. Since these spaces intersect trivially by assumption, we are done.