<s>[INST] 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.
 [/INST] 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.
</s>