# Translating polynomials: $p(x) \mapsto p(x-2)$.

Say we are given a mapping $$\mathcal{P}_2 \to\mathcal{P}_2$$. Use $$\{1, x, x^2\}$$ as the basis for the domain and $$\{1, x-2, (x-2)^2\}$$ for the codomain. Then the matrix for the linear transformation is the $$3\times 3$$ identity matrix.

I am not sure how this happens to be. I was told that it depends on the basis that we choose for each of our vector spaces. For example, given the original problem and taking simply $$\{1, x, x^2\}$$ to be the basis for both the domain and codomain we get a matrix that looks like this (a similar procedure used from this post $$\left[ \begin{matrix} 1 & -2 & 4 \\ 0 & 1 & -4 \\ 0 & 0 & 1 \end{matrix} \right]$$ Any explanation is great! Thanks in advance!

Suppose $$T: \mathcal{P} \to \mathcal{P}$$ is the mapping. For the second column of the matrix, for example, we compute $$T(0,1,0)$$
$$T(\mathbf{0}\cdot + \mathbf{1} \cdot x + \mathbf{0} \cdot x^2) = P(x) = x - 2 = \mathbf{0} \cdot 1 + \mathbf{1} \cdot (x - 2) + \mathbf{0} \cdot (x - 2)^2$$
in which the coordinates in the given basis for the domain and codomain are in bold. This means $$T(0,1,0) = (0,1,0)$$. You have to notice that the coordinates of $$x - 2$$ are actually $$(0,1,0)$$ in the basis for the codomain.