Matrix associated to a linear transformation with respect to a given basis We're given $L: \mathbb{R}^3 \rightarrow \mathbb{R}^3$, which is a linear transformation defined by: $$ L \left( \begin{bmatrix}x_{1}\\x_{2}\\x_{3} \end{bmatrix} \right) = \begin{bmatrix}4x_{3}\\3x_{1}+5x_{2}-2x_{3}\\x_{1}+x_{2}+4x_{3} \end{bmatrix}$$
We're also given a basis $$B = \left(\begin{bmatrix}1\\1\\1 \end{bmatrix} , \begin{bmatrix}1\\1\\0 \end{bmatrix}, \begin{bmatrix}1\\0\\0 \end{bmatrix} \right) $$
The point of the exercise is to find a matrix $M$ associated to $L$ with respect to $B$, such that $[L(x)]_{B} = M[x]_{B}$ for all $x\in \mathbb{R}^3$.
Here's my approach. I transformed the vectors in $B$ to get the columns of the matrix $M$ giving me: $$M =  \begin{bmatrix}4 & 0 & 0\\ 6&8&3\\6&2&1 \end{bmatrix} $$
The solution sheed says that $M =\begin{bmatrix}6&2&1\\ 0&6&2\\-2&-8&-3 \end{bmatrix}$. 
I have no idea how to find the the correct solution nor why my approach is wrong.
 A: In general, if $V$ and $W$ are vector spaces with bases $B$ and $C$, and $T: V \to W$ is linear, then $[T(x)]_C = [T]_{B,C}[x]_B$. In words, the matrix $[T]_{B,C}$ eats $B$-coordinates of $x$ and spits $C$-coordinates of $T(x)$. The columns of $[T]_{B,C}$ are the $C$-coordinates of the images of the vectors in $B$ via $T$. Also, recall that if $T$ is a linear operator in $V$, then $[T]_B$ is shorthand for $[T]_{B,B}$.
That being understood, we go for your exercise. Since you want $[L(x)]_B = M[x]_B$ for all $x$, we'll have $M = [L]_B$. So we compute $$\begin{align}L(1,1,1) &= (4,6,6) = 6\cdot (1,1,1) + 0\cdot (1,1,0) -
 2\cdot (1,0,0) \\ L(1,1,0) &= (0,8,2) = 2\cdot (1,1,1) + 6\cdot (1,1,0) -
 8\cdot (1,0,0) \\ L(1,0,0) &= (0,3,1) = 1\cdot (1,1,1) + 2\cdot (1,1,0) -
 3\cdot (1,0,0),\end{align}$$which gives $$M = [L]_B=\begin{pmatrix}6&2&1\\ 0&6&2\\-2&-8&-3 \end{pmatrix}.$$
A: The key idea is that the matrix:
$$B=\begin{bmatrix}1&1&1\\1&1&0\\1&0&0\end{bmatrix}$$
transforms a vector in the base B to a vector in the standard basis and its inverse transform a vector in the standard basis to a vector in the base B:
$$v_S=B v_B \iff v_B=B^{-1}v_S$$
Thus, since the linear transformation in the standard basis is expressed by:
$$L=\begin{bmatrix}0&0&4\\3&5&-2\\1&1&4\end{bmatrix} \quad w_S=Lv_S$$
we have
$$w_S=Lv_S \implies Bw_B=LBv_B\implies w_B=B^{-1}LBv_B$$
and therefore the matrix
$$B^{-1}LB=\begin{bmatrix}1&1&1\\1&1&0\\1&0&0\end{bmatrix}^{-1}.\begin{bmatrix}0&0&4\\3&5&-2\\1&1&4\end{bmatrix}.\begin{bmatrix}1&1&1\\1&1&0\\1&0&0\end{bmatrix}$$
represents the linear transformation with respect to the new basis.
A: The matrix of $L$ with respect to the standard basis is$$\begin{bmatrix}0&0&4\\3&5&-2\\1&1&4\end{bmatrix}.$$Therefore, the matrix that you are looking for is
$$\begin{bmatrix}1&1&1\\1&1&0\\1&0&0\end{bmatrix}^{-1}.\begin{bmatrix}0&0&4\\3&5&-2\\1&1&4\end{bmatrix}.\begin{bmatrix}1&1&1\\1&1&0\\1&0&0\end{bmatrix}=\begin{bmatrix}6 & 2 & 1 \\ 0 & 6 & 2 \\ -2 & -8 & -3\end{bmatrix}.$$
Hence the answer
