Let $P$ be the operator on $R^2$ which projects each vector onto the $x$-axis, parallel to the $y$-axis: $P(x,y)=(x, 0)$. Show that $P$ is linear. What is the minimal polynomial for $P$?
My attempt: Let $(x,y),(r,s)\in \Bbb{R}^2$ and $c\in F$. Then $P(c(x,y)+(r,s))=P(cx+r,cy+s)=(cx+r,0)=c(x,0)+(r,0)=cP(x,y)+P(r,s)$. Thus $P$ is linear. Let $B=\{e_1,e_2\}$ be standard basis of $\Bbb{R}^2$. Then $P(e_1)=(1,0)$ and $P(e_2)=(0,0)$. So $[P]_B=\begin{bmatrix} 1&0\\ 0&0\\ \end{bmatrix}$. Thus $\exists B$ basis of $\Bbb{R^2}$ such that $[P]_B$ is diagonal. So $P$ is diagonalizable. Characteristic polynomial function of $P$ is $f:\Bbb{R}\to \Bbb{R}$ such that $f(x)=\det (xI_2-[P]_B)=(x-1)x$, $\forall x\in \Bbb{R}$. So $0,1$ are distinct eigenvalue of $P$. By this post, minimal polynomial of $P$ is $m=(x-1)x$. Is my proof correct?
Edit: User Anne Bauval comment made me realize, I unnecessary computed characteristic polynomial. Since $P$ is diagonalizable, I get eigenvalue directly from diagonal of matrix $[P]_B$. No need to compute characteristic polynomial. I would like to add one more point which I thought about recently. Let $V$ be $n$-dimensional vector space over $F$ and $T\in L(V,V)$. Suppose $T$ is diagonalizable. Then $\exists B$ basis of $V$ such that $[T]_B$ is diagonal, i.e. $[T]_B=\begin{bmatrix}c_1 & &\\ & \ddots & \\ & & c_n\end{bmatrix}$. We claim $c_1,…,c_n$ are all eigenvalues of $T$. Assume towards contradiction, $\exists c_{n+1}\in F$ such that $c_{n+1}$ is eigenvalue of $T$ and $c_{n+1}\neq c_i$, $\forall i\in J_n$. Characteristic polynomial of $T$ is $f(x)=\det (xI_n-[T]_B)=(x-c_1)\cdots (x-c_n)$, $\forall x\in F$. Since $c_{n+1}$ is eigenvalue of $T$, we have $f(c_{n+1})=(c_{n+1}-c_1)\cdots (c_{n+1}-c_n)=0$. Which implies $c_{n+1}-c_j=0$, for some $j\in J_n$. So $c_{n+1}=c_j$. Thus we reach contradiction. Hence $c_1,…,c_n$ are all eigenvalues of $T$.