Search for probability and statistics terms on Statlect
StatLect

Elementary row operations

by , PhD

Elementary row operations are used to transform a system of linear equations into a new system that has the same solutions as the original one (i.e., into an equivalent system).

There are three elementary operations:

Table of Contents

Notation

A system of K linear equations in $L$ unknowns is written in matrix form as[eq1]where:

The rows of the system are the K equations[eq2]where:

Multiplying an equation by a non-zero constant

The first elementary operation we consider is the multiplication of an equation by a constant $alpha 
eq 0$.

If the k-th equation is the one being multiplied, then we substitute the equation[eq3]with the equation[eq4]

The original matrix of coefficients and vector of constants[eq5]become[eq6]so that the new system is[eq7]

The same result can be achieved as follows:

  1. take the $K	imes K$ identity matrix I;

  2. multiply the k-th row of I by $alpha $ and denote the transformed matrix thus obtained by $R$:[eq8]

  3. pre-multiply both sides of the matrix form of the system by $R$:[eq9]

It can be easily verified that[eq10]

In the lecture on Equivalent systems, we have proved that if $R$ is invertible, then the new system is equivalent to the original one.

But the matrix $R$ above is invertible (full-rank) because its rows are linearly independent (none of them can be written as a linear combination of the others).

Thus, multiplying an equation by a non-zero constant gives an equivalent system.

Example Consider the system of two equations in three unknowns[eq11]that can be written in matrix form as [eq12]where [eq13]Multiplying the second equation by $2$, we obtain the equivalent system[eq14]that can be written in matrix form as[eq7]where[eq16]The same result can be achieved by 1) taking the $2	imes 2$ identity matrix[eq17]2) multiplying its second row by $2$ so as to obtain the matrix[eq18]and 3) pre-multiplying A and $b$ by $R$:[eq19]

Adding a multiple of one equation to another equation

The second elementary row operation we consider is the addition of a multiple of an equation to another equation.

Suppose we want to add $alpha $ times the $j$-th equation to the k-th equation. Then we substitute the equation[eq20]with the equation[eq21]

The original matrix of coefficients and vector of constants[eq22] become[eq23]so that the new system is[eq7]

The same result can be achieved as follows:

  1. take the $K	imes K$ identity matrix I;

  2. add $alpha $ times the $j$-th row of I to the k-th row of I, and denote the transformed matrix thus obtained by $R$:[eq25]

  3. pre-multiply both sides of the matrix equation by $R$:[eq9]

As before, we have that[eq10]and the new system is equivalent to the original one because $R$ is invertible (none of its rows can be written as a linear combination of the others).

In other words, we obtain an equivalent system by adding a multiple of one row to another row.

Example Consider the system of three equations in three unknowns[eq28]that can be written in matrix form as [eq12]where [eq30]Let us add the second equation multiplied by $-3$ to the third one. We obtain the equivalent system[eq31]that can be written in matrix form as[eq7]where[eq33]The same result can be achieved by 1) taking the $3	imes 3$ identity matrix[eq34]2) multiplying its second row by $-3$ and adding it to the third one so as to obtain the matrix[eq35]and 3) pre-multiplying A and $b$ by $R$:[eq36]

Interchanging two equations

The third elementary row operation we consider is the interchange of two equations.

We switch the $j$-th equation [eq37]with the k-th equation[eq38]

The original matrix of coefficients and vector of constants[eq39]become[eq40]so that the new system is[eq7]

The same result can be obtained as follows:

  1. take the $K	imes K$ identity matrix I;

  2. switch the $j$-th row of I with the k-th row ($j<k$ in the original matrix), and denote the new matrix by $R$:[eq42]

  3. pre-multiply both sides of the system by $R$:[eq9]

As for the previous elementary operations, we have that[eq10]and the new system is equivalent to the original one because $R$ is invertible (the rows of $R$ are the same of I, but in a different order; they form the standard basis of the space of $1	imes K$ vectors).

To sum up, we obtain an equivalent system by interchanging two rows (two equations) of the system.

Example Consider the system of three equations in three unknowns[eq45]that can be written in matrix form as [eq12]where [eq47]Let us switch the first equation with the third one. We get the equivalent system[eq48]that can be represented in matrix form as[eq7]where[eq50]The interchange of equations can also be performed by 1) starting from the $3	imes 3$ identity matrix[eq51]2) switching the first row with the third one[eq52]and 3) pre-multiplying A and $b$ by $R$:[eq53]

Solved exercises

Below you can find some exercises with explained solutions.

Exercise 1

Suppose that [eq12]is a system of $4$ equations in $3$ unknowns.

What is the matrix $R$ that allows us to interchange the second equation with the fourth (when the system is pre-multiplied by $R$)?

Solution

The matrix $R$ is obtained by interchanging the rows of the $4	imes 4$ identity matrix: [eq55]

Exercise 2

Suppose that we have a system of $2$ equations in $2$ unknowns.

What is the matrix $R$ that allows us to multiply the second equation by $2$?

Solution

The matrix $R$ is obtained by multiplying by $2$ the second row of the $2	imes 2$ identity matrix: [eq56]

Exercise 3

Suppose that we have a system of $3$ equations in $3$ unknowns.

What is the matrix $R$ that allows us to add the first equation to the second?

Solution

The matrix $R$ is obtained by adding the first row of the $3	imes 3$ identity matrix to the second: [eq57]

How to cite

Please cite as:

Taboga, Marco (2021). "Elementary row operations", Lectures on matrix algebra. https://www.statlect.com/matrix-algebra/elementary-row-operations.

The books

Most of the learning materials found on this website are now available in a traditional textbook format.