MathAlgebraLinear algebraSystems of linear equations

Row operations as matrix multiplication

5 minutes read

In the “Row operations” chapter we learned about the main operations on rows of the matrix: row swap, multiplication by a scalar and addition. These operations arose from the manipulations used to solve systems of linear equations. So, in order to have something from the list done, we just did it, which we hardly can call a mathematical approach.

Actually, all the operations we considered can be represented as multiplication of matrices. So if we need to swap two rows, then we have to multiply a certain matrix by a given one to get the same matrix only with the two rows swapped. And this will be the topic of the lesson: how to perform the elementary operations via matrix multiplication.

Row swap

Consider the matrix
A=(123456789)A=\begin{pmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{pmatrix}

What happens if we multiply it from the left by a unit matrix of the same degree?

(100010001)(123456789)=(123456789)\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{pmatrix} \cdot \begin{pmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{pmatrix} = \begin{pmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{pmatrix}

That’s right, we will get the same matrix. But what would happen if, before multiplying, we swap the second and the third rows of the unit matrix? Let’s check it out.

(100001010)(123456789)=(123789456)\begin{pmatrix} 1 & 0 & 0\\ 0 & 0 & 1\\ 0 & 1 & 0 \end{pmatrix} \cdot \begin{pmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{pmatrix} = \begin{pmatrix} 1 & 2 & 3\\ 7 & 8 & 9\\ 4 & 5 & 6 \end{pmatrix}

As a result, the second and the third rows of the initial matrix got swapped, which is exactly what we need! Therefore, if we need to swap rows ii and jj, then we need to multiply the matrix from the left by a unit matrix that has its rows ii and jj swapped around.

We found the matrix, multiplying by which from the left we got the required operation: the row swap. Such a matrix is called an elementary row operator. This definition will also apply to the next operations. An elementary row operator is a matrix such that, after left-multiplying some initial matrix by it, this initial matrix will transform into a new matrix as if an elementary row operation had been performed. Sometimes such matrices are called simply elementary matrices.

Multiplication by a scalar

This case is even simpler than the previous one. In order to multiply all elements of a particular row by a scalar, we just need to multiply the matrix from the left by a unit matrix that instead of one has a required scalar in that row. Take a look at the example.

Same matrix
A=(123456789)A=\begin{pmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{pmatrix}

We want to multiply the second row by 33, for that we multiply it by the following elementary row operator:

(100030001)\begin{pmatrix} 1 & 0 & 0\\ 0 & 3 & 0\\ 0 & 0 & 1 \end{pmatrix}

That's how we get this result:

(100030001)(123456789)=(123121518789)\begin{pmatrix} 1 & 0 & 0\\ 0 & 3 & 0\\ 0 & 0 & 1 \end{pmatrix} \cdot \begin{pmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{pmatrix} = \begin{pmatrix} 1 & 2 & 3\\ 12 & 15 & 18\\ 7 & 8 & 9 \end{pmatrix}

Which, as you see, is just what we need!

Row addition

I remind you, that for this operation we want to take a certain row and add another row to it. Let’s think how the elementary row operator should look in this case. Assuming we want to get the sum of ithi_{th} and jthj_{th} rows instead of ithi_{th} row. For that we need to take a unit matrix and put 11 instead of 00 at ithi_{th} row and jthj_{th} column. And then we need to multiply our matrix by this elementary row operator from the left. Time to check it with the example.

Same old matrix, but this time we wanted to have the sum of the first and the third rows in the third row.
A=(123456789)A=\begin{pmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{pmatrix}

This will be the elementary row operator:

(100010101)\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 1 & 0 & 1 \end{pmatrix}

Multiply the matrices in the right order:

(100010101)(123456789)=(12345681012)\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 1 & 0 & 1 \end{pmatrix} \cdot \begin{pmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{pmatrix} = \begin{pmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 8 & 10 & 12 \end{pmatrix}
Just what we wanted.
By the way, if we put a different number instead of one, then we will add the row multiplied by that coefficient, thus combining the second and third operations.

Other row operators

These were the elementary row operators, but there can be other (non-elementary) ones. After getting the hang of the logic, you can swap multiple rows or combine several operations in one: swap, multiply by a scalar and add something to the row. Also we can add multiple other rows at the same time. To put it shortly, you can do a lot of things with your matrix.

Conclusion

In this lesson we have discovered a new method of performing some row operations that were already familiar to us - with the help of elementary row operators. We have studied the main row operations: row swap, multiplication by a scalar, row addition. Clearly, the division and subtraction are done the same way. Division is a multiplication by the inverse for multiplication, and subtraction is an addition by the inverse for addition.

48 learners liked this piece of theory. 1 didn't like it. What about you?
Report a typo