<s>[INST] Image and Kernel of a linear transformation from a matrix to a polynomial Let the following be the linear transformation for $T$ from a $2$ x $2$ matrix to a second degree polynomial.
$T\begin{pmatrix}a&b\\ c&d\end{pmatrix}=\left(a-c\right)x^2+c\left(x-1\right)+b$
Find a basis for $Im(T)$ and $Ker(T)$.
So this is what I did to find the kernel.
I rearranged the equation to get:
$\left(a-c\right)x^2+\left(c\right)x+\left(-c+b\right)$
So I tried to set everything in the brackets to $0$ and then got that:
$a=c=0,\:b=0,\:d=free$
This led me to think that a basis for $Ker(T)$ would be:
$\left\{\begin{pmatrix}0&0\\ 0&1\end{pmatrix}\right\}$
For the $Im(T)$, I rearranged the equation to get:
$a\left(x^2\right)+b+c\left(-x^2+x-1\right)$
This gave me the following basis:
$\left\{x^2,\:1,\:-x^2+x-1\right\}$
Which had the following matrix:
$\begin{pmatrix}1&0&-1\\ 0&0&1\\ 0&1&-1\end{pmatrix}$
But all three columns of this matrix are linearly independent, which doesn't make any sense as the kernel I have calculated has dimension $1$.
Does anyone know where I have gone wrong here?
Thank you!
 [/INST] Use a systematic approach. Let
$$
E_1=\begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix},\quad
E_2=\begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix},\quad
E_3=\begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix},\quad
E_4=\begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix}
$$
and let $p_1=1$, $p_2=x$, $p_3=x^2$. Then
\begin{align}
TE_1&=p_3\\
TE_2&=p_1\\
TE_3&=p_2-p_3\\
TE_4&=0
\end{align}
so the matrix of $T$ with respect to the bases $\{E_1,E_2,E_3,E_4\}$ and $\{p_1,p_2,p_3\}$ is
$$
A=\begin{pmatrix}
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 0 \\
1 & 0 & -1 & 0
\end{pmatrix}
$$
The RREF of $A$ is
$$
U=\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 0
\end{pmatrix}
$$
which has rank $3$. Therefore the image of $T$ is the whole codomain.
The null space of $U$ (and of $A$) is generated by
\begin{pmatrix} 0 \\ 0 \\ 0 \\ 1 \end{pmatrix}
which says that the kernel of $T$ is generated by $E_4$.

You can also go the hard way, but it's much simpler to observe that
$$
p_1=TE_2,\quad
p_2=T(E_3+E_2),\quad
p_3=TE_1
$$
so the image is the whole space. Moreover $E_4$ clearly belongs to the kernel. By the rank-nullity theorem, the kernel has dimension $1$, so it is generated by $E_4$.
</s>