Finding coordinates of a polynomial with respect to a given basis

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.

• Your base matrix looks weird. Why not $$B_M = \begin{pmatrix} 1 & r & r^2 \\ 0 & 1 & 2r \\ 0 & 0 & 1 \end{pmatrix}$$? We should have $B_M \to \text{I}$ for $r \to 0$, or? – mvw Dec 24 '15 at 21:33
• Yeah I've just realised that this is probably the key to why I'm going wrong. Could you please tell me what the procedure for forming the change of basis matrix is and why my way makes it go wrong? – mathphys Dec 24 '15 at 21:36
• If $a_0$ is the first coordinate, and $b_1 = B_m e_1$ etc, where $e_i$ is the $i$-th canonical base vector, it must be sorted like I did. – mvw Dec 24 '15 at 21:38
• I see, that makes more sense now. So what you're saying is that the change of basis matrix $B_M$ applied to each standard basis vector gives each respective non-standard basis vector, and if we apply this matrix to a given coordinate (w.r.t. the standard basis) we get the coordinate but this time in its new basis form, correct? – mathphys Dec 24 '15 at 21:45
• The above $B_M$ just contains the $b_i$ in coordinates regarding to the standard base. The coordinate transformation $T$ should map $T b_i = e_i$, because $b_i$ has coordinates $e_i$ regarding base $B$. So $I = T (b_1, b_2, b_3) = T\, B_M \iff T = I \, B_M^{-1} = B_M^{-1}$. – mvw Dec 24 '15 at 22:31

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}.$$

• Thank you for your answer - how did you form your change of basis matrix from $B$ to $S$? I seem to have formed mine row-wise with regards to the basis and you've formed yours column wise. Why is doing it your way correct? – mathphys Dec 24 '15 at 21:31
• I guess what I'm trying to ask is: why is the change of basis matrix, $P$, a matrix made up of columns (of the coordinates of the basis elements) arranged in the order that the elements are given in the original basis, $B$? – mathphys Dec 24 '15 at 21:40
• @mathphys That's the definition of a change of basis matrix. The matrix $P$ represents the identity linear transformation from the basis $B$ to the basis $S$. To represent linear maps as matrices, one writes the components of the transformed old basis vectors in terms of the new basis vectors as columns of a matrix. – Alex Provost Dec 24 '15 at 23:14

Hint:

You just have to use Taylor's formula for polynomials, which is a exact formula. For a polynomial of degree $2$, you have (in function of the powers of $x\color{red}{\boldsymbol-} r$, which is the usual form of this formula): \begin{align*} P(x)&=P(r)+P'(r)(x-r)+\frac{P''(r)}{2!}(x-r)^2,\\ \text{whence}\qquad P(x)&=P(r)+P'(-r)(x+r)+\frac{P''(-r)}{2!}(x+r)^2. \end{align*}