Let $S:U\rightarrow V, \ T:V\rightarrow W$ and if $S$ and $T$ are both injective/surjective, is $T\circ S$ injective/surjective?

Both are actually true.

For injectivity, we have to prove that $TS(u)=TS(u')$ implies $u=u'$ for all $u,u'\in U$. Now if $T$ is injective, $$TS(u)=TS(u')\Rightarrow S(u)=S(u'),$$and if $S$ is injective as well, $$S(u)=S(u')\Rightarrow u=u'.$$

For surjectivity, we need to show that for all $w\in W$, it is possible to find $u\in U$ such that $TS(u)=w$. If $T$ is surjective, then there must be $v\in V$ such that $T(v)=w$; and if $S$ is surjective as well, then there must exist $u\in U$ such that $S(u)=v$. We then have $$TS(u)=T(S(u))=T(v)=w.$$

Notice that I never supposed here that $T,S$ were linear or even that $U,V,W$ were vector spaces; this is actually true for any functions between sets.


You have to show that for any $w\in W$ there is $u \in U$ such that $TS(u) =w$.

Let $w \in W$ be any vector. Since $T$ is surjective, there is $v \in V$ such that $T(v)=w$. Now, since $S$ is surjective, there is $u \in U$ such that $S(u) = v$. It follows that

$$ TS(u)=T(S(u))=T(v)=w$$

so $TS$ is surjective.

Injectivity is similar.