Defining an isomorphism that is an inverse of an non-invertible linear transformation? Let $T: V \to V$ be a linear mapping such that $B = \{v_1, ..., v_n\}$ is a basis for $V$ and $C = \{v_r , ..., v_n\}$ is a basis for $\operatorname{Ker}(T)$. Prove that there exists an isomorphism $S: V \to V$ such that $T\circ S \circ T = T$ by defining it.
 A: Since all the maps involved are linear, we just need to show that $TST(v_i) = T(v_i)$ for all $i$. Moreover, we can define the maps solely on the basis vectors. Note also that $T(V)$ is spanned by $v_1, \dots, v_{r-1}$.

Consider $v_1 = (1, 0), v_2 = (0, 1)$, and $C = \{ (0, 1) \}$. Let 
$$T: v_1 \mapsto 2 v_1 \\ \ \ \ \  v_2 \mapsto 0
% apologies for the awful spacing hack here$$
Then we see that $S: v_1 \mapsto \frac{1}{2} v_1; v_2 \mapsto v_2$ works.

This highlights the general fact that we can set $S$ to be the identity on $\text{Ker}(T)$. Indeed, since we're applying $T$ after $S$, anything that $S$ somehow sends to the kernel will be killed by $T$. Therefore the only things we can allow $S$ to send to the kernel must already be in the kernel. To be totally concrete: if $u$ is in the kernel of $T$, then $TST(u) = TS(0) = 0$, while $T(u) = 0$. Conversely, if $S$ mapped anything non-kernel into the kernel of $T$, then $TST(v)$ would be zero for some $v$, despite $T(v)$ not being zero.

Now, what about the image? Let's write $T(v_1) = u_1$, and so on up to $u_{r-1} = T(v_{r-1})$. Then the $u_i$ form a basis of $\text{Im}(T)$ because there are enough of them to span, and they are linearly independent since the $v_i$ were.
We just need to determine $S$'s action on the $u_i$. Notice that $TST(v_i) = TS(u_i) = T(v_i)$, so what we want to do is set $S(u_i) = v_i$. Fortunately, we can do that!

Summary: Let $u_i$ be the basis of $\text{Im}(T)$ given by $T(v_i)$ for $i=1, \dots, r-1$. Then define $S$ by $S(u_i) = v_i$ for $i=1, \dots, r-1$, and extend linearly to define $S$ on $\text{Im}(T)$. Define $S(v_j) = v_j$ for $j \geq r$, and extend linearly to define $S$ on all of $V$.
