StatLect
Index > Matrix algebra

Elementary row operations

Elementary row operations are simple operations that allow to transform a system of linear equations into an equivalent system, that is, into a new system of equations having the same solutions as the original system.

There are three elementary operations:

In this lecture we will show how these three operations can be performed by using the matrix representation of the linear system and we will show that they give rise to equivalent systems.

Table of Contents

Notation

As in previous lectures, a system of K linear equations in $L$ unknowns is written in matrix form as[eq1]where A is the $K	imes L$ matrix of coefficients, x is the $L	imes 1$ vector of unknowns and $b$ is the Kx1 vector of constants.

The rows of the system are the K equations[eq2]where $A_{kullet }$ is the k-th row of A (it contains the coefficients of the k-th equation) and $b_{k}$ is the k-th entry of $b$.

Multiplying an equation by a non-zero constant

The first elementary operation we consider is the multiplication of one equation by a constant $lpha 
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 $lpha $ 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 one equation to another equation.

Suppose we want to add $lpha $ 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 $lpha $ 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 [eq12]is a system of $4$ equations in $3$ unknowns. What is the matrix $R$ that allows 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 we have a system of $2$ equations in $2$ unknowns. What is the matrix $R$ that allows 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 we have a system of $3$ equations in $3$ unknowns. What is the matrix $R$ that allows 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]

The book

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