Find the matrix $\mathbf{M}$ such that
\[\mathbf{M} \begin{pmatrix} 1 & -2 \\ 1 & 4 \end{pmatrix} = \begin{pmatrix} 6 & 0 \\ 0 & 6 \end{pmatrix}.\]
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Find the matrix $\mathbf{M}$ such that
\[\mathbf{M} \begin{pmatrix} 1 & -2 \\ 1 & 4 \end{pmatrix} = \begin{pmatrix} 6 & 0 \\ 0 & 6 \end{pmatrix}.\]
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
\begin{pmatrix} 4 & 2 \\ -1 & 1 \end{pmatrix}
Find the matrix $\mathbf{M}$ such that
\[\mathbf{M} \begin{pmatrix} 1 & -2 \\ 1 & 4 \end{pmatrix} = \begin{pmatrix} 6 & 0 \\ 0 & 6 \end{pmatrix}.\]
train