I've been working on matrices lately. Currently, I am stuck on solving systems of linear equations using matrices. I've read the following article which has proved very helpful in understanding the basics of matrices intuitively: An Intuitive Guide to Linear algebra, however, one thing still confuses me. In the following illustrations,

One thing still confuses me. If the "operations" matrix and the "input data" matrix are switched, then the output changes. Therefore, I conclude they matrices are not commutative, but in the following example:
$$\begin{bmatrix} 3 &2 &1 \\ 2& 3 &4 \\ 2 & 6 & 1 \end{bmatrix} \begin{bmatrix} x\\ y \\z \end{bmatrix}=\begin{bmatrix}5 \\ 31 \\ 43 \end{bmatrix}$$ But say I want to multiply both sides of the matrix by a certain matrix. $$\begin{bmatrix} 2 \\5\\ 1 \end{bmatrix}$$
are both these operations valid?
this: $$\begin{bmatrix} 2 \\5\\ 1 \end{bmatrix}\begin{bmatrix} 3 &2 &1 \\ 2& 3 &4 \\ 2 & 6 & 1 \end{bmatrix} \begin{bmatrix} x\\ y \\z \end{bmatrix}=\begin{bmatrix} 2 \\5\\ 1 \end{bmatrix}\begin{bmatrix}5 \\ 31 \\ 43 \end{bmatrix}$$
...and this:
$$\begin{bmatrix} 3 &2 &1 \\ 2& 3 &4 \\ 2 & 6 & 1 \end{bmatrix} \begin{bmatrix} x\\ y \\z \end{bmatrix}\begin{bmatrix} 2 \\5\\ 1 \end{bmatrix}=\begin{bmatrix}5 \\ 31 \\ 43 \end{bmatrix}\begin{bmatrix} 2 \\5\\ 1 \end{bmatrix}$$
Anyways, can anyone explain to me how I can simplify,$$\begin{bmatrix} 3 &2 &1 \\ 2& 3 &4 \\ 2 & 6 & 1 \end{bmatrix}$$ into an identity matrix.
In other words, how can I simplify a system of linear equations?
Thanks.
No. I think what you want to do is right-multiply both sides by a $3\times 3$ matrix whose diagonal elements are $2,5,1$.