[Math] Finding coordinates of a polynomial with respect to a given basis

linear algebralinear-transformations

Given a basis $B=\{1,\,x+r,\,(x+r)^2\}$ for $\Bbb R[x]_2$, where $r\in\Bbb R$, I'm trying to find the coordinates of the polynomial $p(x)=a_0+a_1x+a_2x^2$ with respect to that basis.

I've got a few ideas as to how to approach this but I'm a little confused. The coordinates of $p(x)$ w.r.t. the standard basis, $S$, are $$[p(x)]_S=\begin{bmatrix}a_0\\a_1\\a_2\end{bmatrix}$$
and let's say we are trying to find: $$[p(x)]_B=\lambda=\begin{bmatrix}\lambda_0\\\lambda_1\\\lambda_2\end{bmatrix}$$

I think I'm right in saying that the basis, $B$, can be expressed as a matrix: $$B_M=\begin{bmatrix}0&0&1\\0&1&r\\1&2r&r^2\end{bmatrix}$$

Now I know the general formula saying that to find the coordinates of a vector w.r.t. a new basis, you multiply the coordinates of the vector w.r.t. to the standard basis by the inverse of the matrix formulated from the new, given basis, so I'll do this below:

$${B_M}^{-1}=\begin{bmatrix}r^2&-2r&1\\-r&1&0\\1&0&0\end{bmatrix}$$

$$\therefore \quad \begin{bmatrix}\lambda_0\\\lambda_1\\\lambda_2\end{bmatrix}=\begin{bmatrix}r^2&-2r&1\\-r&1&0\\1&0&0\end{bmatrix}\begin{bmatrix}a_0\\a_1\\a_2\end{bmatrix}$$

$$\implies \quad \begin{bmatrix}\lambda_0\\\lambda_1\\\lambda_2\end{bmatrix}=\begin{bmatrix}a_0r^2-2ra_1+a_2\\-a_0r+a_1\\a_0\end{bmatrix}$$

But I'm not sure where to go from here – are these simply my new coordinates or is there something else I must do?

Any help is very much appreciated. Thank you.

Best Answer

The change of basis matrix from $B$ to $S$ is

$$P = \begin{pmatrix} 1 & r & r^2 \\ 0 & 1 & 2r \\ 0 & 0 & 1\end{pmatrix},$$

so the change of basis matrix from $S$ to $B$ is

$$P^{-1} = \begin{pmatrix} 1 & -r & r^2 \\ 0 & 1 & -2r \\ 0 & 0 & 1\end{pmatrix}.$$

Hence the $B$-coordinates of $p(x) = a_0 + a_1 x + a_2x^2$ are

$$ P^{-1}\begin{pmatrix} a_0 \\ a_1 \\ a_2 \end{pmatrix} = \begin{pmatrix} a_0 - a_1r + a_2 r^2 \\ a_1 - 2a_2 r \\ a_2 \end{pmatrix}.$$