<s>[INST] Matrix of a linear transformation in a different basis Let $A : \mathbb{R_2}[x] \rightarrow \mathbb{R_2}[x]$be a linear transormation that has in a basis $\{1,x,x^2\}$ a given matrix:
$$
\begin{bmatrix}
1 & 1 & 0\\
0 & 1 & 2\\
0 & 0 & 1
\end{bmatrix}
$$
Find the matrix of the transformation in a basis $\{1+x,x+x^2,1+x^2\}$.
Attempted solution:
I've calculated from the given matrix: $A(1) = x^2, A(x) = x^2 + x, A(x^2) = 2x+1$
Then I've calculated from these: $A(1+x) = 2x^2+x, A(x+x^2) = x^2+3x+1, A(1+x^2) = x^2+x+x+1$
I'm stuck here since i can't seem to factor polynomials from the second basis out of all of these expresions. Any help would be appreciated
 [/INST] I think that you may have mixed up how your basis is acting a little bit. The standard convention is to have the transformation act on a column vector by matrix multiplication from the left.
$$\begin{array}{||c||ccc||}
    \hline\hline
        &1  &x  &x^2  \\
    \hline\hline
    1   &1&1&0\\
    x   &0          &1&2\\
    x^2   &0&0&1          \\
    \hline\hline
\end{array}$$
and we can compute
$$A(1) = \begin{pmatrix}1&1&0\\ 0&1&2\\ 0&0&1\end{pmatrix}\begin{pmatrix}1\\ 0\\ 0\end{pmatrix} = 1.$$
And similarly, $A(x) = 1 + x$ and $A(x^2) = 2x + x^2$. Now we need to express these basis vectors with respect to our new desired basis. If we let $e_1 = 1 + x$, $e_2 = x + x^2$, and $e_3 = 1 + x^2$, then we can see that $1 = \frac{1}{2}(e_1 - e_2 + e_3),\, x = \frac{1}{2}(e_1 + e_2 - e_3),$ and $x^2 = \frac{1}{2}(-e_1 + e_2 + e_3)$. We also have that $A(1) = \frac{1}{2}(e_1 - e_2 + e_3),\, A(x) = e_1,$ and $A(x^2) = \frac{1}{2}(-e_1 + 3e_2 + e_3)$. This means that if we wanted to write the change of basis matrix from our basis $\{1,x,x^2\}$ to the basis $\{1 + x, x + x^2, 1 + x^2\}$, we could represent it by
$$B = \begin{pmatrix}\frac{1}{2}&\frac{1}{2}&-\frac{1}{2}\\ -\frac{1}{2}&\frac{1}{2}&\frac{1}{2}\\ \frac{1}{2}&-\frac{1}{2}&\frac{1}{2}
\end{pmatrix}$$
(to get this, just note that the columns come from rewriting the old basis vectors in terms of the new basis vectors as shown above). Now, the fastest way to compute the transformation would be to just take any vector that is written with respect to our new basis, transform it back to the original basis, apply $A$, and then transform it back to the desired basis once more. So, we can just conjugate by $B$ to get that the transformation matrix with respect to our new basis is given by
$\tilde{A} = BAB^{-1}$. A quick computation shows that
$$B^{-1} = \begin{pmatrix} 1 & 0 & 1\\ 1 & 1 & 0\\ 0 & 1 & 1\end{pmatrix},$$
and once we multiply everything out, we get the final answer
$$\tilde{A} = \begin{pmatrix}\frac{3}{2}&\frac{3}{2}&1\\-\frac{1}{2}&\frac{3}{2}&1\\\frac{1}{2}&-\frac{1}{2}&0\end{pmatrix}.$$
Fun math note: Something that you might realize after this presentation is that to compute a transformation with respect to any coordinate system you will need to use conjugation. This is not an accident! In fact, with this, we have made a profound observation about the structure of the space itself. In group theory, we can see this as saying something about the set of automorphisms on a group, and in differential geometry, you can use this structure to derive coordinate-independent formulas for geometric structures. Long story short, conjugation is a super common operation that has a lot of nice properties, and you will want to keep it in mind as you move forward in mathematics.
</s>