# Why not row and column operations together?

On a matrix we apply either elementary row or elementary column operation but never both of them together. I am recently learning these elementary operations.This is being used to compute inverse or solve a system of linear equations. I need to know what algebraically happens to the matrix or the operator here when we do the elementary operations and what goes wrong if we try to do a row operation followed by a column operation or two row(/column) at the same time.

• Any elementary row operation corresponds to the left multiplication by a very simple invertible matrix. Any column operation - to the right multiplication by a similar looking matrix. Since matrix multiplication is associative, those operations commute, so nothing dangerous can happen if we do them in whatever order.
– A.Γ.
Aug 21 '15 at 11:09
• In numerical practice Gaussian elimination combines elementary row operations with column swaps to obtain nonzero entries ("pivots") needed to create leading ones in upper rows. Search for Gaussian elimination with pivoting. Aug 21 '15 at 11:17

Consider matrix $$A = \left( \begin{array}{cc} 1 & 1 \\ 1 & -1\end{array} \right).$$ Saying $$A \left( \begin{array}{c} x \\ y\end{array} \right) = \left( \begin{array}{c} a \\ b \end{array}\right)$$ is equivalent to saying$$\begin{cases}x + y = a \\ x- y = b\end{cases}.$$ Row operations correspond to adding multiplying equations. Column operations would correspond to adding $x$ to $y$ which clearly messes things up.
• Adding the second row to the first row is done by multiplication $\left[\matrix{1 & 1\\0 & 1}\right]A$. Adding the second column to the first column is done by $A\left[\matrix{1 & 0\\1 & 1}\right]$. Both operations are harmless in the sense that one can roll the things back multiplying by their inverses. Of course, one has to keep tracking what has been done so far. Exception is when one is solving a linear system, then the order of the equations is irrelevant, so the row operations are preferably easier.