TITLE: Let $A,B,C$ be $n \times n$ square real matrices with $ABC=0$. What is the maximum rank of $CBA$?
QUESTION [5 upvotes]: Let $A,B,C$ be $n \times n$ square real matrices with $ABC=0$. What is the maximum rank of $CBA$?

From an old written examination.
I've looked at the kernel and range of each matrix for simple cases (like if $n=2$), but how can we generalize to any $n$?

REPLY [2 votes]: In general, the nullity of a product $\DeclareMathOperator{\rank}{rank}AB$ satisfies
$$\max\{\dim \ker A, \dim \ker B\} \leq \dim \ker (AB) \leq \dim \ker A + \dim \ker B.$$
In our case we have
$$n = \dim \ker (ABC) \leq \dim \ker A + \dim \ker B + \dim \ker C,$$ so at least one of $A, B, C$ has kernel of dimension $\geq \left\lceil \frac{n}{3} \right\rceil$. Thus, $$\ker (CBA) \geq \max\{\ker A, \ker B, \ker C\} \geq \left\lceil \frac{n}{3} \right\rceil$$
and hence by the Rank-Nullity Theorem,
$$\rank (CBA) \leq n - \left\lceil \frac{n}{3} \right\rceil = \left\lfloor \frac{2n}{3} \right\rfloor.$$
We can prove that this bound is sharp by exhibiting a triple $(A, B, C)$ that achieves it. We can see that it's enough find matrices $\alpha, \beta, \gamma$ that respectively solve the problem for $n = 3$. Then, for any $n$, we can set
$$A = \underbrace{\alpha \oplus \cdots \oplus \alpha}_{\left\lfloor\frac{n}{3}\right\rfloor} \oplus 0 ,$$ where $0$ is the $0 \times 0$ matrix of size $r \times r$, where $r$ is the remainder of $n$ modulo $3$, and define $B$ and $C$ similarly. I don't know a good way to find a $3 \times 3$ solution except by trial and error. A short script that tries random $(0, 1)$-matrices yields the pleasant-looking solution
$$\alpha = \pmatrix{0&1&0\\0&0&1\\0&0&0}, \qquad \beta = \pmatrix{0&1&0\\1&0&0\\0&0&0}, \qquad \gamma = \pmatrix{0&0&0\\0&1&0\\1&0&0} .$$