Module 3
Module 3
LEARNING OBJECTIVES
At the end of this module, you are expected to:
1. Know how to use the different methods in solving more complex linear equations.
2. Use the knowledge in matrix analysis to perform the different methods in solving linear
equations.
3. Solve linear equations using direct methods and iterative methods.
4. Write the augmented matrix of a system of equations.
5. Perform row operations on a matrix.
6. Solve a system of linear equations using matrices.
KEY TERMS
Augmented Matrix
Direct Methods
Gaussian Elimination
Gauss-Seidel Method
Iterative Methods
Jacobi Method
Linear Equations
LU Decomposition
Non homogenous system
Row Echelon Form
3.1. Unique and Multiple Solutions, Trivial and Non-trivial Solutions, No Solution
For square systems of equations (i.e. those with an equal number of equations and
unknowns), the most powerful tool for determining the number of solutions the system has is
the determinant. Suppose we have two equations and two unknowns: ax+by=c and dx+ey=f with
b and e non-zero (i.e. the system is nonhomogeneous). These are two lines with slope -a/b and -
d/e, respectively. Let's define the determinant of a 2x2 system of linear equations to be the
determinant of the matrix of coefficients A of the system. For this system
Suppose this determinant is zero. Then, this last equation implies a/b=d/e; in other words,
the slopes are equal. From our discussion above, this means the lines are either identical (there is
an infinite number of solutions) or parallel (there are no solutions). If the determinant is non-zero,
then the slopes must be different and the lines must intersect in exactly one point. This leads us to
the following result:
A nxn nonhomogeneous system of linear equations has a unique non-trivial solution if and
only if its determinant is non-zero. If this determinant is zero, then the system has either no
nontrivial solutions or an infinite number of solutions.
Example
The nonhomogeneous system of equations 2x+3y=-8 and -x+5y=1 has determinant which
implies the system has a unique solution (the point (-43/13,-28/75)). This corresponds to our
intuition: the lines have different slopes and therefore must intersect in exactly one point.
Example
The nonhomogeneous system of equations x-4y+6z=3, -2x+8y-12z=-6, and 2x-y+3z=1
does not have a unique solution since its determinant is
In fact, this system has an infinite number of solutions. To see this, think geometrically. The
three equations represent 3 planes. Two of the equations (the first and the second) represent the
same plane (why?); so, there are only two distinct non-parallel planes. Since two non-parallel
planes intersect in a line, there are an infinite number of points which lie on all three of these planes
(i.e. the system has an infinite number of solutions). To actually find the solutions, we must use a
method such as Gaussian elimination to solve the system of equations.
Numerical methods for solving linear equations can generally be divided into two classes (direct
and iterative method).
the algorithm involves only the matrix A and amounts to its decomposition into a product of two
matrices that have a simpler form. This is called an LU decomposition.
We can also write a matrix containing just the coefficients. This is called the coefficient matrix.
Notice that the matrix is written so that the variables line up in their own columns: x-terms
go in the first column, y-terms in the second column, and z-terms in the third column. It is very
important that each equation is written in standard form ax+by+cz=dax+by+cz=d so that the
variables line up. When there is a missing variable term in an equation, the coefficient is 0.
EXAMPLE 1: Write the augmented matrix for the given system of equations.
Solution:
The augmented matrix displays the coefficients of the variables, and an additional
column for the constants.
We use row operations corresponding to equation operations to obtain a new matrix that is
row-equivalent in a simpler form. Here are the guidelines to obtaining row-echelon form.
(1) In any nonzero row, the first nonzero number is a 1. It is called a leading 1.
(2) Any all-zero rows are placed at the bottom on the matrix.
(3) Any leading 1 is below and to the right of a previous leading 1.
(4) Any column containing a leading 1 has zeros in all other positions in the column.
To solve a system of equations we can perform the following row operations to convert the
coefficient matrix to row-echelon form and do back-substitution to find the solution.
(1) Interchange rows. (Notation: Ri ↔ Rj )
(2) Multiply a row by a constant. (Notation: cRi )
(3) Add the product of a row multiplied by a constant to another row. (Notation: Ri + cRj )
Each of the row operations corresponds to the operations we have already learned to solve
systems of equations in three variables. With these operations, there are some key moves that will
quickly achieve the goal of writing a matrix in row-echelon form. To obtain a matrix in row-echelon
form for finding solutions, we use Gaussian elimination, a method that uses row operations to
obtain a 1 as the first entry so that row 1 can be used to convert the remaining rows.
The Gaussian elimination method refers to a strategy used to obtain the row-echelon form
of a matrix. The goal is to write matrix A with the number 1 as the entry down the main diagonal
and have all zeros below.
The first step of the Gaussian strategy includes obtaining a 1 as the first entry, so that row
1 may be used to alter the rows below.
How to perform row operations to achieve row-echelon form with the given augmented matrix?
(1) The first equation should have a leading coefficient of 1 . Interchange rows or multiply by a
constant, if necessary.
(2) Use row operations to obtain zeros down the first column below the first entry of 1 .
(3) Use row operations to obtain a 1 in row 2, column 2.
(4) Use row operations to obtain zeros down column 2, below the entry of 1.
(5) Use row operations to obtain a 1 in row 3, column 3.
(6) Continue this process for all rows until there is a \(1 in every entry down the main diagonal and
there are only zeros below.
(7) If any rows contain all zeros, place them at the bottom.
Solution:
First, we write this as an augmented matrix.
We want a 1 in row 1, column 1. This can be accomplished by interchanging row 1 and row 2.
We now have a 1 as the first entry in row 1, column 1. Now let’s obtain a 0 in row 2, column 1.
This can be accomplished by multiplying row 1 by −2 , and then adding the result to row 2.
Use back-substitution. The second row of the matrix represents y=1 . Back-substitute y=1 into
the first equation.
EXAMPLE 3: Use Gaussian elimination to solve the given 2×2 system of equations.
Solution
Write the system as an augmented matrix.
Obtain a 1 in row 1, column 1. This can be accomplished by multiplying the first row by 1/2 .
Next, we want a 0 in row 2, column 1. Multiply row 1 by −4 and add row 1 to row 2.
The second row represents the equation 0=4 . Therefore, the system is inconsistent and has no
solution.
Solution
Perform row operations on the augmented matrix to try and achieve row-echelon form.
The matrix ends up with all zeros in the last row: 0y=0 . Thus, there are an infinite number of
solutions and the system is classified as dependent. To find the generic solution, return to one of
the original equations and solve for y .
EXAMPLE 5:
Perform row operations on the given matrix to obtain row-echelon form.
Solution
The first row already has a 1 in row 1, column 1. The next step is to multiply row 1 by −2 and
add it to row 2. Then replace row 2 with the result.
Solution
First, we write the augmented matrix.
Then
EXAMPLE 7:
Solve the following system of linear equations using matrices.
Solution
Write the augmented matrix.
First, multiply row 1 by −1 to get a 1 in row 1, column 1. Then, perform row operations to obtain
row-echelon form.
We see by the identity 0=0 that this is a dependent system with an infinite number of solutions.
We then find the generic solution. By solving the second equation for y and substituting it into the
first equation we can solve for z in terms of x .
Now we substitute the expression for z into the second equation to solve for y in terms of x .
INSTRUCTIONS: Evaluate the following problem. Write your answer in your notebook.
1) Write the system of equations in row-echelon form.
a) x – 2y + 3z = 9
-x + 3y = - 4
2x – 5y + 5z = 17
b) 2x + 5y + 2z = −38
3x – 2y + 4z = 17
−6x + y – 7z = −12
5x + y - 3z = 3
b) 3x – 9z = 33
7x – 4y – z = −15
4x + 6y + 5z = −6
2. The coefficient matrix has no zeros on its main diagonal, namely a11, a12 , and ann are nonzeros.
EXAMPLE 8:
Apply the Jacobi method to solve
5x1 – 2x2 + 3x3 = -1
-3x1 + 9x2 + x3 = 2
2x1 – x2 – 7x3 = 3
Continue iterations until two successive approximations are identical when rounded to three
significant digits.
Solution:
There is no need to rearrange the system because it was already diagonally dominant
(coefficients 5, 9, 7)
To begin, rewrite the system
Second Approximation
−1 2 3
x1(2) = + (0.222) – (-0.429) = 0.146
5 5 5
2 3 1
x2(2) = + (-0.200) – (-0.429) = 0.203
9 9 9
−3 2 1
x3(2) = + (-0.200) – (0.222) = -0.517
7 7 7
Third Approximation
−1 2 3
x1(3) = + (0.203) – (-0.517) = 0.191
5 5 5
2 3 1
x2(3) = + (0.146) – (-0.517) = 0.328
9 9 9
−3 2 1
x3(3) = + (0.146) – (0.203) = -0.416
7 7 7
Fourth Approximation
−1
2 3
x1(4) = + (0.328) – (-0.416) = 0.181
5 5 5
2 3 1
x2(4) = + (0.191) – (-0.416) = 0.332
9 9 9
−32 1
x3(4) = + (0.191) – (0.328) = -0.421
7 7 7
Fifth Approximation
−12 3
x1(5) = + (0.332) – (-0.421) = 0.185
5 5 5
2 3 1
x2(5) = + (0.181) – (-0.421) = 0.329
9 9 9
−3 2 1
x3(5) = + (0.181) – (0.332) = -0.424
7 7 7
Sixth Approximation
−12 3
x1(6) = + (0.329) – (-0.424) = 0.186
5 5 5
2 3 1
x2(6) = + (0.185) – (-0.424) = 0.331
9 9 9
−3 2 1
x3(6) = + (0.185) – (0.329) = -0.422
7 7 7
Since 5th and 6th approximations are identical when rounded to three significant digits, the
solution is approximately equal to (0.186, 0.331, -0.422)
EXAMPLE 9: Let us solve the previous example using Gauss-Seidel method. Round off
upto 3 decimal places
5x1 – 2x2 + 3x3 = -1
-3x1 + 9x2 + x3 = 2
2x1 – x2 – 7x3 = 3
Solution:
The system is diagonally dominant.
To begin, rewrite the system
Second Approximation
−1 2 3
x1(2) = + (0.156) – (-0.508) = 0.167
5 5 5
2 3 1
x2(2) = + (0.167) – (-0.508) = 0.334
9 9 9
−3 2 1
x3(2) = + (0.167) – (0.334) = -0.428
7 7 7
Third Approximation
−1 2 3
x1(3) = + (0.334) – (-0.428) = 0.190
5 5 5
2 3 1
x2(3) = + (0.190) – (-0.428) = 0.333
9 9 9
−3 2 1
x3(3) = + (0.190) – (0.333) = -0.422
7 7 7
Fourth Approximation
−1 2 3
x1(4) = + (0.333) – (-0.422) = 0.186
5 5 5
2 3 1
x2(4) = + (0.186) – (-0.422) = 0.331
9 9 9
−3 2 1
x3(4) = + (0.186) – (0.331) = -0.423
7 7 7
Since 5th and 6th approximations are identical when rounded to three significant digits, the
solution is approximately equal to (0.186, 0.331, -0.423).
Notice that the solution is shorter than using Jacobi Method.
INSTRUCTIONS: Evaluate the following linear equations. Write your answer in your notebook.
1) Use Jacobi method in solving the following:
a) x – 3y + 8z = 11
-x + 5y – z = 7
7x – y + 5z = 15
b) 5x + y + 2z = 8
3x – 2y + 7z = 17
−2x + 6y – z = −12
3) Solve the given system of equation below using Gaussian Elimination and Gauss-Seidel
Method.
−3x + 7y + 2z = 1
−2x + 5y – 9z = −30
8x − 2y - 3z = 21
SUMMARY
Here are the important topics which can help you in reviewing this module:
➢ An augmented matrix is one that contains the coefficients and constants of a system of
equations.
➢ A matrix augmented with the constant column can be represented as the original system of
equations.
➢ Row operations include multiplying a row by a constant, adding one row to another row, and
interchanging rows.
➢ We can use Gaussian elimination to solve a system of equations.
➢ Row operations are performed on matrices to obtain row-echelon form.
➢ To solve a system of equations, write it in augmented matrix form. Perform row operations to
obtain row-echelon form. Back-substitute to find the solutions.
REFERENCES
Student Solutions Manual and Study Guide for Numerical Analysis, 9th Edition
Richard L. Burden, Cengage Learning, 2011