SlideShare a Scribd company logo
1 of 65
Download to read offline
SYSTEM OF LINEAR EQUATIONS
Dr. Gabriel Obed Fosu
Department of Mathematics
Kwame Nkrumah University of Science and Technology
Google Scholar: https://scholar.google.com/citations?user=ZJfCMyQAAAAJ&hl=en&oi=ao
ResearchGate ID: https://www.researchgate.net/profile/Gabriel_Fosu2
Dr. Gabby (KNUST-Maths) System of Linear Equations 1 / 41
Lecture Outline
Introduction
1 Gaussian Elimination
2 Gauss-Jordan Elimination Method
3 Inverse Approach
Computing Inverse
Dr. Gabby (KNUST-Maths) System of Linear Equations 2 / 41
Introduction
Introduction to linear systems
This lecture introduces the basics of solving linear equations using some elimination methods.
A system of n linear equations in n unknowns x1,x2,··· ,xn is a family of equations
a11x1 + a12x2 +···+ a1n xn = b1 (1)
a21x1 + a22x2 +···+ a2n xn = b2 (2)
.
.
. =
.
.
.
an1x1 + an2x2 +···+ ann xn = bn (3)
We wish to determine if such a system has a solution, that is to find out if there exist numbers
x1,x2,··· ,xn that satisfy each of the equations simultaneously.
Dr. Gabby (KNUST-Maths) System of Linear Equations 3 / 41
Introduction
Introduction to linear systems
This lecture introduces the basics of solving linear equations using some elimination methods.
A system of n linear equations in n unknowns x1,x2,··· ,xn is a family of equations
a11x1 + a12x2 +···+ a1n xn = b1 (1)
a21x1 + a22x2 +···+ a2n xn = b2 (2)
.
.
. =
.
.
.
an1x1 + an2x2 +···+ ann xn = bn (3)
We wish to determine if such a system has a solution, that is to find out if there exist numbers
x1,x2,··· ,xn that satisfy each of the equations simultaneously.
We say that the system is consistent if it has a solution. Otherwise, the system is called
inconsistent.
Dr. Gabby (KNUST-Maths) System of Linear Equations 3 / 41
Introduction
Introduction to linear systems
This lecture introduces the basics of solving linear equations using some elimination methods.
A system of n linear equations in n unknowns x1,x2,··· ,xn is a family of equations
a11x1 + a12x2 +···+ a1n xn = b1 (1)
a21x1 + a22x2 +···+ a2n xn = b2 (2)
.
.
. =
.
.
.
an1x1 + an2x2 +···+ ann xn = bn (3)
We wish to determine if such a system has a solution, that is to find out if there exist numbers
x1,x2,··· ,xn that satisfy each of the equations simultaneously.
We say that the system is consistent if it has a solution. Otherwise, the system is called
inconsistent.
More generally, the above is called a homogeneous system of linear equations when b1 = b2 =
··· = bn = 0
Dr. Gabby (KNUST-Maths) System of Linear Equations 3 / 41
Introduction
Geometrically, solving a system of linear equations in two (or three) unknowns is equivalent to
determining whether or not a family of lines (or planes) has a common point of intersection.
(a) Consistent with independent solutions (b) Inconsistent (c) Consistent with dependent solution.
Dr. Gabby (KNUST-Maths) System of Linear Equations 4 / 41
Introduction
Example
Solve the system
2x +3y = 6
x − y = 2
By the elimination or substitution method, the solution to the system is
x = 12/5, y = 2/5 (4)
This approach would be tedious and virtually unworkable for a large number of equations. We will
develop a means of solving systems by using the matrix form of the equation.
Dr. Gabby (KNUST-Maths) System of Linear Equations 5 / 41
Introduction
Solving Square Linear Systems
1 Given the system
a11x1 + a12x2 +···+ a1n xn = b1 (5)
a21x1 + a22x2 +···+ a2n xn = b2 (6)
.
.
. =
.
.
.
an1x1 + an2x2 +···+ ann xn = bn (7)
Dr. Gabby (KNUST-Maths) System of Linear Equations 6 / 41
Introduction
Solving Square Linear Systems
1 Given the system
a11x1 + a12x2 +···+ a1n xn = b1 (5)
a21x1 + a22x2 +···+ a2n xn = b2 (6)
.
.
. =
.
.
.
an1x1 + an2x2 +···+ ann xn = bn (7)
2 This can be recast in matrices as





a11 a12 ··· a1n
a21 a22 ··· a2n
.
.
.
.
.
.
...
.
.
.
an1 an2 ··· ann










x1
x2
.
.
.
xn





=





b1
b2
.
.
.
bn





(8)
Dr. Gabby (KNUST-Maths) System of Linear Equations 6 / 41
Introduction
Solving Square Linear Systems
1 Given the system
a11x1 + a12x2 +···+ a1n xn = b1 (5)
a21x1 + a22x2 +···+ a2n xn = b2 (6)
.
.
. =
.
.
.
an1x1 + an2x2 +···+ ann xn = bn (7)
2 This can be recast in matrices as





a11 a12 ··· a1n
a21 a22 ··· a2n
.
.
.
.
.
.
...
.
.
.
an1 an2 ··· ann










x1
x2
.
.
.
xn





=





b1
b2
.
.
.
bn





(8)
3 Which is of the general from
Ax = b (9)
Dr. Gabby (KNUST-Maths) System of Linear Equations 6 / 41
Introduction
The matrix A is appended by b to form what we call the Augmented Matrix. This is denoted by
A|b =





a11 a12 a13 ···a1n b1
a21 a22 a23 ···a2n b2
.
.
.
.
.
.
.
.
.
...
.
.
.
an1 an2 an3 ···ann bn





(10)
The matrix is really just a compact way of writing the system of equations.
Dr. Gabby (KNUST-Maths) System of Linear Equations 7 / 41
Introduction
Elementary row operations
Three main types of elementary row operations can be performed on matrices:
1 Interchanging two rows: Ri ↔ Rj interchanges rows i and j (Partial Pivoting).
Dr. Gabby (KNUST-Maths) System of Linear Equations 8 / 41
Introduction
Elementary row operations
Three main types of elementary row operations can be performed on matrices:
1 Interchanging two rows: Ri ↔ Rj interchanges rows i and j (Partial Pivoting).
2 Multiplying a row by a nonzero scalar: Ri → tRi multiplies row i by the nonzero scalar t.
Dr. Gabby (KNUST-Maths) System of Linear Equations 8 / 41
Introduction
Elementary row operations
Three main types of elementary row operations can be performed on matrices:
1 Interchanging two rows: Ri ↔ Rj interchanges rows i and j (Partial Pivoting).
2 Multiplying a row by a nonzero scalar: Ri → tRi multiplies row i by the nonzero scalar t.
3 Adding a multiple of one row to another row: Rj → Rj + tRi add t times row i to row j.
Dr. Gabby (KNUST-Maths) System of Linear Equations 8 / 41
Introduction
Elementary row operations
Three main types of elementary row operations can be performed on matrices:
1 Interchanging two rows: Ri ↔ Rj interchanges rows i and j (Partial Pivoting).
2 Multiplying a row by a nonzero scalar: Ri → tRi multiplies row i by the nonzero scalar t.
3 Adding a multiple of one row to another row: Rj → Rj + tRi add t times row i to row j.
Note
The above operations are implemented on the augmented matrix during elimination approach, and
will not change the solution to the system.
Note that performing these operations on the matrix is equivalent to performing the same operations
directly on the equations.
Dr. Gabby (KNUST-Maths) System of Linear Equations 8 / 41
Introduction
Elementary row operations
Three main types of elementary row operations can be performed on matrices:
1 Interchanging two rows: Ri ↔ Rj interchanges rows i and j (Partial Pivoting).
2 Multiplying a row by a nonzero scalar: Ri → tRi multiplies row i by the nonzero scalar t.
3 Adding a multiple of one row to another row: Rj → Rj + tRi add t times row i to row j.
Note
The above operations are implemented on the augmented matrix during elimination approach, and
will not change the solution to the system.
Note that performing these operations on the matrix is equivalent to performing the same operations
directly on the equations.
Definition (Row equivalence)
Matrix A is row-equivalent to matrix B if B is obtained from A by a sequence of elementary row
operations.
Dr. Gabby (KNUST-Maths) System of Linear Equations 8 / 41
Gaussian Elimination
Outline of Presentation
Introduction
1 Gaussian Elimination
2 Gauss-Jordan Elimination Method
3 Inverse Approach
Computing Inverse
Dr. Gabby (KNUST-Maths) System of Linear Equations 9 / 41
Gaussian Elimination
Gaussian Elimination
Gaussian elimination performs row operations on the augmented matrix until the portion
corresponding to the coefficient matrix is reduced to upper-triangular form.
Definition (Upper-Triangular Matrix)
An n ×n matrix A whose entries are of the form
Ui j =
(
ai j i ≤ j
0 i > j
is called an upper triangular matrix. Specifically:
U =





a11 a12 ··· a1n
0 a22 ··· a2n
.
.
.
.
.
.
...
.
.
.
0 0 ··· ann





Dr. Gabby (KNUST-Maths) System of Linear Equations 10 / 41
Gaussian Elimination
The method starts with
A|b =





a11 a12 a13 ···a1n b1
a21 a22 a23 ···a2n b2
.
.
.
.
.
.
.
.
.
...
.
.
.
an1 an2 an3 ···ann bn





(11)
then using row elimination produces a matrix in upper triangular form





c11 c12 c13 ···c1n d1
0 c22 c23 ···c2n d2
.
.
.
.
.
.
.
.
.
...
.
.
.
0 0 0 ···cnn dn





(12)
which is easy to solve using back substitution.
Dr. Gabby (KNUST-Maths) System of Linear Equations 11 / 41
Gaussian Elimination
Gaussian Elimination Procedure
1
Begin at element a11. If a11 = 0, exchange rows so a11 ̸= 0.
Dr. Gabby (KNUST-Maths) System of Linear Equations 12 / 41
Gaussian Elimination
Gaussian Elimination Procedure
1
Begin at element a11. If a11 = 0, exchange rows so a11 ̸= 0.
2
Now make all the elements below a11 zero using elementary row operations
(ERO)
Dr. Gabby (KNUST-Maths) System of Linear Equations 12 / 41
Gaussian Elimination
Gaussian Elimination Procedure
1
Begin at element a11. If a11 = 0, exchange rows so a11 ̸= 0.
2
Now make all the elements below a11 zero using elementary row operations
(ERO)
3
Now perform the same process of elimination using a22 as the pivot.
Dr. Gabby (KNUST-Maths) System of Linear Equations 12 / 41
Gaussian Elimination
Gaussian Elimination Procedure
1
Begin at element a11. If a11 = 0, exchange rows so a11 ̸= 0.
2
Now make all the elements below a11 zero using elementary row operations
(ERO)
3
Now perform the same process of elimination using a22 as the pivot.
4
Repeat this process until the matrix is in upper-triangular form.
Dr. Gabby (KNUST-Maths) System of Linear Equations 12 / 41
Gaussian Elimination
Gaussian Elimination Procedure
1
Begin at element a11. If a11 = 0, exchange rows so a11 ̸= 0.
2
Now make all the elements below a11 zero using elementary row operations
(ERO)
3
Now perform the same process of elimination using a22 as the pivot.
4
Repeat this process until the matrix is in upper-triangular form.
5
Then execute back substitution to compute the solution.
Dr. Gabby (KNUST-Maths) System of Linear Equations 12 / 41
Gaussian Elimination
Example
Solve the following system of equations using the Gaussian elimination method
x1 + x2 + x3 = 1
4x1 +3x2 − x3 = 6
3x1 +5x2 +3x3 = 4
Dr. Gabby (KNUST-Maths) System of Linear Equations 13 / 41
Gaussian Elimination
Solution
This problem is first recast into matrix form as


1 1 1
4 3 −1
3 5 3




x1
x2
x3

 =


1
6
4

 (13)
The augmented matrix is deduced from (13) as


1 1 1 1
4 3 −1 6
3 5 3 4

 (14)
Now, let reduce (14) to an upper triangular matrix using elementary row operations.
Dr. Gabby (KNUST-Maths) System of Linear Equations 14 / 41
Gaussian Elimination
Iteration 1
The first pivot point is 1 in the first column (first term).


1 1 1 1
4 3 −1 6
3 5 3 4

 (15)
We are to reduce the values beneath 1, that is 4 and 3 to zeros using elementary row operations.
The following manipulations are used here.
NR2 = R2 −4R1, =⇒ 4 → 0
NR3 = R3 −3R1, =⇒ 3 → 0
Note that these computations affect the entire row.
Note
NR is used to denote New Row, such that NR2 is read ‘new row 2’.
R is used to denote Row, such that R1 is read ‘row 1’.
Dr. Gabby (KNUST-Maths) System of Linear Equations 15 / 41
Gaussian Elimination
Iteration 1
The first pivot point is 1 in the first column (first term).


1 1 1 1
4 3 −1 6
3 5 3 4

 (15)
We are to reduce the values beneath 1, that is 4 and 3 to zeros using elementary row operations.
The following manipulations are used here.
NR2 = R2 −4R1, =⇒ 4 → 0
NR3 = R3 −3R1, =⇒ 3 → 0
Note that these computations affect the entire row.
Note
NR is used to denote New Row, such that NR2 is read ‘new row 2’.
R is used to denote Row, such that R1 is read ‘row 1’.
Therefore the new matrix is 

1 1 1 1
0 −1 −5 2
0 2 0 1

 (16)
Dr. Gabby (KNUST-Maths) System of Linear Equations 15 / 41
Gaussian Elimination
Iteration 2
The second pivot point is 1 in the second column (diagonal value).


1 1 1 1
0 −1 −5 2
0 2 0 1

 (17)
We are to reduce the value beneath 1, that is 2 to zero using elementary row operations. The
following manipulations are used here.
NR3 = R3 +2R2, =⇒ 2 → 0
Dr. Gabby (KNUST-Maths) System of Linear Equations 16 / 41
Gaussian Elimination
Iteration 2
The second pivot point is 1 in the second column (diagonal value).


1 1 1 1
0 −1 −5 2
0 2 0 1

 (17)
We are to reduce the value beneath 1, that is 2 to zero using elementary row operations. The
following manipulations are used here.
NR3 = R3 +2R2, =⇒ 2 → 0
Therefore the new matrix is 

1 1 1 1
0 −1 −5 2
0 0 −10 5

 (18)
Dr. Gabby (KNUST-Maths) System of Linear Equations 16 / 41
Gaussian Elimination
Now we have an upper triangular matrix. So the solution could be finally obtained using back
substitution. That is substitution and solving from the last row. We have
−10x3 = 5 =⇒ x3 = −0.5
Dr. Gabby (KNUST-Maths) System of Linear Equations 17 / 41
Gaussian Elimination
Now we have an upper triangular matrix. So the solution could be finally obtained using back
substitution. That is substitution and solving from the last row. We have
−10x3 = 5 =⇒ x3 = −0.5
−x2 −5x3 = 2, but x3 = −0.5
−x2 −5(−0.5) = 2
x2 = 0.5
Dr. Gabby (KNUST-Maths) System of Linear Equations 17 / 41
Gaussian Elimination
Now we have an upper triangular matrix. So the solution could be finally obtained using back
substitution. That is substitution and solving from the last row. We have
−10x3 = 5 =⇒ x3 = −0.5
−x2 −5x3 = 2, but x3 = −0.5
−x2 −5(−0.5) = 2
x2 = 0.5
x1 + x2 + x3 = 1
x1 +0.5−0.5 = 1
x1 = 1
These are the solutions to the given problem.
Dr. Gabby (KNUST-Maths) System of Linear Equations 17 / 41
Gaussian Elimination
Dimension
Suppose a system of n linear equations in n unknowns has augmented matrix C and that C is row-
equivalent to a matrix D in upper-triangular form. Then C and D have dimension n ×(n +1).
Dr. Gabby (KNUST-Maths) System of Linear Equations 18 / 41
Gaussian Elimination
Dimension
Suppose a system of n linear equations in n unknowns has augmented matrix C and that C is row-
equivalent to a matrix D in upper-triangular form. Then C and D have dimension n ×(n +1).
Inconsistent System
If we perform elementary row operations on the augmented matrix of the system and get a matrix
with one of its rows equal to
[0 0 0···0 b], where b ̸= 0 (19)
or a row of the form
[0 0 0···0] (20)
then there may be no solution or infinitely many solutions.
Dr. Gabby (KNUST-Maths) System of Linear Equations 18 / 41
Gaussian Elimination
Homogeneous Systems
An n ×n system of homogeneous linear equations
a11x1 + a12x2 +···+ a1n xn = 0
a21x1 + a22x2 +···+ a2n xn = 0
.
.
. =
.
.
.
an1x1 + an2x2 +···+ ann xn = 0
is always consistent since x1 = 0,··· ,xn = 0 is a solution. This solution is called the trivial solution,
and any other solution is called a nontrivial solution.
Dr. Gabby (KNUST-Maths) System of Linear Equations 19 / 41
Gaussian Elimination
Homogeneous Systems
An n ×n system of homogeneous linear equations
a11x1 + a12x2 +···+ a1n xn = 0
a21x1 + a22x2 +···+ a2n xn = 0
.
.
. =
.
.
.
an1x1 + an2x2 +···+ ann xn = 0
is always consistent since x1 = 0,··· ,xn = 0 is a solution. This solution is called the trivial solution,
and any other solution is called a nontrivial solution.
If the homogeneous system Ax = 0 has only the trivial solution, then A is nonsingular; that is A−1
exists.
Dr. Gabby (KNUST-Maths) System of Linear Equations 19 / 41
Gaussian Elimination
Definition (Elementary Matrix)
An elementary matrix is any matrix that can be obtained from the identity matrix by performing a
single elementary row operation.
The elementary matrix formed by interchanging the first and third rows of the 3×3 identity matrix I,
is 

0 0 1
0 1 0
1 0 0


Dr. Gabby (KNUST-Maths) System of Linear Equations 20 / 41
Gauss-Jordan Elimination Method
Outline of Presentation
Introduction
1 Gaussian Elimination
2 Gauss-Jordan Elimination Method
3 Inverse Approach
Computing Inverse
Dr. Gabby (KNUST-Maths) System of Linear Equations 21 / 41
Gauss-Jordan Elimination Method
Gauss-Jordan Elimination Method
1 This method is based on the idea of reducing the given system of equation
Ax = b
to a diagonal matrix of the form
Dx = z
D is the diagonal matrix, and z is the new column vector on the right hand side.
2 All solution techniques of the Gaussian elimination method do apply here. While a given
problem is reduced to an upper triangular matrix in the case of Gaussian elimination, it is
reduced to a diagonal matrix in the case of Gauss-Jordan elimination.
Dr. Gabby (KNUST-Maths) System of Linear Equations 22 / 41
Gauss-Jordan Elimination Method
Example
Solve the following system of equations using the Gauss-Jordan elimination method
x1 + x2 + x3 = 1
4x1 +3x2 − x3 = 6
3x1 +5x2 +3x3 = 4
This problem is first recast into matrix form as


1 1 1
4 3 −1
3 5 3




x1
x2
x3

 =


1
6
4

 (21)
Dr. Gabby (KNUST-Maths) System of Linear Equations 23 / 41
Gauss-Jordan Elimination Method
The augmented matrix is deduced from (41) as


1 1 1 1
4 3 −1 6
3 5 3 4

 (22)
Note that we are to reduce value above and beneath the leading diagonals to zeros.
Now, let reduce (22) to an upper triangular matrix using elementary row operations.
Dr. Gabby (KNUST-Maths) System of Linear Equations 24 / 41
Gauss-Jordan Elimination Method
Iteration 1
The first pivot point is 1 in the first column (first term).


1 1 1 1
4 3 −1 6
3 5 3 4

 (23)
We are to reduce the values beneath 1, that is 4 and 3 to zeros using elementary row operations.
The following manipulations are used here.
NR2 = R2 −4R1, =⇒ 4 → 0
NR3 = R3 −3R1, =⇒ 3 → 0
Therefore the new matrix is 

1 1 1 1
0 −1 −5 2
0 2 0 1

 (24)
Dr. Gabby (KNUST-Maths) System of Linear Equations 25 / 41
Gauss-Jordan Elimination Method
Iteration 2
The second pivot point is 1 in the second column (diagonal value).


1 1 1 1
0 −1 −5 2
0 2 0 1

 (25)
We are to reduce the value beneath 1, that is 2 to zero using elementary row operations. The
following manipulations are used here.
NR3 = R3 +2R2, =⇒ 2 → 0
Therefore the new matrix is 

1 1 1 1
0 −1 −5 2
0 0 −10 5

 (26)
Dr. Gabby (KNUST-Maths) System of Linear Equations 26 / 41
Gauss-Jordan Elimination Method
Iteration 3
Since we need a diagonal matrix, we will start manipulating the other non-diagonal matrix to zero
starting from the leading diagonal of the last column.


1 1 1 1
0 −1 −5 2
0 0 −10 5

 (27)
We are to reduce the values above -10, that is -5 and 1 to zeros elementary row operations. The
following manipulations are used here.
NR2 = 2R2 −R3, =⇒ −5 → 0
NR1 = 10R1 +R3, =⇒ 1 → 0
Dr. Gabby (KNUST-Maths) System of Linear Equations 27 / 41
Gauss-Jordan Elimination Method
Iteration 3
Since we need a diagonal matrix, we will start manipulating the other non-diagonal matrix to zero
starting from the leading diagonal of the last column.


1 1 1 1
0 −1 −5 2
0 0 −10 5

 (27)
We are to reduce the values above -10, that is -5 and 1 to zeros elementary row operations. The
following manipulations are used here.
NR2 = 2R2 −R3, =⇒ −5 → 0
NR1 = 10R1 +R3, =⇒ 1 → 0
The new matrix is


10 10 0 15
0 −2 0 −1
0 0 −10 5

 (28)
Dr. Gabby (KNUST-Maths) System of Linear Equations 27 / 41
Gauss-Jordan Elimination Method
Iteration 4
The next pivot point is -2 in the second column (diagonal value).



10 10 0 15
0 −2 0 −1
0 0 −10 5


 (29)
We are to reduce the value above −2, that is 10 to zero using elementary row operations. The
following manipulations are used here.
NR1 = R1 −5R2, =⇒ 10 → 0
Dr. Gabby (KNUST-Maths) System of Linear Equations 28 / 41
Gauss-Jordan Elimination Method
Iteration 4
The next pivot point is -2 in the second column (diagonal value).



10 10 0 15
0 −2 0 −1
0 0 −10 5


 (29)
We are to reduce the value above −2, that is 10 to zero using elementary row operations. The
following manipulations are used here.
NR1 = R1 −5R2, =⇒ 10 → 0
The new matrix


10 0 0 10
0 −2 0 −1
0 0 −10 5

 (30)
Dr. Gabby (KNUST-Maths) System of Linear Equations 28 / 41
Gauss-Jordan Elimination Method
Since we have reduced the system to a diagonal matrix, the values of x can be obtained using
direct substitution. That is
10x1 = 10 =⇒ x1 = 1
−2x2 = −1 =⇒ x2 = 0.5
−10x3 = 5 =⇒ x3 = −0.5
Dr. Gabby (KNUST-Maths) System of Linear Equations 29 / 41
Inverse Approach
Outline of Presentation
Introduction
1 Gaussian Elimination
2 Gauss-Jordan Elimination Method
3 Inverse Approach
Computing Inverse
Dr. Gabby (KNUST-Maths) System of Linear Equations 30 / 41
Inverse Approach Computing Inverse
Computing Inverse
Begin by setting an augmented matrix of the form A|I. For 3×3 matrix we have
A|I =


a11 a12 a13 1 0 0
a21 a22 a23 0 1 0
a31 a32 a33 0 0 1

 (31)
Then perform ERO on the coefficient matrix to obtain a diagonal matrix. All the while performing
the row operations on the augmented matrix A|I. When the Gauss-Jordan procedure is completed,
we obtain
[A|I] −→ [I|A−1
] (32)
Dr. Gabby (KNUST-Maths) System of Linear Equations 31 / 41
Inverse Approach Computing Inverse
Computing Inverse
Begin by setting an augmented matrix of the form A|I. For 3×3 matrix we have
A|I =


a11 a12 a13 1 0 0
a21 a22 a23 0 1 0
a31 a32 a33 0 0 1

 (31)
Then perform ERO on the coefficient matrix to obtain a diagonal matrix. All the while performing
the row operations on the augmented matrix A|I. When the Gauss-Jordan procedure is completed,
we obtain
[A|I] −→ [I|A−1
] (32)
Note
Partial pivoting can also be done using the augmented matrix [A|I]. However, we cannot first
interchange the rows of A and then find the inverse. Then, we would be finding the inverse of a
different matrix.
Dr. Gabby (KNUST-Maths) System of Linear Equations 31 / 41
Inverse Approach Computing Inverse
Example
Find the inverse of the matrix A =


1 1 1
4 3 −1
3 5 3


Dr. Gabby (KNUST-Maths) System of Linear Equations 32 / 41
Inverse Approach Computing Inverse
Example
Find the inverse of the matrix A =


1 1 1
4 3 −1
3 5 3


We perform the following elementary row transformations and do the eliminations
Iteration 1


1 1 1 1 0 0
4 3 −1 0 1 0
3 5 3 0 0 1


−→
NR2 = R2 −4R1
NR3 = R3 −3R1


1 1 1 1 0 0
0 −1 −5 −4 1 0
0 2 0 −3 0 1

 (33)
Dr. Gabby (KNUST-Maths) System of Linear Equations 32 / 41
Inverse Approach Computing Inverse
Iteration 2


1 1 1 1 0 0
0 −1 −5 −4 1 0
0 2 0 −3 0 1

 −→
NR2 = −R2


1 1 1 1 0 0
0 1 5 4 −1 0
0 2 0 −3 0 1

 (34)
Dr. Gabby (KNUST-Maths) System of Linear Equations 33 / 41
Inverse Approach Computing Inverse
Iteration 2


1 1 1 1 0 0
0 −1 −5 −4 1 0
0 2 0 −3 0 1

 −→
NR2 = −R2


1 1 1 1 0 0
0 1 5 4 −1 0
0 2 0 −3 0 1

 (34)
Iteration 3


1 1 1 1 0 0
0 1 5 4 −1 0
0 2 0 −3 0 1


−→
NR1 = R1 −R2
NR3 = R3 −2R2


1 0 −4 −3 1 0
0 1 5 4 −1 0
0 0 −10 −11 2 1

 (35)
Dr. Gabby (KNUST-Maths) System of Linear Equations 33 / 41
Inverse Approach Computing Inverse
Iteration 4


1 0 −4 −3 1 0
0 1 5 4 −1 0
0 0 −10 −11 2 1

 −→
NR3 = R3/(−10)


1 0 −4 −3 1 0
0 1 5 4 −1 0
0 0 1 11/10 −2/10 −1/10


Dr. Gabby (KNUST-Maths) System of Linear Equations 34 / 41
Inverse Approach Computing Inverse
Iteration 5


1 0 −4 −3 1 0
0 1 5 4 −1 0
0 0 1 11/10 −2/10 −1/10


−→
NR1 = R1 +4R3
NR2 = R2 −5R3


1 0 0 14/10 2/10 −4/10
0 1 0 −15/10 0 5/10
0 0 1 11/10 −2/10 −1/10


Dr. Gabby (KNUST-Maths) System of Linear Equations 35 / 41
Inverse Approach Computing Inverse
Iteration 5


1 0 −4 −3 1 0
0 1 5 4 −1 0
0 0 1 11/10 −2/10 −1/10


−→
NR1 = R1 +4R3
NR2 = R2 −5R3


1 0 0 14/10 2/10 −4/10
0 1 0 −15/10 0 5/10
0 0 1 11/10 −2/10 −1/10


Therefore, the inverse of the given matrix is given by


7/5 1/5 −2/5
−3/2 0 1/2
11/10 −1/5 −1/10


Solve the same problem by employing partial pivoting.
Dr. Gabby (KNUST-Maths) System of Linear Equations 35 / 41
Inverse Approach Computing Inverse
Solving A System of Linear Equation Equation using the Inverse
Approach
1 Given the system
a11x1 + a12x2 +···+ a1n xn = b1 (36)
a21x1 + a22x2 +···+ a2n xn = b2 (37)
.
.
. =
.
.
.
an1x1 + an2x2 +···+ ann xn = bn (38)
2 Which is of the general from
Ax = b (39)
3 Pre-multiply both sides by A−1
x = A−1
b (40)
Note that AA−1
= I
Dr. Gabby (KNUST-Maths) System of Linear Equations 36 / 41
Inverse Approach Computing Inverse
Example
Solve the following system of equations using the inverse approach
x1 + x2 + x3 = 1
4x1 +3x2 − x3 = 6
3x1 +5x2 +3x3 = 4
This problem is first recast into matrix form as


1 1 1
4 3 −1
3 5 3




x1
x2
x3

 =


1
6
4

 (41)
Then we are to find
x = A−1
b (42)
Dr. Gabby (KNUST-Maths) System of Linear Equations 37 / 41
Inverse Approach Computing Inverse
Using A−1
as obtained from above we have


x1
x2
x3

 =


7/5 1/5 −2/5
−3/2 0 1/2
11/10 −1/5 −1/10




1
6
4

 (43)
x1 =
7
5
+
8
5
−
10
5
= 1 (44)
x2 = −
3
2
+0+
4
2
=
1
2
(45)
x3 =
11
10
−
6
5
−
4
10
= −
1
2
(46)
Dr. Gabby (KNUST-Maths) System of Linear Equations 38 / 41
Inverse Approach Computing Inverse
Exercise 1
1 Solve the homogeneous system
−3x1 + x2 + x3 + x4 = 0
x1 −3x2 + x3 + x4 = 0
x1 + x2 −3x3 + x4 = 0
x1 + x2 + x3 −3x4 = 0
2 For which rational numbers λ does the homogeneous system have a nontrivial solution?
x +(λ−3)y = 0
(λ−3)x + y = 0
Dr. Gabby (KNUST-Maths) System of Linear Equations 39 / 41
Inverse Approach Computing Inverse
Exercise 2
Solving the following system of equations using
1 Gaussian elimination method without pivoting
2 Gaussian elimination method with partial pivoting
3 Gaussian elimination method with complete pivoting
4 Gauss-Jordan elimination method.
5 Inverse Approach
10x +4y −2z = 20
3x +12y − z = 28
x +4y +7z = 2
2a +b +c +d = 2
4a +2c +d = 3
3a +2b +2c = −1
a +3b +2c +6d = 2
Dr. Gabby (KNUST-Maths) System of Linear Equations 40 / 41
END OF LECTURE
THANK YOU
Dr. Gabby (KNUST-Maths) System of Linear Equations 41 / 41

More Related Content

Similar to Matrices 2_System of Equations.pdf

Chapter 3: Linear Systems and Matrices - Part 1/Slides
Chapter 3: Linear Systems and Matrices - Part 1/SlidesChapter 3: Linear Systems and Matrices - Part 1/Slides
Chapter 3: Linear Systems and Matrices - Part 1/SlidesChaimae Baroudi
 
Approximate Solution of a Linear Descriptor Dynamic Control System via a non-...
Approximate Solution of a Linear Descriptor Dynamic Control System via a non-...Approximate Solution of a Linear Descriptor Dynamic Control System via a non-...
Approximate Solution of a Linear Descriptor Dynamic Control System via a non-...IOSR Journals
 
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICSRai University
 
1. Linear Algebra for Machine Learning: Linear Systems
1. Linear Algebra for Machine Learning: Linear Systems1. Linear Algebra for Machine Learning: Linear Systems
1. Linear Algebra for Machine Learning: Linear SystemsCeni Babaoglu, PhD
 
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICSRai University
 
Linear equations
Linear equationsLinear equations
Linear equationsNisarg Amin
 
Linear equations rev - copy
Linear equations rev - copyLinear equations rev - copy
Linear equations rev - copyYash Jain
 
Pair of linear equations
Pair of linear equationsPair of linear equations
Pair of linear equationsYash Jain
 
Linear equations rev
Linear equations revLinear equations rev
Linear equations revYash Jain
 
System of equations
System of equationsSystem of equations
System of equationsmariacadena
 
System of equations
System of equationsSystem of equations
System of equationsmariacadena
 
System of equations
System of equationsSystem of equations
System of equationsmariacadena
 

Similar to Matrices 2_System of Equations.pdf (20)

6640173.ppt
6640173.ppt6640173.ppt
6640173.ppt
 
Chapter 3: Linear Systems and Matrices - Part 1/Slides
Chapter 3: Linear Systems and Matrices - Part 1/SlidesChapter 3: Linear Systems and Matrices - Part 1/Slides
Chapter 3: Linear Systems and Matrices - Part 1/Slides
 
01.02 linear equations
01.02 linear equations01.02 linear equations
01.02 linear equations
 
Approximate Solution of a Linear Descriptor Dynamic Control System via a non-...
Approximate Solution of a Linear Descriptor Dynamic Control System via a non-...Approximate Solution of a Linear Descriptor Dynamic Control System via a non-...
Approximate Solution of a Linear Descriptor Dynamic Control System via a non-...
 
Rankmatrix
RankmatrixRankmatrix
Rankmatrix
 
Nsm
Nsm Nsm
Nsm
 
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
 
1. Linear Algebra for Machine Learning: Linear Systems
1. Linear Algebra for Machine Learning: Linear Systems1. Linear Algebra for Machine Learning: Linear Systems
1. Linear Algebra for Machine Learning: Linear Systems
 
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
 
Linear Equations
Linear Equations Linear Equations
Linear Equations
 
system linear equations
 system linear equations  system linear equations
system linear equations
 
Linear equations
Linear equationsLinear equations
Linear equations
 
Linear equations rev - copy
Linear equations rev - copyLinear equations rev - copy
Linear equations rev - copy
 
Pair of linear equations
Pair of linear equationsPair of linear equations
Pair of linear equations
 
23 Matrix Algorithms
23 Matrix Algorithms23 Matrix Algorithms
23 Matrix Algorithms
 
Linear Algebra and its use in finance:
Linear Algebra and its use in finance:Linear Algebra and its use in finance:
Linear Algebra and its use in finance:
 
Linear equations rev
Linear equations revLinear equations rev
Linear equations rev
 
System of equations
System of equationsSystem of equations
System of equations
 
System of equations
System of equationsSystem of equations
System of equations
 
System of equations
System of equationsSystem of equations
System of equations
 

More from Kwame Nkrumah University of Science and Technology (8)

3. Functions II.pdf
3. Functions II.pdf3. Functions II.pdf
3. Functions II.pdf
 
2. Functions I.pdf
2. Functions I.pdf2. Functions I.pdf
2. Functions I.pdf
 
Matrices 1.pdf
Matrices 1.pdfMatrices 1.pdf
Matrices 1.pdf
 
Vectors 2.pdf
Vectors 2.pdfVectors 2.pdf
Vectors 2.pdf
 
Vectors 1.pdf
Vectors 1.pdfVectors 1.pdf
Vectors 1.pdf
 
Complex Numbers 2.pdf
Complex Numbers 2.pdfComplex Numbers 2.pdf
Complex Numbers 2.pdf
 
Complex Numbers 1.pdf
Complex Numbers 1.pdfComplex Numbers 1.pdf
Complex Numbers 1.pdf
 
Number Theory.pdf
Number Theory.pdfNumber Theory.pdf
Number Theory.pdf
 

Recently uploaded

Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEaurabinda banchhor
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 

Recently uploaded (20)

Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSE
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 

Matrices 2_System of Equations.pdf

  • 1. SYSTEM OF LINEAR EQUATIONS Dr. Gabriel Obed Fosu Department of Mathematics Kwame Nkrumah University of Science and Technology Google Scholar: https://scholar.google.com/citations?user=ZJfCMyQAAAAJ&hl=en&oi=ao ResearchGate ID: https://www.researchgate.net/profile/Gabriel_Fosu2 Dr. Gabby (KNUST-Maths) System of Linear Equations 1 / 41
  • 2. Lecture Outline Introduction 1 Gaussian Elimination 2 Gauss-Jordan Elimination Method 3 Inverse Approach Computing Inverse Dr. Gabby (KNUST-Maths) System of Linear Equations 2 / 41
  • 3. Introduction Introduction to linear systems This lecture introduces the basics of solving linear equations using some elimination methods. A system of n linear equations in n unknowns x1,x2,··· ,xn is a family of equations a11x1 + a12x2 +···+ a1n xn = b1 (1) a21x1 + a22x2 +···+ a2n xn = b2 (2) . . . = . . . an1x1 + an2x2 +···+ ann xn = bn (3) We wish to determine if such a system has a solution, that is to find out if there exist numbers x1,x2,··· ,xn that satisfy each of the equations simultaneously. Dr. Gabby (KNUST-Maths) System of Linear Equations 3 / 41
  • 4. Introduction Introduction to linear systems This lecture introduces the basics of solving linear equations using some elimination methods. A system of n linear equations in n unknowns x1,x2,··· ,xn is a family of equations a11x1 + a12x2 +···+ a1n xn = b1 (1) a21x1 + a22x2 +···+ a2n xn = b2 (2) . . . = . . . an1x1 + an2x2 +···+ ann xn = bn (3) We wish to determine if such a system has a solution, that is to find out if there exist numbers x1,x2,··· ,xn that satisfy each of the equations simultaneously. We say that the system is consistent if it has a solution. Otherwise, the system is called inconsistent. Dr. Gabby (KNUST-Maths) System of Linear Equations 3 / 41
  • 5. Introduction Introduction to linear systems This lecture introduces the basics of solving linear equations using some elimination methods. A system of n linear equations in n unknowns x1,x2,··· ,xn is a family of equations a11x1 + a12x2 +···+ a1n xn = b1 (1) a21x1 + a22x2 +···+ a2n xn = b2 (2) . . . = . . . an1x1 + an2x2 +···+ ann xn = bn (3) We wish to determine if such a system has a solution, that is to find out if there exist numbers x1,x2,··· ,xn that satisfy each of the equations simultaneously. We say that the system is consistent if it has a solution. Otherwise, the system is called inconsistent. More generally, the above is called a homogeneous system of linear equations when b1 = b2 = ··· = bn = 0 Dr. Gabby (KNUST-Maths) System of Linear Equations 3 / 41
  • 6. Introduction Geometrically, solving a system of linear equations in two (or three) unknowns is equivalent to determining whether or not a family of lines (or planes) has a common point of intersection. (a) Consistent with independent solutions (b) Inconsistent (c) Consistent with dependent solution. Dr. Gabby (KNUST-Maths) System of Linear Equations 4 / 41
  • 7. Introduction Example Solve the system 2x +3y = 6 x − y = 2 By the elimination or substitution method, the solution to the system is x = 12/5, y = 2/5 (4) This approach would be tedious and virtually unworkable for a large number of equations. We will develop a means of solving systems by using the matrix form of the equation. Dr. Gabby (KNUST-Maths) System of Linear Equations 5 / 41
  • 8. Introduction Solving Square Linear Systems 1 Given the system a11x1 + a12x2 +···+ a1n xn = b1 (5) a21x1 + a22x2 +···+ a2n xn = b2 (6) . . . = . . . an1x1 + an2x2 +···+ ann xn = bn (7) Dr. Gabby (KNUST-Maths) System of Linear Equations 6 / 41
  • 9. Introduction Solving Square Linear Systems 1 Given the system a11x1 + a12x2 +···+ a1n xn = b1 (5) a21x1 + a22x2 +···+ a2n xn = b2 (6) . . . = . . . an1x1 + an2x2 +···+ ann xn = bn (7) 2 This can be recast in matrices as      a11 a12 ··· a1n a21 a22 ··· a2n . . . . . . ... . . . an1 an2 ··· ann           x1 x2 . . . xn      =      b1 b2 . . . bn      (8) Dr. Gabby (KNUST-Maths) System of Linear Equations 6 / 41
  • 10. Introduction Solving Square Linear Systems 1 Given the system a11x1 + a12x2 +···+ a1n xn = b1 (5) a21x1 + a22x2 +···+ a2n xn = b2 (6) . . . = . . . an1x1 + an2x2 +···+ ann xn = bn (7) 2 This can be recast in matrices as      a11 a12 ··· a1n a21 a22 ··· a2n . . . . . . ... . . . an1 an2 ··· ann           x1 x2 . . . xn      =      b1 b2 . . . bn      (8) 3 Which is of the general from Ax = b (9) Dr. Gabby (KNUST-Maths) System of Linear Equations 6 / 41
  • 11. Introduction The matrix A is appended by b to form what we call the Augmented Matrix. This is denoted by A|b =      a11 a12 a13 ···a1n b1 a21 a22 a23 ···a2n b2 . . . . . . . . . ... . . . an1 an2 an3 ···ann bn      (10) The matrix is really just a compact way of writing the system of equations. Dr. Gabby (KNUST-Maths) System of Linear Equations 7 / 41
  • 12. Introduction Elementary row operations Three main types of elementary row operations can be performed on matrices: 1 Interchanging two rows: Ri ↔ Rj interchanges rows i and j (Partial Pivoting). Dr. Gabby (KNUST-Maths) System of Linear Equations 8 / 41
  • 13. Introduction Elementary row operations Three main types of elementary row operations can be performed on matrices: 1 Interchanging two rows: Ri ↔ Rj interchanges rows i and j (Partial Pivoting). 2 Multiplying a row by a nonzero scalar: Ri → tRi multiplies row i by the nonzero scalar t. Dr. Gabby (KNUST-Maths) System of Linear Equations 8 / 41
  • 14. Introduction Elementary row operations Three main types of elementary row operations can be performed on matrices: 1 Interchanging two rows: Ri ↔ Rj interchanges rows i and j (Partial Pivoting). 2 Multiplying a row by a nonzero scalar: Ri → tRi multiplies row i by the nonzero scalar t. 3 Adding a multiple of one row to another row: Rj → Rj + tRi add t times row i to row j. Dr. Gabby (KNUST-Maths) System of Linear Equations 8 / 41
  • 15. Introduction Elementary row operations Three main types of elementary row operations can be performed on matrices: 1 Interchanging two rows: Ri ↔ Rj interchanges rows i and j (Partial Pivoting). 2 Multiplying a row by a nonzero scalar: Ri → tRi multiplies row i by the nonzero scalar t. 3 Adding a multiple of one row to another row: Rj → Rj + tRi add t times row i to row j. Note The above operations are implemented on the augmented matrix during elimination approach, and will not change the solution to the system. Note that performing these operations on the matrix is equivalent to performing the same operations directly on the equations. Dr. Gabby (KNUST-Maths) System of Linear Equations 8 / 41
  • 16. Introduction Elementary row operations Three main types of elementary row operations can be performed on matrices: 1 Interchanging two rows: Ri ↔ Rj interchanges rows i and j (Partial Pivoting). 2 Multiplying a row by a nonzero scalar: Ri → tRi multiplies row i by the nonzero scalar t. 3 Adding a multiple of one row to another row: Rj → Rj + tRi add t times row i to row j. Note The above operations are implemented on the augmented matrix during elimination approach, and will not change the solution to the system. Note that performing these operations on the matrix is equivalent to performing the same operations directly on the equations. Definition (Row equivalence) Matrix A is row-equivalent to matrix B if B is obtained from A by a sequence of elementary row operations. Dr. Gabby (KNUST-Maths) System of Linear Equations 8 / 41
  • 17. Gaussian Elimination Outline of Presentation Introduction 1 Gaussian Elimination 2 Gauss-Jordan Elimination Method 3 Inverse Approach Computing Inverse Dr. Gabby (KNUST-Maths) System of Linear Equations 9 / 41
  • 18. Gaussian Elimination Gaussian Elimination Gaussian elimination performs row operations on the augmented matrix until the portion corresponding to the coefficient matrix is reduced to upper-triangular form. Definition (Upper-Triangular Matrix) An n ×n matrix A whose entries are of the form Ui j = ( ai j i ≤ j 0 i > j is called an upper triangular matrix. Specifically: U =      a11 a12 ··· a1n 0 a22 ··· a2n . . . . . . ... . . . 0 0 ··· ann      Dr. Gabby (KNUST-Maths) System of Linear Equations 10 / 41
  • 19. Gaussian Elimination The method starts with A|b =      a11 a12 a13 ···a1n b1 a21 a22 a23 ···a2n b2 . . . . . . . . . ... . . . an1 an2 an3 ···ann bn      (11) then using row elimination produces a matrix in upper triangular form      c11 c12 c13 ···c1n d1 0 c22 c23 ···c2n d2 . . . . . . . . . ... . . . 0 0 0 ···cnn dn      (12) which is easy to solve using back substitution. Dr. Gabby (KNUST-Maths) System of Linear Equations 11 / 41
  • 20. Gaussian Elimination Gaussian Elimination Procedure 1 Begin at element a11. If a11 = 0, exchange rows so a11 ̸= 0. Dr. Gabby (KNUST-Maths) System of Linear Equations 12 / 41
  • 21. Gaussian Elimination Gaussian Elimination Procedure 1 Begin at element a11. If a11 = 0, exchange rows so a11 ̸= 0. 2 Now make all the elements below a11 zero using elementary row operations (ERO) Dr. Gabby (KNUST-Maths) System of Linear Equations 12 / 41
  • 22. Gaussian Elimination Gaussian Elimination Procedure 1 Begin at element a11. If a11 = 0, exchange rows so a11 ̸= 0. 2 Now make all the elements below a11 zero using elementary row operations (ERO) 3 Now perform the same process of elimination using a22 as the pivot. Dr. Gabby (KNUST-Maths) System of Linear Equations 12 / 41
  • 23. Gaussian Elimination Gaussian Elimination Procedure 1 Begin at element a11. If a11 = 0, exchange rows so a11 ̸= 0. 2 Now make all the elements below a11 zero using elementary row operations (ERO) 3 Now perform the same process of elimination using a22 as the pivot. 4 Repeat this process until the matrix is in upper-triangular form. Dr. Gabby (KNUST-Maths) System of Linear Equations 12 / 41
  • 24. Gaussian Elimination Gaussian Elimination Procedure 1 Begin at element a11. If a11 = 0, exchange rows so a11 ̸= 0. 2 Now make all the elements below a11 zero using elementary row operations (ERO) 3 Now perform the same process of elimination using a22 as the pivot. 4 Repeat this process until the matrix is in upper-triangular form. 5 Then execute back substitution to compute the solution. Dr. Gabby (KNUST-Maths) System of Linear Equations 12 / 41
  • 25. Gaussian Elimination Example Solve the following system of equations using the Gaussian elimination method x1 + x2 + x3 = 1 4x1 +3x2 − x3 = 6 3x1 +5x2 +3x3 = 4 Dr. Gabby (KNUST-Maths) System of Linear Equations 13 / 41
  • 26. Gaussian Elimination Solution This problem is first recast into matrix form as   1 1 1 4 3 −1 3 5 3     x1 x2 x3   =   1 6 4   (13) The augmented matrix is deduced from (13) as   1 1 1 1 4 3 −1 6 3 5 3 4   (14) Now, let reduce (14) to an upper triangular matrix using elementary row operations. Dr. Gabby (KNUST-Maths) System of Linear Equations 14 / 41
  • 27. Gaussian Elimination Iteration 1 The first pivot point is 1 in the first column (first term).   1 1 1 1 4 3 −1 6 3 5 3 4   (15) We are to reduce the values beneath 1, that is 4 and 3 to zeros using elementary row operations. The following manipulations are used here. NR2 = R2 −4R1, =⇒ 4 → 0 NR3 = R3 −3R1, =⇒ 3 → 0 Note that these computations affect the entire row. Note NR is used to denote New Row, such that NR2 is read ‘new row 2’. R is used to denote Row, such that R1 is read ‘row 1’. Dr. Gabby (KNUST-Maths) System of Linear Equations 15 / 41
  • 28. Gaussian Elimination Iteration 1 The first pivot point is 1 in the first column (first term).   1 1 1 1 4 3 −1 6 3 5 3 4   (15) We are to reduce the values beneath 1, that is 4 and 3 to zeros using elementary row operations. The following manipulations are used here. NR2 = R2 −4R1, =⇒ 4 → 0 NR3 = R3 −3R1, =⇒ 3 → 0 Note that these computations affect the entire row. Note NR is used to denote New Row, such that NR2 is read ‘new row 2’. R is used to denote Row, such that R1 is read ‘row 1’. Therefore the new matrix is   1 1 1 1 0 −1 −5 2 0 2 0 1   (16) Dr. Gabby (KNUST-Maths) System of Linear Equations 15 / 41
  • 29. Gaussian Elimination Iteration 2 The second pivot point is 1 in the second column (diagonal value).   1 1 1 1 0 −1 −5 2 0 2 0 1   (17) We are to reduce the value beneath 1, that is 2 to zero using elementary row operations. The following manipulations are used here. NR3 = R3 +2R2, =⇒ 2 → 0 Dr. Gabby (KNUST-Maths) System of Linear Equations 16 / 41
  • 30. Gaussian Elimination Iteration 2 The second pivot point is 1 in the second column (diagonal value).   1 1 1 1 0 −1 −5 2 0 2 0 1   (17) We are to reduce the value beneath 1, that is 2 to zero using elementary row operations. The following manipulations are used here. NR3 = R3 +2R2, =⇒ 2 → 0 Therefore the new matrix is   1 1 1 1 0 −1 −5 2 0 0 −10 5   (18) Dr. Gabby (KNUST-Maths) System of Linear Equations 16 / 41
  • 31. Gaussian Elimination Now we have an upper triangular matrix. So the solution could be finally obtained using back substitution. That is substitution and solving from the last row. We have −10x3 = 5 =⇒ x3 = −0.5 Dr. Gabby (KNUST-Maths) System of Linear Equations 17 / 41
  • 32. Gaussian Elimination Now we have an upper triangular matrix. So the solution could be finally obtained using back substitution. That is substitution and solving from the last row. We have −10x3 = 5 =⇒ x3 = −0.5 −x2 −5x3 = 2, but x3 = −0.5 −x2 −5(−0.5) = 2 x2 = 0.5 Dr. Gabby (KNUST-Maths) System of Linear Equations 17 / 41
  • 33. Gaussian Elimination Now we have an upper triangular matrix. So the solution could be finally obtained using back substitution. That is substitution and solving from the last row. We have −10x3 = 5 =⇒ x3 = −0.5 −x2 −5x3 = 2, but x3 = −0.5 −x2 −5(−0.5) = 2 x2 = 0.5 x1 + x2 + x3 = 1 x1 +0.5−0.5 = 1 x1 = 1 These are the solutions to the given problem. Dr. Gabby (KNUST-Maths) System of Linear Equations 17 / 41
  • 34. Gaussian Elimination Dimension Suppose a system of n linear equations in n unknowns has augmented matrix C and that C is row- equivalent to a matrix D in upper-triangular form. Then C and D have dimension n ×(n +1). Dr. Gabby (KNUST-Maths) System of Linear Equations 18 / 41
  • 35. Gaussian Elimination Dimension Suppose a system of n linear equations in n unknowns has augmented matrix C and that C is row- equivalent to a matrix D in upper-triangular form. Then C and D have dimension n ×(n +1). Inconsistent System If we perform elementary row operations on the augmented matrix of the system and get a matrix with one of its rows equal to [0 0 0···0 b], where b ̸= 0 (19) or a row of the form [0 0 0···0] (20) then there may be no solution or infinitely many solutions. Dr. Gabby (KNUST-Maths) System of Linear Equations 18 / 41
  • 36. Gaussian Elimination Homogeneous Systems An n ×n system of homogeneous linear equations a11x1 + a12x2 +···+ a1n xn = 0 a21x1 + a22x2 +···+ a2n xn = 0 . . . = . . . an1x1 + an2x2 +···+ ann xn = 0 is always consistent since x1 = 0,··· ,xn = 0 is a solution. This solution is called the trivial solution, and any other solution is called a nontrivial solution. Dr. Gabby (KNUST-Maths) System of Linear Equations 19 / 41
  • 37. Gaussian Elimination Homogeneous Systems An n ×n system of homogeneous linear equations a11x1 + a12x2 +···+ a1n xn = 0 a21x1 + a22x2 +···+ a2n xn = 0 . . . = . . . an1x1 + an2x2 +···+ ann xn = 0 is always consistent since x1 = 0,··· ,xn = 0 is a solution. This solution is called the trivial solution, and any other solution is called a nontrivial solution. If the homogeneous system Ax = 0 has only the trivial solution, then A is nonsingular; that is A−1 exists. Dr. Gabby (KNUST-Maths) System of Linear Equations 19 / 41
  • 38. Gaussian Elimination Definition (Elementary Matrix) An elementary matrix is any matrix that can be obtained from the identity matrix by performing a single elementary row operation. The elementary matrix formed by interchanging the first and third rows of the 3×3 identity matrix I, is   0 0 1 0 1 0 1 0 0   Dr. Gabby (KNUST-Maths) System of Linear Equations 20 / 41
  • 39. Gauss-Jordan Elimination Method Outline of Presentation Introduction 1 Gaussian Elimination 2 Gauss-Jordan Elimination Method 3 Inverse Approach Computing Inverse Dr. Gabby (KNUST-Maths) System of Linear Equations 21 / 41
  • 40. Gauss-Jordan Elimination Method Gauss-Jordan Elimination Method 1 This method is based on the idea of reducing the given system of equation Ax = b to a diagonal matrix of the form Dx = z D is the diagonal matrix, and z is the new column vector on the right hand side. 2 All solution techniques of the Gaussian elimination method do apply here. While a given problem is reduced to an upper triangular matrix in the case of Gaussian elimination, it is reduced to a diagonal matrix in the case of Gauss-Jordan elimination. Dr. Gabby (KNUST-Maths) System of Linear Equations 22 / 41
  • 41. Gauss-Jordan Elimination Method Example Solve the following system of equations using the Gauss-Jordan elimination method x1 + x2 + x3 = 1 4x1 +3x2 − x3 = 6 3x1 +5x2 +3x3 = 4 This problem is first recast into matrix form as   1 1 1 4 3 −1 3 5 3     x1 x2 x3   =   1 6 4   (21) Dr. Gabby (KNUST-Maths) System of Linear Equations 23 / 41
  • 42. Gauss-Jordan Elimination Method The augmented matrix is deduced from (41) as   1 1 1 1 4 3 −1 6 3 5 3 4   (22) Note that we are to reduce value above and beneath the leading diagonals to zeros. Now, let reduce (22) to an upper triangular matrix using elementary row operations. Dr. Gabby (KNUST-Maths) System of Linear Equations 24 / 41
  • 43. Gauss-Jordan Elimination Method Iteration 1 The first pivot point is 1 in the first column (first term).   1 1 1 1 4 3 −1 6 3 5 3 4   (23) We are to reduce the values beneath 1, that is 4 and 3 to zeros using elementary row operations. The following manipulations are used here. NR2 = R2 −4R1, =⇒ 4 → 0 NR3 = R3 −3R1, =⇒ 3 → 0 Therefore the new matrix is   1 1 1 1 0 −1 −5 2 0 2 0 1   (24) Dr. Gabby (KNUST-Maths) System of Linear Equations 25 / 41
  • 44. Gauss-Jordan Elimination Method Iteration 2 The second pivot point is 1 in the second column (diagonal value).   1 1 1 1 0 −1 −5 2 0 2 0 1   (25) We are to reduce the value beneath 1, that is 2 to zero using elementary row operations. The following manipulations are used here. NR3 = R3 +2R2, =⇒ 2 → 0 Therefore the new matrix is   1 1 1 1 0 −1 −5 2 0 0 −10 5   (26) Dr. Gabby (KNUST-Maths) System of Linear Equations 26 / 41
  • 45. Gauss-Jordan Elimination Method Iteration 3 Since we need a diagonal matrix, we will start manipulating the other non-diagonal matrix to zero starting from the leading diagonal of the last column.   1 1 1 1 0 −1 −5 2 0 0 −10 5   (27) We are to reduce the values above -10, that is -5 and 1 to zeros elementary row operations. The following manipulations are used here. NR2 = 2R2 −R3, =⇒ −5 → 0 NR1 = 10R1 +R3, =⇒ 1 → 0 Dr. Gabby (KNUST-Maths) System of Linear Equations 27 / 41
  • 46. Gauss-Jordan Elimination Method Iteration 3 Since we need a diagonal matrix, we will start manipulating the other non-diagonal matrix to zero starting from the leading diagonal of the last column.   1 1 1 1 0 −1 −5 2 0 0 −10 5   (27) We are to reduce the values above -10, that is -5 and 1 to zeros elementary row operations. The following manipulations are used here. NR2 = 2R2 −R3, =⇒ −5 → 0 NR1 = 10R1 +R3, =⇒ 1 → 0 The new matrix is   10 10 0 15 0 −2 0 −1 0 0 −10 5   (28) Dr. Gabby (KNUST-Maths) System of Linear Equations 27 / 41
  • 47. Gauss-Jordan Elimination Method Iteration 4 The next pivot point is -2 in the second column (diagonal value).    10 10 0 15 0 −2 0 −1 0 0 −10 5    (29) We are to reduce the value above −2, that is 10 to zero using elementary row operations. The following manipulations are used here. NR1 = R1 −5R2, =⇒ 10 → 0 Dr. Gabby (KNUST-Maths) System of Linear Equations 28 / 41
  • 48. Gauss-Jordan Elimination Method Iteration 4 The next pivot point is -2 in the second column (diagonal value).    10 10 0 15 0 −2 0 −1 0 0 −10 5    (29) We are to reduce the value above −2, that is 10 to zero using elementary row operations. The following manipulations are used here. NR1 = R1 −5R2, =⇒ 10 → 0 The new matrix   10 0 0 10 0 −2 0 −1 0 0 −10 5   (30) Dr. Gabby (KNUST-Maths) System of Linear Equations 28 / 41
  • 49. Gauss-Jordan Elimination Method Since we have reduced the system to a diagonal matrix, the values of x can be obtained using direct substitution. That is 10x1 = 10 =⇒ x1 = 1 −2x2 = −1 =⇒ x2 = 0.5 −10x3 = 5 =⇒ x3 = −0.5 Dr. Gabby (KNUST-Maths) System of Linear Equations 29 / 41
  • 50. Inverse Approach Outline of Presentation Introduction 1 Gaussian Elimination 2 Gauss-Jordan Elimination Method 3 Inverse Approach Computing Inverse Dr. Gabby (KNUST-Maths) System of Linear Equations 30 / 41
  • 51. Inverse Approach Computing Inverse Computing Inverse Begin by setting an augmented matrix of the form A|I. For 3×3 matrix we have A|I =   a11 a12 a13 1 0 0 a21 a22 a23 0 1 0 a31 a32 a33 0 0 1   (31) Then perform ERO on the coefficient matrix to obtain a diagonal matrix. All the while performing the row operations on the augmented matrix A|I. When the Gauss-Jordan procedure is completed, we obtain [A|I] −→ [I|A−1 ] (32) Dr. Gabby (KNUST-Maths) System of Linear Equations 31 / 41
  • 52. Inverse Approach Computing Inverse Computing Inverse Begin by setting an augmented matrix of the form A|I. For 3×3 matrix we have A|I =   a11 a12 a13 1 0 0 a21 a22 a23 0 1 0 a31 a32 a33 0 0 1   (31) Then perform ERO on the coefficient matrix to obtain a diagonal matrix. All the while performing the row operations on the augmented matrix A|I. When the Gauss-Jordan procedure is completed, we obtain [A|I] −→ [I|A−1 ] (32) Note Partial pivoting can also be done using the augmented matrix [A|I]. However, we cannot first interchange the rows of A and then find the inverse. Then, we would be finding the inverse of a different matrix. Dr. Gabby (KNUST-Maths) System of Linear Equations 31 / 41
  • 53. Inverse Approach Computing Inverse Example Find the inverse of the matrix A =   1 1 1 4 3 −1 3 5 3   Dr. Gabby (KNUST-Maths) System of Linear Equations 32 / 41
  • 54. Inverse Approach Computing Inverse Example Find the inverse of the matrix A =   1 1 1 4 3 −1 3 5 3   We perform the following elementary row transformations and do the eliminations Iteration 1   1 1 1 1 0 0 4 3 −1 0 1 0 3 5 3 0 0 1   −→ NR2 = R2 −4R1 NR3 = R3 −3R1   1 1 1 1 0 0 0 −1 −5 −4 1 0 0 2 0 −3 0 1   (33) Dr. Gabby (KNUST-Maths) System of Linear Equations 32 / 41
  • 55. Inverse Approach Computing Inverse Iteration 2   1 1 1 1 0 0 0 −1 −5 −4 1 0 0 2 0 −3 0 1   −→ NR2 = −R2   1 1 1 1 0 0 0 1 5 4 −1 0 0 2 0 −3 0 1   (34) Dr. Gabby (KNUST-Maths) System of Linear Equations 33 / 41
  • 56. Inverse Approach Computing Inverse Iteration 2   1 1 1 1 0 0 0 −1 −5 −4 1 0 0 2 0 −3 0 1   −→ NR2 = −R2   1 1 1 1 0 0 0 1 5 4 −1 0 0 2 0 −3 0 1   (34) Iteration 3   1 1 1 1 0 0 0 1 5 4 −1 0 0 2 0 −3 0 1   −→ NR1 = R1 −R2 NR3 = R3 −2R2   1 0 −4 −3 1 0 0 1 5 4 −1 0 0 0 −10 −11 2 1   (35) Dr. Gabby (KNUST-Maths) System of Linear Equations 33 / 41
  • 57. Inverse Approach Computing Inverse Iteration 4   1 0 −4 −3 1 0 0 1 5 4 −1 0 0 0 −10 −11 2 1   −→ NR3 = R3/(−10)   1 0 −4 −3 1 0 0 1 5 4 −1 0 0 0 1 11/10 −2/10 −1/10   Dr. Gabby (KNUST-Maths) System of Linear Equations 34 / 41
  • 58. Inverse Approach Computing Inverse Iteration 5   1 0 −4 −3 1 0 0 1 5 4 −1 0 0 0 1 11/10 −2/10 −1/10   −→ NR1 = R1 +4R3 NR2 = R2 −5R3   1 0 0 14/10 2/10 −4/10 0 1 0 −15/10 0 5/10 0 0 1 11/10 −2/10 −1/10   Dr. Gabby (KNUST-Maths) System of Linear Equations 35 / 41
  • 59. Inverse Approach Computing Inverse Iteration 5   1 0 −4 −3 1 0 0 1 5 4 −1 0 0 0 1 11/10 −2/10 −1/10   −→ NR1 = R1 +4R3 NR2 = R2 −5R3   1 0 0 14/10 2/10 −4/10 0 1 0 −15/10 0 5/10 0 0 1 11/10 −2/10 −1/10   Therefore, the inverse of the given matrix is given by   7/5 1/5 −2/5 −3/2 0 1/2 11/10 −1/5 −1/10   Solve the same problem by employing partial pivoting. Dr. Gabby (KNUST-Maths) System of Linear Equations 35 / 41
  • 60. Inverse Approach Computing Inverse Solving A System of Linear Equation Equation using the Inverse Approach 1 Given the system a11x1 + a12x2 +···+ a1n xn = b1 (36) a21x1 + a22x2 +···+ a2n xn = b2 (37) . . . = . . . an1x1 + an2x2 +···+ ann xn = bn (38) 2 Which is of the general from Ax = b (39) 3 Pre-multiply both sides by A−1 x = A−1 b (40) Note that AA−1 = I Dr. Gabby (KNUST-Maths) System of Linear Equations 36 / 41
  • 61. Inverse Approach Computing Inverse Example Solve the following system of equations using the inverse approach x1 + x2 + x3 = 1 4x1 +3x2 − x3 = 6 3x1 +5x2 +3x3 = 4 This problem is first recast into matrix form as   1 1 1 4 3 −1 3 5 3     x1 x2 x3   =   1 6 4   (41) Then we are to find x = A−1 b (42) Dr. Gabby (KNUST-Maths) System of Linear Equations 37 / 41
  • 62. Inverse Approach Computing Inverse Using A−1 as obtained from above we have   x1 x2 x3   =   7/5 1/5 −2/5 −3/2 0 1/2 11/10 −1/5 −1/10     1 6 4   (43) x1 = 7 5 + 8 5 − 10 5 = 1 (44) x2 = − 3 2 +0+ 4 2 = 1 2 (45) x3 = 11 10 − 6 5 − 4 10 = − 1 2 (46) Dr. Gabby (KNUST-Maths) System of Linear Equations 38 / 41
  • 63. Inverse Approach Computing Inverse Exercise 1 1 Solve the homogeneous system −3x1 + x2 + x3 + x4 = 0 x1 −3x2 + x3 + x4 = 0 x1 + x2 −3x3 + x4 = 0 x1 + x2 + x3 −3x4 = 0 2 For which rational numbers λ does the homogeneous system have a nontrivial solution? x +(λ−3)y = 0 (λ−3)x + y = 0 Dr. Gabby (KNUST-Maths) System of Linear Equations 39 / 41
  • 64. Inverse Approach Computing Inverse Exercise 2 Solving the following system of equations using 1 Gaussian elimination method without pivoting 2 Gaussian elimination method with partial pivoting 3 Gaussian elimination method with complete pivoting 4 Gauss-Jordan elimination method. 5 Inverse Approach 10x +4y −2z = 20 3x +12y − z = 28 x +4y +7z = 2 2a +b +c +d = 2 4a +2c +d = 3 3a +2b +2c = −1 a +3b +2c +6d = 2 Dr. Gabby (KNUST-Maths) System of Linear Equations 40 / 41
  • 65. END OF LECTURE THANK YOU Dr. Gabby (KNUST-Maths) System of Linear Equations 41 / 41