Kernel and diagonalizability of endomorphism $f:\mathbb{R_2[x] \to R_2[x]}$ such that $f(p)=p(1)x^2-p(k),$ for $k \in \mathbb{R}$. Problem: 
Let $f:\mathbb{R_2[x] \to R_2[x]}$ be the endomorphism on the space of polynomials of degree less or equal than two such that $$f(p)=p(1)x^2-p(k),$$ for $k \in \mathbb{R}$. I have to determine $Ker(f)$ and find out for which values of $k$ this endomorphism is diagonalizable. 
My work:
I've seen that $Ker(f)$ should have dimension $2$ if $k\neq1$, dimension $1$ otherwise, but I wasn't able to find the bases corresponding to these cases. For the second point I got that it is diagonalizable if $-1<k<1$: in particular, the charateristic polynomial splits for $-1\leq k\leq1$, but in the cases $k=+1$ and $k=-1$ it is not diagonalizable. Is this result correct?
My question:
The presence of polynomials confuses me a bit and I would really like to see an exemplary complete solution of this problem: could you show me how to proceed in this solution?
Thank you very much in advance.
Note: I've not studied row reduction nor Gram–Schmidt.
 A: Let us first "get rid" of the polynomials by introcducing coordinates. 
We have that $B=(1,X,X^2)$ is a basis. Since $f(1) = X^2 -1$, $f(X) = X^2 -k$, and $f(X^2) = X^2 -k^2$, we get that the matrix representing $f$ with respect to $B$ is 
$$M = \begin{pmatrix} -1 & -k & -k^2 \\ 0 & 0 & 0 \\ 1 & 1 & 1 \end{pmatrix}.$$ 
Computing the kernel:
To compute the kernel we have to solve the linear system given by  $Mv=0$. There are various ways to do this. As you say you do not want to do row-reduction let us write it out explicitly:
$$ -v_1 -kv_2 - k^2 v_3 = 0 $$
$$ v_1 + v_2 + v_3 = 0$$
This is equivalent to 
$$ v_1 + v_2 + v_3 = 0$$
$$  (-k+1)v_2 +(- k^2+1) v_3 = 0 $$


*

*if $k \neq 1$ then $v_2 = -(k +1)v_3$ and $v_1 = kv_3$  and the only solutions are $(kt,-(k+1)t,t)$ for $t \in \mathbb{R}$. 

*if $k=1$,  then $v_2,v_3$ can be whatever, and $v_1 = -v_2-v_3$ and the solutions are $(-t-s,s,t)$ with $t,s \in \mathbb{R}$.
In the first case the kernel is generated by the polynomial $k -(k+1)X+X^2$. In the second case the kernel is given by $\{-t-s + sX +t X^2 \colon s, t \in \mathbb{R} \}$, and a basis would be $-1 +X$ and $-1  +X^2$. (Note that here we should go back to considering actually the polynomials, as the kernel needs to be a subspace of the polynomial space not of $\mathbb{R}^3$.) 
Checking if it is diagonalizable:
We start by computing the characteristic polynomial $\det(M - \lambda I_3)$. It is $-\lambda^3 -k^2\lambda +\lambda = -\lambda (\lambda^2 + (k^2 -1))$. 
There are several cases: 


*

*if $k^2-1> 0$, that is $|k|> 1$ then the polynomial does not decompose into linear factors over $\mathbb{R}$ and the endomorphism is thus not diagonalizable. (If you would work over the complex numbers instead it would be diaginalizable, as we would have three distinct roots.)   

*if $k^2 - 1 < 0$, that is $|k| < 1$, then the polynomial has three distinct real roots and thus $f$ is diagonalizable 

*if $k^2 -1 = 0$, then the only root is $0$. In this case for it to be diagonalizable the kernel would have to have dimension $3$, which it clear does not (the matrix is not the $0$-matrix). 
Commentary on your work: 


*

*It is likely that you just made a typo and meant the dimension is $2$ for $k=1$ in which case you likely did the correct thing. If not something is wrong. 

*The result for the chracteristic polynomial is correct.
