Inequality of Linear Maps Let $U, V, W$ be vector spaces where $U$ is finite dimensional. Suppose that $T$ is a linear map from $V$ to $U$ and $S$ is a linear map from $U$ to $W$. Show that
$${\rm rank} S+{\rm rank} T \leq {\rm rank} ST+\dim U$$
and determine when equality holds.
It seems that the rank nullity theorem could somehow be used here, but I'm not quite sure where to start.
 A: As you mentioned, apply rank-nullity. We can start by writing
$$\begin{cases}
{\rm rank} S + {\rm nul} S = \dim U \\
{\rm rank} T + {\rm nul} T = \dim V \\
\dim V = {\rm rank} ST + {\rm nul} ST
\end{cases}$$
Adding the equations together yields
$${\rm rank} S + {\rm rank} T + {\rm nul} S + {\rm nul} T = \dim U + {\rm rank} ST + {\rm nul} ST$$
Now, we claim that ${\rm nul} ST \le {\rm nul} S + {\rm nul} T$. There are a few ways to go about proving this, but the most straightforward in my opinion is to consider the restriction of $T$ to ${\rm Ker} ST \subseteq V$, the subspace of vectors $v \in V$ such that $ST v = 0$. Let's call this restriction $T' : {\rm Ker} ST \mapsto U$. By rank-nullity again, ${\rm nul} ST = {\rm rank} T' + {\rm nul} T'$. Consider arbitrary $u \in {\rm Im} T'$. There exists $v \in {\rm Ker} ST \implies ST v = 0$ such that $T v = u$. Then obviously $S u = 0 \implies u \in {\rm Ker} S$, so we have that ${\rm Im} T' \subseteq {\rm Ker} S \implies {\rm rank} T' \le {\rm nul} S$. Now, consider arbitrary $v \in {\rm Ker} T$. Then $T v = 0 \implies ST v = 0 \implies v \in {\rm Ker} ST$, the domain of $T'$. Therefore, ${\rm nul} T' = {\rm nul} T$. Putting everything together, ${\rm nul} ST \le {\rm nul} S + {\rm nul} T$.
Substituting this into the equation developed at first gives the desired inequality.
Looking at the steps above, equality holds whenever ${\rm Ker} S \subseteq {\rm Im} T'$. This condition is equivalent to ${\rm Ker} S \subseteq {\rm Im} T$. The forward implication is trivial. To show the reverse, consider arbitrary $u \in {\rm Ker} S$. This implies both $S u = 0$ and $u \in {\rm Im} T$, so there exists $v \in V$ such that $u = T v$. Taken together, this means $ST v = 0$, so in fact $v \in {\rm Ker} ST$, the domain of $T'$. Thus, $u \in {\rm Im} T'$ as desired.
So, equality holds whenever the kernel of $S$ is contained in the image of $T$.
EDIT: In the case where $V$ is not finite-dimensional, the equation developed at first does not follow from the system of rank-nullity equations. However, we can proceed in a similar fashion.
We claim that ${\rm rank} T \le {\rm rank} ST + {\rm nul} S$. To show this, we begin by considering another restriction, this time of $S$ on ${\rm Im} T$, which is finite-dimensional since ${\rm Im} T \subseteq U$. Denote this restriction $S' : {\rm Im} T \mapsto W$. By rank-nullity on $S'$, ${\rm rank} T = {\rm rank} S' + {\rm nul} S'$. We have that ${\rm Im} S' = {\rm Im} ST$. For consider arbitrary $w \in {\rm Im} S'$; this means there exists $u \in {\rm Im} T$, and thus a corresponding $v \in V$, such that $w = S u = ST v$, so $w \in {\rm Im} ST$. And for arbitrary $w \in {\rm Im} ST$, there exists $v \in V$ such that $w = ST v$; clearly $T v \in {\rm Im} T$, so it must be that $w \in {\rm Im} S'$. From this, ${\rm rank} S' = {\rm rank} ST$. Trivially, ${\rm Ker} S' \subseteq {\rm Ker} S$, so ${\rm nul} S' \le {\rm nul} S$. Putting things together, ${\rm rank} T = {\rm rank} S' + {\rm nul} S' \le {\rm rank} ST + {\rm nul} S$, as desired.
Finally, adding ${\rm rank} S$ to both sides of the above inequality yields
$${\rm rank} S + {\rm rank} T \le {\rm rank} ST + \underbrace{{\rm nul} S + {\rm rank} S}_{\dim U}$$
Same as before, you can see that equality holds if and when ${\rm Ker} S \subseteq {\rm Im} T$.
