Elementary operations on matrices 
$$A \cdot
\begin{bmatrix}
1 & 3 & 4\\
3 & -1 & 5\\
-2 & 4 & -3\\
\end{bmatrix}
=
\begin{bmatrix}
3 & -1 & 5\\
1 & 3 & 4\\
4 & -8 & 6\\
\end{bmatrix}
$$ Find the $3 \times 3$ matrix $A$.

According to my textbook, the question requires elementary row operations on the given matrices.
I read somewhere that for an equation of the form $AB=X$ ,we can apply elementary row operation on $A$ and $X$ only. I don't know why do these contradict. Where am I wrong?
 A: Since
$$\det \begin{bmatrix} 1 & 3 & 4\\ 3 & -1 & 5\\ -2 & 4 & -3\end{bmatrix} = 20 \neq 0$$
we can right-multiply both sides of the linear matrix equation by elementary matrices until we obtain
$$\mathrm A = \begin{bmatrix} 3 & -1 & 5\\ 1 & 3 & 4\\ 4 & -8 & 6\end{bmatrix} \begin{bmatrix} 1 & 3 & 4\\ 3 & -1 & 5\\ -2 & 4 & -3\end{bmatrix}^{-1}$$
We would be doing elementary column operations. If you must do elementary row operations, then do transpose both sides of the linear matrix equation, then do left-multiply both sides by elementary matrices, obtain $\mathrm A^{\top}$ and then transpose to obtain $\mathrm A$.
A: Assuming that the matrix $B$ is nonsingular, you can solve for the matrix $A$ in $AB=C$ by right-multiplying by $B^{-1}$, but that doesn’t appear to be the point of this exercise.  
Compare the rows of the two given matrices: you can obtain the one on the right from the one on the left by swapping the first two rows and multiplying the last row by $-2$. Each of these corresponds to an elementary row operation—one will be a permutation matrix, the other will be diagonal. $A$ is then the product of the two matrices that represent these row operations (in this case the order of operations doesn’t matter).
