# Computing the matrix, with respect to a given basis, of a linear transformation

Question: Let $T:\mathbb{R} ^3\rightarrow\mathbb{R} ^3$ be given by

$T{\begin{pmatrix}x_1\\x_2\\x_3\end{pmatrix}}$=$\begin{pmatrix}2x_1+x_2-2x_3\\3x_2-2x_3\\-x_1+x_2+x_3\end{pmatrix}$

and basis $B=\{(1,1,1),(1,2,1),(1,1,0)\}$. Compute the matrix $[T]_B$

Assuming I can write T as the matrix $[T]=\left[\begin{matrix}2&1&-2\\0&3&-2\\-1&1&1\end{matrix}\right]$

What is my next step in order to write the matrix relative to the basis?

Assuming $E=\{(1, 0, 0), (0, 1, 0), (0, 0, 1)\}$ is the standard basis of $\mathbb{R}^3$, then the change of coordinates matrix from $B$ to $E$ is $$Q=\left[\begin{matrix}1&1&1\\1&2&1\\1&1&0\end{matrix}\right].$$ So the matrix representation of $T$ in terms of basis $B$ is $$[T]_B=Q^{-1}[T]Q.$$