# How to find bases $\alpha$ and $\beta$ for the following $P_3(\Bbb{R})$ and $P_2(\Bbb{R})$?

Suppose a linear transformation $T:P_3(\Bbb{R})\rightarrow P_2(\Bbb{R})$ has the matrix $A=\begin{bmatrix} 1 &2 & 0 & 0 \\ 0 & 1 & 2& 1 \\ 1 & 1 & 1 & 1 \\ \end{bmatrix}$ relative to the standard bases of $P_3(\Bbb{R})$ and $P_2(\Bbb{R})$. How to to find bases $\alpha$ of $P_3(\Bbb{R})$ and $\beta$ for $P_2(\Bbb{R})$ such

that the matrix $T$ relative to $\alpha$ and $\beta$ is the reduced row-echelon form of $A$?

I assume we have to use change of basis formula. I have difficulty to start this type of question

because it's hard to identity the $[I]$ and $[T]$. Here the question says $A$ is relative to the standard

bases of $P_3(\Bbb{R})$ and $P_2(\Bbb{R})$ so I think $[\alpha]_\gamma$ and $[\beta]_\gamma$ are respectively $[1, x, x^2, x^3]$ and $[1, x, x^2]$. But

then I don't know how to continue because I am not sure how $A$ works and how to write the change

of basis formula.

If you subtract to the third line the fist line and sum the second you get the matrix $$\begin{pmatrix} 1 & 2 & 0 & 0\\ 0 & 1 &2 &1 \\0&0&3&2 \end{pmatrix}= \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 &0 \\-1 &1&1 \end{pmatrix} \begin{pmatrix} 1 & 2 & 0 & 0\\ 0 & 1 &2 &1 \\1&1&1&1 \end{pmatrix}$$ the matrix $\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 &0 \\-1 &1&1 \end{pmatrix}$ is the matrix of the identity application from the canonical basis to the basis you want (in the codomain, because t's on the left of $A$. You don't need to change the basis in the domain, because there's no need to work on the columns therefore not to multiply for a matrix on the right). Then to find the new basis in terms of $1,x,x^2$ find the inverse (that is, the matrix of the identity application from the new basis to the canonical one) which is $$\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 &0 \\1 &-1&1 \end{pmatrix}$$ As you can see from this matrix, the new basis is $\beta =\{1+x^2,x-x^2,x^2 \}$.
Note that for any matrix $A$ there is an invertible matrix $E$ such that $\DeclareMathOperator{rref}{rref}EA=\rref A$. One computes $E$ by keeping track of the row reductions. In our case, we have \begin{align*} A &= \left[\begin{array}{rrrr} 1 & 2 & 0 & 0 \\ 0 & 1 & 2 & 1 \\ 1 & 1 & 1 & 1 \end{array}\right] & E &= \left[\begin{array}{rrr} -\frac{1}{3} & -\frac{2}{3} & \frac{4}{3} \\ \frac{2}{3} & \frac{1}{3} & -\frac{2}{3} \\ -\frac{1}{3} & \frac{1}{3} & \frac{1}{3} \end{array}\right] & \rref A &= \left[\begin{array}{rrrr} 1 & 0 & 0 & \frac{2}{3} \\ 0 & 1 & 0 & -\frac{1}{3} \\ 0 & 0 & 1 & \frac{2}{3} \end{array}\right] \end{align*} Note that $E$ is invertible, being the product of elementary matrices. This implies that $E$ is the change of basis matrix corresponding to the basis \begin{align*} p_1 &= -\frac{1}{3}+\frac{2}{3}\,x-\frac{1}{3}\,x^2 & p_2 &= -\frac{2}{3}+\frac{1}{3}\,x+\frac{1}{3}\,x^2 & p_3 &= \frac{4}{3}-\frac{2}{3}\,x+\frac{1}{3}\,x^2 \end{align*}