Exercise 10, Section 3.4 of Hoffman’s Linear Algebra 
We have seen that the linear operator $T$ on $R^2$ defined by $T(x_1, x_2) = (x_1, 0)$ is represented in the standard ordered basis by the matrix $A=\begin{bmatrix} 1 & 0\\ 0 & 0\\ \end{bmatrix}$. This operator satisfies $T^2 = T$. Prove that if $S$ is a linear operator on $R^2$ such that $S^2=S$, then $S=0$, or $S=I$, or there is an ordered basis $B$ for $R^2$ such that $[S]_B = A$ (above).

There are lots of way to prove this problem. I’m trying to show, if $S\neq 0$ and $S\neq I$, then $\exists B$ ordered basis of $R^2$ such that $[S]_B=A$. So $\exists \alpha_1,\alpha_2\in \Bbb{R}^2$ such that $S(\alpha_1)\neq (0,0)$ and $S(\alpha_2)\neq \alpha_2$. How to progress from here?
 A: If you're familiar with the idea of diagonalization, then since $S$ satisfies $S^2=S$ and is an operator on $\mathbb{R}^2$, the characteristic polynomial of $S$ is then $p(z)=z^2-z$. Since $S\neq I$ and $S\neq 0$, it must be that the minimal polynomial of $S$ is $m(z)=z(z-1)$, and hence $S$ has two eigenvalues - $0$ and  $1$ and is diagonalizable. Hence there exists an ordered basis $B$ s.t $[S]_B=A$.
Even if you're not familiar with this, we can use this as motivation to the following solution. Note that if $\ker{S}={0}$, then $S$ is an isomorphism. Therefore, for every $w\in\mathbb{R}^2$ there exists some $v\in\mathbb{R}^2$ s.t $S(v)=w$. Now: $S(w)=S^2(v)=S(v)=w$, hence $S=I$. So we must have that $\dim\ker(S)=1$ and $\dim\text{Im}(S)=1$. Now let $v_1\neq 0\in\ker(S)$ and $v_2\neq 0\in\text{Im}(S)$. I claim that $B=\{v_2,v_1\}$ is the desired basis.
Indeed, since $v_1\in\ker(S)$, $S(v_1)=0=0\cdot v_1+0\cdot v_2$. Since $v_2\in\text{Im}(S)$, I can write $v_2=S(w)$ for some $w\in\mathbb{R}^2$. But since $S^2(w)=S(w)$, we have that:$$S(v_2)=S^2(w)=S(w)=v_2=0\cdot v_1+1\cdot v_2$$
Finally we have:$$[S]_B=\begin{pmatrix}1&&0\\0&&0\end{pmatrix}$$
as desired.
A: Expanding on a way from my hint:
You noted if $S \neq 0$ and $S \neq I$, we must have vectors $\alpha_1, \alpha_2 \in \mathbb{R}^2$ with $S \alpha_1 \neq 0$ and $S \alpha_2 \neq \alpha_2$. To satisfy $[S]_B = A$, the vectors $\beta_1, \beta_2 \in \mathbb{R}^2$ of $B$ must not be the zero vector, and must satisfy
$$ S \beta_1 = 1 \beta_1 + 0 \beta_2 = \beta_1 $$
$$ S \beta_2 = 0 \beta_1 + 0 \beta_2 = 0 $$
For $\beta_1$, we see $S \alpha_1 \neq 0$, and $S(S \alpha_1) = S^2 \alpha_1 = S \alpha_1$. So let's try just $\beta_1 = S \alpha_1$.
Since $S \alpha_2 \neq \alpha_2$, $S \alpha_2 - \alpha_2 \neq 0$. Applying $S$ to this difference gives
$$ S(S \alpha_2 - \alpha_2) = S^2 \alpha_2 - S \alpha_2 = S \alpha_2 - S \alpha_2 = 0 $$
So $S \alpha_2 - \alpha_2$ is a non-zero vector which $S$ maps to zero. (It's in the null space of $S$.) That's what we need from $\beta_2$, so let's try saying $\beta_2 = S \alpha_2 - \alpha_2$.
Now to check, is $(\beta_1, \beta_2)$ actually a basis of $\mathbb{R}^2$? If $c_1 \beta_1 + c_2 \beta_2 = 0$, then
$$ 0 = S(c_1 \beta_1 + c_2 \beta_2) = c_1 S \beta_1 + c_2 S \beta_2 = c_1 S \beta_1 $$
and since $S \beta_1 \neq 0$, this means $c_1 = 0$. Then $c_1 0 + c_2 \beta_2 = 0$, but $\beta_2 \neq 0$ so $c_2 = 0$ also. So yes, $B = (\beta_1, \beta_2) = (S \alpha_1, S \alpha_2 - \alpha_2)$ is a basis, with $[S]_B = A$.
