Chapter 0 Introduction: 0.1 Introduction to linear algebra: Mathematics is the background of every engineering fields. Together with physics, mathematics has helped engineering develop. Without it, engineering cannot have evolved so fast we can see today. Also mathematics is useful in so many areas because it is abstract: the same good idea can unlock the problems of control engineers, civil engineers, physicists, social scientists, and mathematicians only because the idea has been abstracted from a particular setting. One technique solves many problems only because someone has established a theory of how to deal with these kinds of problems. We use definitions to try to capture important ideas, and we use theorems to summarize useful general facts about the kind of problems we are studying. Proofs not only show us that a statement is true; they can help us understand the statement, give us practice using important ideas, and make it easier to learn a given subject. Without mathematics, engineering cannot become so fascinating as it is now. numerical analysis (Which will be our subject), calculus, statistics, differential equations and Linear algebra are taught as they are important to understand many engineering subjects such as fluid mechanics, heat transfer, electric circuits, Computer engineering and mechanics of materials to name a few. it is accurate to say that a discrete math course and calculus indeed provides sufficient mathematical background for a computer scientist and engineering working in the โcoreโ areas of the field, such as databases, compilers, operating systems, architecture, and networks. Other mathematical issues no doubt arise even in these areas, but peripherally and unsystematically; the computer scientist can learn the math needed as it arises.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Chapter 0 Introduction:
0.1 Introduction to linear algebra:
Mathematics is the background of every engineering fields. Together with physics,
mathematics has helped engineering develop. Without it, engineering cannot have
evolved so fast we can see today.
Also mathematics is useful in so many areas because it is abstract: the same good
idea can unlock the problems of control engineers, civil engineers, physicists, social
scientists, and mathematicians only because the idea has been abstracted from a
particular setting. One technique solves many problems only because someone has
established a theory of how to deal with these kinds of problems.
We use definitions to try to capture important ideas, and we use theorems to
summarize useful general facts about the kind of problems we are studying. Proofs
not only show us that a statement is true; they can help us understand the
statement, give us practice using important ideas, and make it easier to learn a
given subject.
Without mathematics, engineering cannot become so fascinating as it is now.
numerical analysis (Which will be our subject), calculus, statistics, differential
equations and Linear algebra are taught as they are important to understand many
engineering subjects such as fluid mechanics, heat transfer, electric circuits,
Computer engineering and mechanics of materials to name a few.
it is accurate to say that a discrete math course and calculus indeed provides
sufficient mathematical background for a computer scientist and engineering
working in the โcoreโ areas of the field, such as databases, compilers, operating
systems, architecture, and networks. Other mathematical issues no doubt arise
even in these areas, but peripherally and unsystematically; the computer scientist
can learn the math needed as it arises.
However, Numerical analysis can be defined as the development and
implementation of techniques to find numerical solution to mathematic,
Engineering and science problems. It also involves mathematics in developing
techniques for the approximate solution for the implementation of these
techniques in an optimal fashion for the particular computer programs. With the
accessibility of computers, it is now possible to get rapid and accurate solution to
many complex problems that create difficulties for, the mathematician, engineer
and scientist.
When engineering system are modeled, the mathematical description is developed
in term of sets of algebraic equation. Sometime these equations are linear and
sometime nonlinear. In first part we discuss systems of linear equation and how to
solve them using direct methods.
However, The solution of a system of linear algebraic equation probably one of the
most important topic in engineering computations.
In second part we will study one of the most fundamental problems of numerical
analysis, namely the numerical solution of nonlinear equations. Where most
equations are arising in practice are nonlinear and are of a form that allows the
roots to be determined exactly. Consequently, numerical methods are used to
solve nonlinear equations when the equations prove intractable to ordinary
mathematical techniques. These numerical methods are all iterative. At part three
we will describe numerical methods for the approximation of functions other than
elementary functions. Where the main purpose of these techniques is to replace a
complicated function by one that simpler and more manageable. Finally, in part
four we will deal with techniques for approximating numerically the two
fundamental operations of calculus, differentiation and integrations. Both of these
problems may be approached in the same way. Although both numerical
differentiation and numerical integration formulas will be discussed.
What does the term linear equation mean?
An equation is where two mathematical expressions are defined as being equal. A
linear equation is one where all the variables such as
x, y, z
have index (power) of 1 or 0 only,
for example
x + 2y + z = 5
is a linear equation. The following are also linear equations:
x = 3;
x + 2y = 5;
3x + y + z + w = โ8
The following are not linear equations:
1. ๐ฅ2 โ 1 = 0
2. ๐ฅ + ๐ฆ4 + โ๐ง = 9
3. sin(x) โ y + z = 3
Why not?
In equation (1) the index (power) of the variable x is 2, so this is actually a quadratic
equation.
In equation (2) the index of y is 4 and z is 1/2.
In equation (3) the variable x is an argument of the trigonometric function sine.
Note that if an equation contains an argument of trigonometric, exponential,
logarithmic or hyperbolic functions then the equation is not linear.
A set of linear equations is called a linear system.
In this course on linear algebra we examine the following questions regarding
linear systems:
โ Are there any solutions?
โ Does the system have no solution, a unique solution or an infinite number of
solutions?
โ How can we find all the solutions, if they exist?
โ Is there some sort of structure to the solutions?
Linear algebra is a systematic exploration of linear equations and is related to โa
new kind of arithmeticโ called the arithmetic of matrices which we will discuss later
in the chapter.
However, linear algebra isnโt exclusively about solving linear systems. The tools of
matrices and vectors have a whole wealth of applications in the fields of functional
analysis and quantum mechanics, where inner product spaces are important. Other
applications include optimization and approximation where the critical questions
are:
1. Given a set of points, whatโs the best linear model for them?
2. Given a function, whatโs the best polynomial approximation to it?
To solve these problems, we need to use the concepts of eigenvalues and
eigenvectors and orthonormal bases which are discussed in later chapters. In all of
mathematics, the concept of linearization is critical because linear problems are
very well understood and we can say a lot about them. For this reason, we try to
convert many areas of mathematics to linear problems so that we can solve them.
Linear algebra is essentially the study of vectors, matrices, and linear mappings.
Many of the concepts introduced in linear algebra are natural and easy, but some
may seem unnatural and "technical" to beginners. Do not avoid these apparently
more difficult ideas; use examples and theorems to see how these ideas are an
essential part of the story of linear algebra.
0.2 Introduction to matrix:
Engineering Mathematics is applied in our daily life. Applied Mathematics is future
classified as vector algebra, differential calculus, integration, discrete Mathematics,
Matrices etc. Matrices are one of the most powerful tools in mathematics. The
evolution of the concept of matrices is the result of an attempt to obtain compact
and simple methods of solving the system of linear equations.
Matrices have a long history of application in solving linear equations. The first
example of the use of matrix methods to solve simultaneous equations, including
the concept of determinants. In this semester we will study overview of application
of matrices in engineering and science.
A Matrices is a two dimensional arrangement of numbers in row and column
enclosed by a pair of square brackets or can say matrices are nothing but the
rectangular arrangement of numbers, expression, symbols which are arranged in
column and rows. Matrices find many applications in scientific field and apply to
practical real life problem.
The scientist understand that the originality of matrix came from the study of
system of simultaneous linear equation.
0.3 Applications of Matrices:
Matrices have many applications in diverse fields of science, commerce and social
science. Matrices are used.
1- Use of Matrices in Computer Graphics
Matrix transforms are very useful within the world of computer graphics,
Software and hardware graphics processor uses matrices for performing
operations such as scaling translation, reflection and rotation.
Note: Systems of equations are a very useful tool for modeling real-life situations
and answering questions about them. If you can translate the application into two
linear equations with two variables or more, then you have a system of equations
that you can solve to find the solution. You can use any method to solve the system
of equations.
Example : Suppose you want to know the win/loss record of your favorer football
team. You know they played 24 games during the season, and you also know that
they won 15 more games than they lost. We are looking for the number of wins
and the number of losses, so we have two unknowns.
Note: Systems of equations are used to solve applications when there is more than
one unknown and there is enough information to set up equations in those
unknowns. In general, if there are n unknowns, we need enough information to set
up n equations in those unknowns.
Solution: The first thing we want to do is represent our unknowns using variables. Let's let
x = number of wins and
y= number of losses.
We are given that the team played 24 games total. We know that the number of wins plus the number of losses has to equal the total number of games played. Therefore,
x + y = 24.
We have our first equation.
Since there are two unknowns, we know we want one more equation. We are told that the team won 15 more games than they lost. This tells us that the number of losses plus 15 would give the number of wins.
Putting that in equation form, we have that
y + 15 = x.
We have our second equation, so we have our system of equations.
x + y = 24.
-x + y = -15.
Note: One application of system of equations are known as value problems. Value problems are ones where each variable has a value attached to it.
Ex: the marketing team for an event venue wants to know how to focus their advertising based on who is attending specific eventsโchildren, or adults? They know the cost of a ticket to a basketball game is $20.00 for children and $30.00 for adults.
Additionally, on a certain day, attendance at the game is 4,000 and the total gate revenue is $80,000. How can the marketing team use this information to find out whether to spend more money on advertising directed toward children or adults?
Ex: A total of $8,300 was invested in two accounts. Part was invested in a computer at a 4% annual interest rate and part was invested in a money market fund at a 5% annual interest rate. If the total simple interest for one year was $260, then how much was invested in each account.
Ex: A farmer has three types of milk, one that is 24% butterfat, 15% butterfat and another which is 18% butterfat. How much of each should he use to end up with 44 gallons of 25% butterfat.
In Figure a the three planes intersect at a point corresponding to the situation in
which System has a unique solution.
Figure b depicts a situation in which there are infinitely many solutions to the
system. Here, the three planes intersect along a line, and the solutions are represented by the infinitely many points lying on this line.
In Figure c, the three planes are parallel and distinct, so there is no point in common
to all three planes; System has no solution in this case.
Example: Manufactur wishes to produce three types of souvenirs: types A, B, and
C. To manufacture
Type-A souvenir requires 2 minutes on machine I, 1 minute on machine II, and 2
minutes on machine III.
Type-B souvenir requires 1 minute on machine I, 3 minutes on machine II, and 1
minute on machine III.
Type-C souvenir requires 1 minute on machine I and 2 minutes each on machines
II and III.
There are 3 hours available on machine I, 5 hours available on machine II, and 4
hours available on machine III for processing the order. How many souvenirs of
each type should make in order to use all of the available time? Formulate and
solve the problem.
Solution: The given information may be tabulated as follows.
Type A Type B Type C Time Available (min)
Machine I 2 1 1 180
Machine II 1 3 2 300
Machine III 2 1 2 240
We have to determine the number of each of three types of souvenirs to be made.
So, let x, y, and z denote the respective numbers of type-A, type-B, and type-C
souvenirs to be made.
The total amount of time that machine I is used is given by 2x + y+ z minutes and
must equal 180 minutes. This leads to the equation
2๐ฅ + ๐ฆ + ๐ง = 180 Time spent on machine I
Similar considerations on the use of machines II and III lead to the following
equations:
๐ฅ + 3๐ฆ + 2๐ง = 300 Time spent on machine II
2๐ฅ + ๐ฆ + 2๐ง = 240 Time spent on machine III
Then the solution to the problem is found by solving the following system of linear
equations: illustrates each of these possibilities.
2๐ฅ + ๐ฆ + ๐ง = 180
๐ฅ + 3๐ฆ + 2 ๐ง = 300
2๐ฅ + ๐ฆ + 2๐ง = 240
Chapter 2: Introduction to Matrices and Matrix algebra
2.1 Introduction:
Information in science, business, engineering and mathematics is often organized
into rows and columns to form rectangular arrays called โmatricesโ (plural of
โmatrixโ). Matrices often appear as tables of numerical data that arise from
physical observations, but they occur in various mathematical contexts as well. For
example, we will see in the coming chapters that all of the information required to
solve a system of linear equations such as
5๐ฅ + ๐ฆ = 3
2๐ฅ โ ๐ฆ = 4
is embodied in the matrix
(5 1 โฎ 32 โ1 โฎ 4
)
and that the solution of the system can be obtained by performing appropriate
operations on this matrix. This is particularly important in developing computer
programs for solving systems of equations because computers are well suited for
manipulating arrays of numerical information.
However, matrices are not simply a notational tool for solving systems of
equations; they can be viewed as mathematical objects in their own right, and
there is a rich and important theory associated with them that has a multitude of
practical applications. It is the study of matrices and related topics that forms the
mathematical field that we call โlinear algebra and Analysis.โ In this chapter we will
begin our study of matrices.
Image and its Matrix:
There is a relation between matrices and digital images. A digital image in a
computer is presented by pixels matrix. On the other hand, there is a need
(especially with high dimensions matrices) to present matrix with an image.
The images you see on internet pages and the photos you take with your mobile
phone are examples of digital images. It is possible to represent this kind of image
using matrices. For example, the small image of Felix the Cat
can be represented by a
35ร35 matrix
whose elements are the numbers 0 and 1. These numbers specify the color of each
pixel1: the number 0 indicates black, and the number 1 indicates white. Digital
images using only two colors are called binary images.
Grayscale images can also be represented by matrices. Each element of the matrix
determines the intensity of the corresponding pixel.
Note: A pixel is the smallest graphical element of a matricial image, which can take
only one color at a time
For convenience, most of the current digital files use integer numbers between 0
(to indicate black, the color of minimal intensity) and 255 (to indicate white,
maximum intensity), giving a total of
256 = 28
different levels of gray.
For example, the image is presented with the matrix
Color images, in turn, can be represented by three matrices. Each matrix specifies
the amount of Red, Green and Blue that makes up the image.
This color system is known as RGB. The elements of these matrices are integer
numbers between 0 and 255, and they determine the intensity of the pixel with
respect to the color of the matrix. Thus, in the RGB system, it is possible to
represent
2563 = 224 = 16777216
different colors
2.1: Definition of Matrix and special Matrices:
The purpose of this section is to introduce the notion of a matrix, give some
motivation and some special matrix and make the basic definitions used in matrix
algebra and solving linear equations in coming chapters
Definition: A matrix is a rectangular array of objects or elements, denoted by
A โถ= [
๐11 ๐12 โฆ ๐1๐
๐21 ๐22 โฆ ๐2๐
โฎ โฎ โฑ โฎ๐๐1 ๐๐2 ๐๐๐
]
The displayed matrix has (m) rows and (n) columns and is called an m by n matrix
or matrix of order (m ร n).
1. The size of the matrix is denoted by (m ร n).
2. Each entry in the matrix is called the entry or elements of the matrix and is
denoted by (aij ), where (i) is the row number and (j) is the column number
of the element.
Example :
A = [2 1 3 41 3 0 24 3 5 6
]
There are (3) rows and (4) columns, so the size of A is (3ร4) and (a23 = 0) ,
(a32 = 3).
1- Square matrix: is a matrix where number of row = number of column.
2- Symmetric matrix: is a square matrix where (aij = aji) for all(i โ j).
This is another method for solving systems of linear equations. Basic idea of
Gaussian elimination apply certain operations to the matrix that do not change
the solution, in order to bring the matrix into a from where we can immediately
โseeโ the solution.
Steps : for solving any square system of equation using Gaussian
elimination method
1. Write the augmented matrix of the system.
2. Use (ERO) to write a sequence of row-equivalent matrices until you get
the upper- triangular matrix.
3. Then use backward substitution to get the solution of the given system.
Example : Solve the linear system using Gaussian elimination:
๐ฅ1 โ 2๐ฅ2 = 4
4๐ฅ1 โ ๐ฅ2 = 5
Solution : First we wish to eliminate only ๐21, the augmented matrix is
given by
๐ 1
๐ 2 [
1 โ2 โฎ4 โ1 โฎ
45
]
Then use (ERO) by โ4๐ 1 + ๐ 2, we obtain
๐ 1
new ๐ 2 [
1 โ2 โฎ0 7 โฎ
4
โ11]
Obviously, the original set of equations has been transformed to an upper-
triangular form.
Now we express the set in algebraic form yields:
๐ฅ1 โ 2๐ฅ2 = 4
7๐ฅ2 = โ11.
Using backward substitution to give.
7๐ฅ2 = โ11 gives ๐ฅ2 =โ11
7
๐ฅ1 = 4 + 2 (โ11
7) =
6
7
Exercise: Solve the linear system using Gaussian elimination:
๐ฅ1 + 2๐ฅ2 = 3
โ๐ฅ1 โ 2๐ฅ3 = โ5
โ3๐ฅ1 โ 5๐ฅ2 + ๐ฅ3 = โ4
Example: Solve the linear system using Gaussian elimination:
2๐ฅ2 โ ๐ฅ3 = 1
3๐ฅ1 โ๐ฅ2 + 2๐ฅ3 = 4
๐ฅ1 + 3๐ฅ2 โ 5๐ฅ3 = 1
Solution: The augmented matrix form of the system given by
[0 2 โ1 โฎ 13 โ1 2 โฎ 41 3 โ5 โฎ 1
]
Note: To solve this system, the Gaussian elimination method will fail immediately because the element in the first row on the leading diagonal, (the pivot) is zero. Thus, it is impossible to divide that row by the pivot value. Clearly this difficulty can be overcome by rearranging the order of the row.
For example, we making the first row the third, we obtain
[1 3 โ5 โฎ 13 โ1 2 โฎ 40 2 โ1 โฎ 1
]
Now we can use the usual elimination process. The first elimination step is to
eliminate the element ๐21from the second row by adding a โ3 multiple of row one (โ3๐ 1 + ๐ 2), which give
[1 3 โ5 โฎ 10 โ10 17 โฎ 10 2 โ1 โฎ 1
]
We finish with first elimination step. Since the element ๐31 is already zero .
The second elimination step is to eliminate the element ๐32from the third row by
adding a 2
10 multiple of row two (
2
10๐ 2 + ๐ 3), which give
[
1 3 โ5 โฎ 10 โ10 17 โฎ 1
0 012
5 โฎ
6
5
]
Obviously, the original set of equations has been transformed to an upper-
triangular form.
Now we express the set in algebraic form yields:
๐ฅ1 + 3๐ฅ2 โ 5๐ฅ3 = 1
โ10๐ฅ2 + 17๐ฅ3 = 1
12
5๐ฅ3 =
6
5
Using backward substitution to give.
12
5๐ฅ3 =
6
5 gives ๐ฅ3=
1
2
โ10๐ฅ2 + 17(1
2)= 1 gives ๐ฅ2=
3
4
๐ฅ1 + 3 (3
4) โ 5 (
1
2 ) = 1 gives ๐ฅ1=
5
4
Example: Solve the linear system using Gaussian elimination:
2๐ฅ1 + 2๐ฅ2 โ 4๐ฅ3 = 0
2๐ฅ1 +2๐ฅ2โ๐ฅ3 = 1
3๐ฅ1 + 2๐ฅ2 โ 3๐ฅ3 = 3
Solution : The augmented matrix form of the system given by
[2 2 โ4 โฎ 02 2 โ1 โฎ 13 2 โ3 โฎ 3
]
The first elimination step is to eliminate the element ๐21from the second row by
adding a โ1 multiple of row one (โ๐ 1 + ๐ 2) and the element ๐31from the
thired row by adding a โ3
2 multiple of row one (โ
3
2 ๐ 1 + ๐ 3), which give
[2 2 โ4 โฎ 00 0 3 โฎ 10 โ1 3 โฎ 3
]
We finish with first elimination step.
To start second elimination step is to eliminate the element ๐22from the second row which is zero ( is called second pivot element), the Gaussian elimination method cannot continue in its present form .
Therefore, we interchange row two and row three to obtain
[2 2 โ4 โฎ 00 โ1 3 โฎ 30 0 3 โฎ 1
]
We finish with the second elimination step. Since the element ๐32 is already zero .
Then obviously, the original set of equations has been transformed to an upper-
triangular form. Now we express the set in algebraic form yields:
2๐ฅ1 + 2๐ฅ2 โ 4๐ฅ3 = 0
โ๐ฅ2 + 3๐ฅ3 = 3
3๐ฅ3 = 1
Using backward substitution to give.
3๐ฅ3 = 1 gives ๐ฅ3=1
3
โ๐ฅ2 + 3(1
3)= 3 gives ๐ฅ2=โ2
2๐ฅ1 + 2(โ2) โ 4 (1
3 ) = 0 gives ๐ฅ1=
8
3
Pivoting strategies : In the previous part we discussed Gaussian elimination and Gaussian elimination was applied to a problem with no pivotal elements zero.
However, the method did not work
if the first coefficient of the first equation or
if a diagonal coefficient become zero in the process of the solution because they are used as denominator in the forward elimination.
Then pivoting is used to change sequential order of the equation for two purposes
1- To prevent diagonal coefficients form becoming zero. 2- To make each diagonal coefficient larger in value (magnitude) than any
other coefficient below it. That is to decrease the round-off errors.
1- Partial Pivoting(or row Pivoting) the basic approach is to use the largest ( in absolute value ) element on or below the diagonal in the column of current interest as the pivotal element for elimination in the rest of that column.
One immediate effort of this will be to force all the multiples used to be not grater than (1) in absolute.
Example : Solve the linear system using Gaussian elimination with partial pivoting:
2๐ฅ1 + 2๐ฅ2 โ 2๐ฅ3 = 8
โ4๐ฅ1 โ2๐ฅ2+2๐ฅ3 = โ14
โ2๐ฅ1 + 3๐ฅ2 + 9๐ฅ3 = 9
Solution : For the first elimination step, since โ4 is the largest absolute coefficient
of first variable ๐ฅ1. Then we need to interchange, the first row and the second
row, give us
โ4๐ฅ1 โ2๐ฅ2+2๐ฅ3 = โ14
2๐ฅ1 + 2๐ฅ2 โ 2๐ฅ3 = 8
โ2๐ฅ1 + 3๐ฅ2 + 9๐ฅ3 = 9
The first elimination step is to eliminate the element ๐21from the second row by
adding a 2
4 multiple of row one (
2
4๐ 1 + ๐ 2) and the element ๐31from the thired
row by adding a โ2
4 multiple of row one (โ
2
4 ๐ 1 + ๐ 3), which give
โ4๐ฅ1 โ2๐ฅ2+2๐ฅ3 = โ14
๐ฅ2 โ 2๐ฅ3 = 1
4๐ฅ2 + 8๐ฅ3 = 16
We finish with first elimination step. For second elimination step (4) is the largest absolute coefficient of the second variablex2. Then we need to interchange, the second row and the third row, give us
โ4๐ฅ1 โ2๐ฅ2+2๐ฅ3 = โ14
4๐ฅ2 + 8๐ฅ3 = 16
๐ฅ2 โ ๐ฅ3 = 1
Eliminate the second variable ๐ฅ2 (element ๐32) from the third row by adding a โ1
4
multiple of row two ( โ1
4๐ 2 + ๐ 3) , which give
โ4๐ฅ1 โ2๐ฅ2+2๐ฅ3 = โ14
4๐ฅ2 + 8๐ฅ3 = 16
โ3๐ฅ3 = โ3
Then obviously, the original set of equations has been transformed to an upper-
triangular form. Using backward substitution give.
3๐ฅ3 = โ3 Gives ๐ฅ3=1, ๐ฅ2=2 and ๐ฅ1=3.
2- Total Pivoting : In the case total pivoting ( or complete pivoting ), we search
for the largest number( in absolute value ) in the entire array instead of just
in the first column and this number is the pivot, This means that we shall
probably need to interchange the column as well as rows.
Example : Solve the linear system using Gaussian elimination with total pivoting:
2๐ฅ1 + 2๐ฅ2 โ 2๐ฅ3 = 8
โ4๐ฅ1 โ2๐ฅ2+2๐ฅ3 = โ14
โ2๐ฅ1 + 3๐ฅ2 + 9๐ฅ3 = 9
Solution : For the first elimination step, since 9 is the largest absolute coefficient of
first variable ๐ฅ3 in the given system. Then we need to interchange, the first row
and the third row as well as the first column and the third column, give us
9๐ฅ3 +3๐ฅ2โ2๐ฅ1 = 9
2๐ฅ3 โ 2๐ฅ2 โ 4๐ฅ1 = โ14
โ2๐ฅ3 + 2๐ฅ2 + 2๐ฅ1 = 8
The first elimination step is to eliminate the third variable ๐ฅ3 from the second row
by adding a โ2
9 multiple of row one ( โ
2
9 ๐ 1 + ๐ 2) and the third row by adding a
2
9 multiple of row one (
2
9 ๐ 1 + ๐ 3), which give
9๐ฅ3 +3๐ฅ2โ2๐ฅ1 = 9
โ8
3๐ฅ2 โ
32
9๐ฅ1 = โ16
8
3๐ฅ2 +
14
9๐ฅ1 = 10
We finish with first elimination step. For second elimination step (โ32
9) is the
largest absolute coefficient of the second variable x1. Then we need to interchange, the second row and the third row as well as the second column and the third column, give us
9๐ฅ3 โ2๐ฅ1 + 3๐ฅ2 = 9
โ32
9๐ฅ1 โ
8
3๐ฅ2 = โ16
14
9๐ฅ1 +
8
3๐ฅ2 = 10
Eliminate the first variable ๐ฅ1 from the third row by adding โ7
16 multiple of row
two ( โ7
16๐ 2 + ๐ 3) , which give
9๐ฅ3 โ2๐ฅ1 + 3๐ฅ2 = 9
โ32
9๐ฅ1 โ
8
3๐ฅ2 = โ16
3
2๐ฅ2 = 10
Then obviously, the original set of equations has been transformed to an upper-
triangular form. Using backward substitution give
3
2๐ฅ2 = 10 Gives ๐ฅ2=2, ๐ฅ1=3 and ๐ฅ3=1.
Ex:
1- Solve the linear system using Gaussian elimination with partial pivoting.
๐ฅ1 โ ๐ฅ2 + 3๐ฅ3 = 13
4๐ฅ1 โ 2๐ฅ2 + ๐ฅ3 = 15
โ 3๐ฅ1 โ ๐ฅ2 + 4๐ฅ3 = 8
๐ฅ1 = 2 , ๐ฅ2 = โ2, ๐ฅ3=3.
2- Solve the linear system using Gaussian elimination with total pivoting.
๐ฅ1 + ๐ฅ2 โ ๐ฅ3 = โ3
2๐ฅ1 โ 3๐ฅ2 + 4๐ฅ3 = 23
โ 3๐ฅ1 + ๐ฅ2 โ ๐ฅ3 = โ15
๐ฅ1 = 2 , ๐ฅ2 = โ1, ๐ฅ3=4.
Write your solution process as augmented matrix.
4- GAUSSIAN โ Jordan method: This method is a modification of the
Gaussian elimination method. The Gauss-Jordan method, however, is
inefficient for practical calculation, but is often useful for theoretical
purposes. The basis of this method is to convert the given matrix into
diagonal form. The forward elimination of the Gauss-Jordan method is
identical to that of the Gaussian elimination method.
However, Gauss-Jordan method uses backward elimination rather than
backward substitution. In the Gauss-Jordan method the forward elimination
and backward elimination not need to separate.
This is possible because a pivot element can be used to eliminate the
coefficient not only in below but also above at same time. If this approach is
taken, the form of this coefficient matrix becomes diagonal.
Example: Solve the linear system using GAUSSIAN โ Jordan method:
๐ฅ1 + 2๐ฅ2 = 3
โ๐ฅ1 โ2๐ฅ3 = โ5
โ3๐ฅ1 โ 5๐ฅ2 + ๐ฅ3 = โ4
Solution : The augmented matrix form of the system given by
[1 2 0 โฎ 3
โ1 0 โ2 โฎ โ5โ3 โ5 1 โฎ โ4
]
The first elimination step is to eliminate the element ๐21 by adding row one and
row two (๐ 1 + ๐ 2) and the element ๐31 by adding a 3multiple of row one and row three (3๐ 1 + ๐ 3), which give
[1 2 0 โฎ 30 2 โ2 โฎ โ20 1 1 โฎ 5
]
We finish with first elimination step. The second row is now divided by (2) to give
[1 2 0 โฎ 30 1 โ1 โฎ โ10 1 1 โฎ 5
]
To start second elimination step is to eliminate the element ๐12 by adding
(โ2) multiple row two and row one (โ2๐ 2 + ๐ 1) and the element ๐32 by
subtract row two and row three (๐ 1โ๐ 3), which give
[1 0 2 โฎ 50 1 โ1 โฎ โ10 0 2 โฎ 6
]
The third row is now divided by (2) to give
[1 0 2 โฎ 50 1 โ1 โฎ โ10 0 1 โฎ 3
]
The third elimination step is to eliminate the element ๐23 by adding row three
and row two (๐ 3 + ๐ 2) and the element ๐13 by adding (โ2) multiple of row three and row one (โ2๐ 3+๐ 1), which give .
[1 0 0 โฎ โ10 1 0 โฎ 20 0 1 โฎ 3
]
Obviously, the original set of equations has been transformed to an upper-
triangular form yields:
๐ฅ1=โ1 , ๐ฅ2=2 and ๐ฅ3=3.
Ex: Solve the linear system using Gaussian โ Jordan method
๐ฅ1 + ๐ฅ2 + ๐ฅ3 = โ3
2๐ฅ1 + 3๐ฅ2 + 7๐ฅ3 = 0
๐ฅ1 + 3๐ฅ2 โ 2๐ฅ3 = 17
๐ฅ1 = 1 , ๐ฅ2 = 4, ๐ฅ3=-2.
Ex:
1- Ali and Layla both entered a quiz. The quiz had twenty questions and points
were allocated as follows:
โข x points were added for each correctly answered question.
โข y points were deducted for each incorrect (or unanswered) question.
Ali got 15 questions correct and scored 65 points.
Layla got 11 questions correct and scored 37 points.
Use matrices to find the value of x and y.
2- A store sells flash memory and CD's. All the flash memory have the same price
and all the CD's have the same price.
Dana and Sara both shopped at the store.
Dana bought 5 flash memories and 3 CD's and paid altogether $90
Sara bought 2 flash memories and 8 CD's and paid altogether $138
Use matrices to find the cost of one flash memory and one CD.