[Math] How to swap rows in square a matrix algebraically

linear algebramatrices

Is there some way to achieve swapping of rows of a 3×3 square matrix(for example exchanging rows 0 and 2) by using matrix algebra? Or is it something that cannot be done with algebra? What about row operations in general like multiplying a row with a constant, can it be expressed in terms of matrix algebra?

Best Answer

What you described are elementary operations.

To swap row $1$ and row $3$, pre-multiply the matrix $\begin{bmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0\end{bmatrix}$ (we swap row $1$ and row $3$ of the identity matrix).

To multiply row $2$ by $c$, pre-multiply the matrix $\begin{bmatrix} 1 & 0 & 0 \\ 0 & c & 0 \\ 0 & 0 & 1\end{bmatrix}$ (we multiply $c$ to the second row of the identity matrix).

You might like to check out elementary matrices.