# Find the matrix associated to linear function.

Good night, i have a problem when i find the matrix associated to a linear transformation:

$T:P_{1\rightarrow}P_{2}$

$T(p(t))=t(p(t))$

Basis for $P_{1}=\left\{ t,1\right\}$ and for $P_{2}=\left\{ t^{2},t-1,t+1\right\}$

I work in this problem and i made this:

$T(t)=t^{2}=t^{2}+0t+0=\begin{array}{c} 1\\ 0\\ 0 \end{array}$

$T(1)=t=0t^{2}+t+0=\begin{array}{c} 0\\ 1\\ 0 \end{array}$

But this matrix is in canonical basis, how i can change this for the polynomial function?

• $T(1)$ doesn't map to $\operatorname{span}\{t^2,t-1\}$. Are you sure you wrote it down correctly? Shouldn't there be $1$ more element in that basis? – user137731 May 18 '16 at 0:33
• yes, its fine. @Bye_World – Bvss12 May 18 '16 at 0:34
• $T(1) = t=0t^2 + \frac 12(t-1) + \frac 12(t+1)$. – user137731 May 18 '16 at 0:35
• oh, you're in the correct. please, explain me how you can find $(1/2)(t-1)+(1/2)(t+1)$ @Bye_World – Bvss12 May 18 '16 at 0:37
• You have to solve $t=at^2 + b(t-1)+c(t+1) = at^2+(b+c)t+(c-b)$ for $a,b,c$. This last equation implies $$\begin{cases} a=0 \\ b+c = 1 \\ c-b = 0\end{cases}$$ Solve that system to find $a,b,c$. – user137731 May 18 '16 at 0:39

As you discovered in the comments, it is easy to solve this one by playing around with linear combinations.

But what about a general strategy?

We know that given a linear transformation $T$ from $V$ to $W$, and two bases $\alpha = (v_1, \ldots, v_n)$ and $\beta = (w_1, \ldots, w_m)$, there is always a unique matrix representing it. The $i$th column of that matrix will be $T(v_i)$ in the $\beta$ coordinate system.

An important special case is when $V = W$ and $T$ is the identity transformation $I$. That's a change of basis matrix.

What you have is three coordinate systems. $P_1 = (t, 1)$. $P_2 = (t^2, t-1, t+1)$. And $P_3 = (t^2, t, 1)$. You have $T$ going from $P_1$ to $P_3$:

$$\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ \end{pmatrix}$$

You can also easily find the change of basis matrix from $P_2$ to $P_3$ - just write down $P_2$ in the $P_3$ coordinate system as follows:

$$\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 1 \\ 0 & -1 & 1 \end{pmatrix}$$

What you need is the change of basis matrix from $P_3$ to $P_2$. And the way you do that is to just invert the change of basis matrix that you have. Which you can do with row-reduction.

$$\left[ \begin{array}{ccc|ccc} 1 & 0 & 0 & 1 & 0 & 0\\ 0 & 1 & 1 & 0 & 1 & 0\\ 0 & -1 & 1 & 0 & 0 & 1 \end{array} \right] \to \left[ \begin{array}{ccc|ccc} 1 & 0 & 0 & 1 & 0 & 0\\ 0 & 1 & 1 & 0 & 1 & 0\\ 0 & 0 & 2 & 0 & 1 & 1 \end{array} \right] \to \left[ \begin{array}{ccc|ccc} 1 & 0 & 0 & 1 & 0 & 0\\ 0 & 1 & 1 & 0 & 1 & 0\\ 0 & 0 & 1 & 0 & \frac{1}{2} & \frac{1}{2} \end{array} \right] \to \left[ \begin{array}{ccc|ccc} 1 & 0 & 0 & 1 & 0 & 0\\ 0 & 1 & 0 & 0 & \frac{1}{2} & -\frac{1}{2}\\ 0 & 0 & 1 & 0 & \frac{1}{2} & \frac{1}{2} \end{array} \right]$$

$$\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0 \end{pmatrix} \quad \begin{pmatrix} 1 & 0 & 0 \\ 0 & \frac{1}{2} & -\frac{1}{2} \\ 0 & \frac{1}{2} & \frac{1}{2} \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0 \\ 0 & \frac{1}{2} & -\frac{1}{2}\\ \end{pmatrix}$$