Solution (source code)

= Solution

For a <linear map> $T:U\to V$, its <rank of a linear map> is $\dim\operatorname{im}T$, and its <nullity> is $\dim\ker T$. The <rank-nullity theorem> states $\dim U=\operatorname{rank}T+\operatorname{nullity}T$. One obtains it by extending a <basis> of the kernel to a <basis> of $U$; the images of the added vectors form a <basis> of the image.

Restrict $\beta$ to $A=\operatorname{im}\alpha$. Its image is $\operatorname{im}(\beta\alpha)$ and its kernel is $A\cap\ker\beta$. Thus
$$
\operatorname{rank}(\beta\alpha)=\operatorname{rank}\alpha-\dim(A\cap\ker\beta).
$$
The intersection dimension is at most $\dim\ker\beta=\dim V-\operatorname{rank}\beta$, proving the lower bound. It is nonnegative, proving the upper bound by $\operatorname{rank}\alpha$, while $\operatorname{im}(\beta\alpha)\subseteq\operatorname{im}\beta$ proves the other upper bound. Consequently the <rank inequality for a composition> is
$$
\boxed{\operatorname{rank}\alpha+\operatorname{rank}\beta-\dim V\le\operatorname{rank}(\beta\alpha)\le\min(\operatorname{rank}\alpha,\operatorname{rank}\beta).}
$$