Prove that dim(nullspace($ST$)) = dim(nullspace($T$)) + dim(range($T$) ∩ nullspace($S$)). Suppose $U$ is a finite-dimensional vector spaces, that $S$ ∈ $L(V,W)$, and that $T$ ∈ $L(U, V )$. 
Prove that dim(nullspace($ST$)) = dim(nullspace($T$)) + dim(range($T$) ∩ nullspace($S$)).
$S\circ T: U \rightarrow W$
Intuitively, I understand that N($T$) $\subseteq$ N($ST$), since if $T$ sends $x\in U$ to $0$, then by default $S\circ T$ sends $x$ to $0$ too.
If $T$ does not send $x$ to $0$, then $T(x)$ would land in $R(T)$, but to be in the N(ST), this particular $T(x)$ must also be in N(S). (Both R($T$) and N($S$) are subspace of $V$).
Thus it makes sense for dim(N($ST$)) = dim(N($T$)) + dim(R($T$) ∩ N($S$)).
But how do I translate this into a precise proof.
any help or insights is deeply appreciated.  
 A: As what you follow, we want to show that 
$$\dim(R(T))-\dim(R(ST))
=\dim(R(T)\cap N(S)).$$
We first point out $U$ be finite-dimensional, and
$T\in L(U,V)$ and $ST\in L(U,W)$. Then by the dimension theorem, both $R(T)$ and $R(ST)$ are
finite-dimensional, and so is $R(T)\cap N(S)$.
Let $\gamma=\{v_1,v_2,\ldots,v_k\}$ be a basis for
$R(T)\cap N(S)$, extend $\gamma$ to a basis
$\beta=\{v_1,v_2,\ldots,v_k,v_{k+1},\ldots,v_m\}$ for $R(T)$.
It suffices to claim that the following set
$$\alpha=\{S(v_{k+1}),S(v_{k+2}),\ldots,S(v_m)\}$$
is a basis for $R(ST)$.


*

*Given $w\in R(ST)$, then we can write $w=ST(u)$ for some $u\in U$. Since $T(u)\in R(T)$, we can write $T(u)=\displaystyle\sum_{i=1}^mc_iv_i$ for some scalars $c_1,c_2,\ldots,c_m\in F$. Thus
we have
$$w=S\left(\sum_{i=1}^mc_iv_i\right)=\sum_{i=1}^mc_iS(v_i)
=\sum_{i=k+1}^mc_iS(v_i),$$
that is, $\alpha$ generates $R(ST)$.

*Suppose that given $a_{k+1},a_{k+2},\ldots,a_m\in F$ such that
$\displaystyle\sum_{i=k+1}^ma_iS(v_i)={\it 0}$, then
\begin{align*}
{\it 0}
=\sum_{i=k+1}^ma_iS(v_i)
=S\left(\sum_{i=k+1}^ma_iv_i\right).
\end{align*}
It follows that 
$\displaystyle\sum_{i=k+1}^ma_iv_i\in N(S)$, and then 
$\displaystyle\sum_{i=k+1}^ma_iv_i\in R(T)\cap N(S)$. So there
exist scalars $b_1,b_2,\ldots,b_k\in F$ such that
$$\sum_{i=k+1}^ma_iv_i=\sum_{i=1}^kb_iv_i\quad\mbox{or}\quad
\sum_{i=1}^k(-b_i)v_i+\sum_{i=k+1}^ma_iv_i={\it 0}.$$
Because $\beta$ is a basis for $R(T)$, we have
$a_{k+1}=a_{k+2}=\cdots=a_m=0$. Hence $\alpha$ is linearly independent.


By checking the above two facts, we conclude that $\alpha$ is a basis for $R(ST)$, and therefore
$$\dim(R(T))-\dim(R(ST))
=m-(m-k)
=k
=\dim(R(T)\cap N(S)).$$
