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:
multiplying an equation by a non-zero constant;
adding a multiple of an equation to another equation;
interchanging two equations.
A system of linear equations in unknowns is written in matrix form aswhere:
is the matrix of coefficients;
is the vector of unknowns;
is the vector of constants.
The rows of the system are the equationswhere:
is the -th row of (it contains the coefficients of the -th equation);
is the -th entry of .
The first elementary operation we consider is the multiplication of an equation by a constant .
If the -th equation is the one being multiplied, then we substitute the equationwith the equation
The original matrix of coefficients and vector of constantsbecomeso that the new system is
The same result can be achieved as follows:
take the identity matrix ;
multiply the -th row of by and denote the transformed matrix thus obtained by :
pre-multiply both sides of the matrix form of the system by :
It can be easily verified that
In the lecture on Equivalent systems, we have proved that if is invertible, then the new system is equivalent to the original one.
But the matrix 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 unknownsthat can be written in matrix form as where Multiplying the second equation by , we obtain the equivalent systemthat can be written in matrix form aswhereThe same result can be achieved by 1) taking the identity matrix2) multiplying its second row by so as to obtain the matrixand 3) pre-multiplying and by :
The second elementary row operation we consider is the addition of a multiple of an equation to another equation.
Suppose we want to add times the -th equation to the -th equation. Then we substitute the equationwith the equation
The original matrix of coefficients and vector of constants becomeso that the new system is
The same result can be achieved as follows:
take the identity matrix ;
add times the -th row of to the -th row of , and denote the transformed matrix thus obtained by :
pre-multiply both sides of the matrix equation by :
As before, we have thatand the new system is equivalent to the original one because 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 unknownsthat can be written in matrix form as where Let us add the second equation multiplied by to the third one. We obtain the equivalent systemthat can be written in matrix form aswhereThe same result can be achieved by 1) taking the identity matrix2) multiplying its second row by and adding it to the third one so as to obtain the matrixand 3) pre-multiplying and by :
The third elementary row operation we consider is the interchange of two equations.
We switch the -th equation with the -th equation
The original matrix of coefficients and vector of constantsbecomeso that the new system is
The same result can be obtained as follows:
take the identity matrix ;
switch the -th row of with the -th row ( in the original matrix), and denote the new matrix by :
pre-multiply both sides of the system by :
As for the previous elementary operations, we have thatand the new system is equivalent to the original one because is invertible (the rows of are the same of , but in a different order; they form the standard basis of the space of 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 unknownsthat can be written in matrix form as where Let us switch the first equation with the third one. We get the equivalent systemthat can be represented in matrix form aswhereThe interchange of equations can also be performed by 1) starting from the identity matrix2) switching the first row with the third oneand 3) pre-multiplying and by :
Below you can find some exercises with explained solutions.
Suppose that is a system of equations in unknowns.
What is the matrix that allows us to interchange the second equation with the fourth (when the system is pre-multiplied by )?
The matrix is obtained by interchanging the rows of the identity matrix:
Suppose that we have a system of equations in unknowns.
What is the matrix that allows us to multiply the second equation by ?
The matrix is obtained by multiplying by the second row of the identity matrix:
Suppose that we have a system of equations in unknowns.
What is the matrix that allows us to add the first equation to the second?
The matrix is obtained by adding the first row of the identity matrix to the second:
Please cite as:
Taboga, Marco (2021). "Elementary row operations", Lectures on matrix algebra. https://www.statlect.com/matrix-algebra/elementary-row-operations.
Most of the learning materials found on this website are now available in a traditional textbook format.