Find a matrix transformation mapping $\{(1,1,1),(0,1,0),(1,0,2)\}$ to $\{(1,1,1),(0,1,0),(1,0,1)\}$ 
Find a matrix transformation mapping $\{(1,1,1),(0,1,0),(1,0,2)\}$ to $\{(1,1,1),(0,1,0),(1,0,1)\}$.

Is the answer 
$$
\begin{bmatrix}1& 0& -1\\0& 1& 1\\0& 0& 1\end{bmatrix}?
$$ 
I understand the concept of Matrix Transformation, I don't think I'm doing it right.
 A: We wish to find a $3\times 3$ matrix $T$ such that $TA=B$ where
\begin{align*}
A &=\begin{bmatrix}1 & 0 & 1\\ 1 & 1 & 0 \\ 1 & 0 & 2 \end{bmatrix}
&
B &= \begin{bmatrix} 1 & 0 & 1\\ 1 & 1 & 0\\ 1 & 0 & 1\end{bmatrix}
\end{align*}
Perhaps the quickest way to find $T$ is to multiply the equation $TA=B$ on the right by $A^{-1}$ to obtain
$$
T=BA^{-1}
$$
Can you compute $A^{-1}$ and carry out the matrix multiplication?
A: The columns of the matrix tell you where it sends the standard basis vectors. For instance if I am interested in the third column then I need to determine what the action of our linear operator is on the column vector ,
$$\left[ \begin{array}{c}0 \\ 0 \\ 1 \end{array}\right].$$
This vector can be written as a linear combination of the vectors  used to define the linear operator,
$$\left[ \begin{array}{c}0 \\ 0 \\ 1 \end{array}\right] = 
\left[ \begin{array}{c}1 \\ 0 \\ 2 \end{array}\right]
-\left[ \begin{array}{c}0 \\ 1 \\ 0 \end{array}\right]
-\left[ \begin{array}{c}1 \\ 1 \\ 1 \end{array}\right].$$
Multiplying both sides by our linear operator $M$ we get, 
$$M\left[ \begin{array}{c}0 \\ 0 \\ 1 \end{array}\right] = 
M\left[ \begin{array}{c}1 \\ 0 \\ 2 \end{array}\right]
-M\left[ \begin{array}{c}0 \\ 1 \\ 0 \end{array}\right]
-M\left[ \begin{array}{c}1 \\ 1 \\ 1 \end{array}\right].$$
Note that we know what $M$ does to the vectors on the right so we can just substitute those values in and add,
$$M\left[ \begin{array}{c}0 \\ 0 \\ 1 \end{array}\right] = 
\left[ \begin{array}{c}1 \\ 0 \\ 1 \end{array}\right]
-\left[ \begin{array}{c}0 \\ 1 \\ 0 \end{array}\right]
-\left[ \begin{array}{c}1 \\ 1 \\ 1 \end{array}\right]
=\left[ \begin{array}{c}0 \\ -2 \\ 0 \end{array}\right].$$
The resulting vector is the third column of our matrix,
$$ M = \left[\begin{array}{ccc} 
\  & \  & 0 \\
\  & \  & -2 \\
\ & \  & 0 
\end{array}\right].$$
A similar process will yield the other collumns.
A: There is a very simple method to solve the problem described in "Beginner's guide to mapping simplexes affinely" and "Workbook on mapping simplexes affinely."
Consider the formula
$$
\vec{L}(\vec{p}) = (-1)
\frac{
    \det
        \begin{pmatrix}
            0   & \vec{x} & \vec{y} & \vec{z} \\
            p_1 & a_1     & b_1     & c_1     \\
            p_2 & a_2     & b_2     & c_2     \\
            p_3 & a_3     & b_3     & c_3     \\
        \end{pmatrix}
}{
    \det
        \begin{pmatrix}
            a_1 & b_1 & c_1 \\
            a_2 & b_2 & c_2 \\
            a_3 & b_3 & c_3 \\
        \end{pmatrix}
},
$$
where $\vec{L}$ is linear transformation acting on arbitrary point $\vec{p}$. $\vec{L}$ has the property
$$
\vec{L}(\vec{a}) = \vec{x};\quad
\vec{L}(\vec{b}) = \vec{y};\quad
\vec{L}(\vec{c}) = \vec{z}.
$$
Indices designate components of the corresponding vector.
Let's consider your case.
We need such $\vec{L}$ that
$$
\vec{L}: \begin{pmatrix}1\\ 1\\ 1\end{pmatrix} \mapsto 
         \begin{pmatrix}1\\ 1\\ 1\end{pmatrix};~
\vec{L}: \begin{pmatrix}0\\ 1\\ 0\end{pmatrix} \mapsto 
         \begin{pmatrix}0\\ 1\\ 0\end{pmatrix};~
\vec{L}: \begin{pmatrix}1\\ 0\\ 2\end{pmatrix} \mapsto 
         \begin{pmatrix}1\\ 0\\ 1\end{pmatrix}.
$$
Now I plug them into the general expression 
$$
\vec{L}(\vec{p}) =
(-1)
\frac{
    \det
    \begin{pmatrix}
        0 & (1,1,1)^T & (0,1,0)^T & (1,0,1)^T \\
        \begin{matrix}
            p_{1} \\
            p_{2} \\
            p_{3} \\
        \end{matrix} &
%
        \begin{matrix}1\\ 1\\ 1\end{matrix} &
%
        \begin{matrix}0\\ 1\\ 0\end{matrix} &
%
        \begin{matrix}1\\ 0\\ 2\end{matrix}
    \end{pmatrix}
}{
    \det
    \begin{pmatrix}
        \begin{matrix}1\\ 1\\ 1\end{matrix} &
%
        \begin{matrix}0\\ 1\\ 0\end{matrix} &
%
        \begin{matrix}1\\ 0\\ 2\end{matrix}
    \end{pmatrix}
}.
$$
Doing determinants I get
$$
=   \left[
   2\begin{pmatrix}1\\ 1\\ 1\end{pmatrix} -
   2\begin{pmatrix}0\\ 1\\ 0\end{pmatrix} -
   \begin{pmatrix}1\\ 0\\ 1\end{pmatrix}
\right] p_1 -
  \begin{pmatrix}0\\ 1\\ 0\end{pmatrix} p_2 -
\left[
  \begin{pmatrix}1\\ 1\\ 1\end{pmatrix} -
  \begin{pmatrix}0\\ 1\\ 0\end{pmatrix} -
  \begin{pmatrix}1\\ 0\\ 1\end{pmatrix}
\right] p_3
$$
or simplified
$$
\vec{L}(\vec{p}) =
    \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix} p_1 + 
    \begin{pmatrix} 0 \\ 1\\ 0 \end{pmatrix} p_2 + 
    \begin{pmatrix} 0 \\ 0\\ 0 \end{pmatrix} p_3 . 
$$
Of course, you can write that in a vector form
$$
\vec{L}(\vec{p}) =
    \begin{pmatrix} 
        1 & 0 & 0 \\
        0 & 1 & 0 \\
        1 & 0 & 0 
    \end{pmatrix} 
    \begin{pmatrix} p_1 \\ p_2 \\ p_3 \end{pmatrix}.
$$
Now you can easily check
$$
    \begin{pmatrix} 
        1 & 0 & 0 \\
        0 & 1 & 0 \\
        1 & 0 & 0 
    \end{pmatrix} 
    \begin{pmatrix}1\\ 1\\ 1\end{pmatrix} =
    \begin{pmatrix}1\\ 1\\ 1\end{pmatrix};~
    \begin{pmatrix} 
        1 & 0 & 0 \\
        0 & 1 & 0 \\
        1 & 0 & 0 
    \end{pmatrix} 
    \begin{pmatrix}0\\ 1\\ 0\end{pmatrix} =
    \begin{pmatrix}0\\ 1\\ 0\end{pmatrix};~
    \begin{pmatrix} 
        1 & 0 & 0 \\
        0 & 1 & 0 \\
        1 & 0 & 0 
    \end{pmatrix} 
    \begin{pmatrix}1\\ 0\\ 2\end{pmatrix} =
    \begin{pmatrix}1\\ 0\\ 1\end{pmatrix};
$$
For more details on the methods used, you can always refer to "Beginner's guide to mapping simplexes affinely" and "Workbook on mapping simplexes affinely". The latter contains many problems similar to this one as explained by the authors of the method presented.
