# Can we use both Column and Row transformations simultaneously when finding inverse of a matrix using elementary transformation method?

I have seen many times that people find inverse of a matrix using elementary transformations. But they perform the operations only on the rows. Can we perform the operations on the column also? If Yes, can we do both row and column transformations together?

Doing an elementary row transformation to a matrix $$M$$ is the same thing as multiplying $$M$$ by some matrix $$R$$ on the left; doing column transformation is multiplying $$M$$ by some matrix $$C$$ on the right. Thus, by a sequence of row transformations you obtain a matrix of the form $$SM$$, where $$S$$ is the matrix you obtain by executing the same sequence of row transformations on the identity matrix $$E$$ (analogously for column transformations). Thus, once via row transformations from initial matrix $$M$$ you get $$E$$, you actually get an equality $$SM = E,$$ where $$S$$ is obtained as described above. That is why this method of finding an inverse via row transformations works.
Now, if in the process you also did column transformations, you would get an equality of the form $$SMT = E,$$ where S is the matrix you get from identity matrix by executing all row transformations, and $$T$$ is what you get by executing all column transformations.
You still get a valid equality, but it does not give you an inverse to your matrix $$M$$.
It is possible to adapt the usual method as follows: write your matrix $$M$$ besides an identity matrix and above another identity matrix, such as $$\matrix{ \pmatrix{ a & b & c \cr d&e&f\cr h&i&j } & \pmatrix{ 1&0&0\cr 0&1&0\cr 0&0&1 } \cr\cr \pmatrix{ 1&0&0\cr 0&1&0\cr 0&0&1 } }$$ Then, every time you do a row operation, make sure to apply it to the long row across $$M$$ and the identity matrix to the right of $$M$$. On the other hand, when you do a column operation, make sure to apply it to the long column across $$M$$ and the identity matrix below. When you are done, that is, when you have transformed $$M$$ into the identity matrix and are left with $$\matrix{I&S\cr T}$$ then $$M^{-1}=TS$$.