Académique Documents
Professionnel Documents
Culture Documents
Part 3
An equation of the form ax+by+c=0 or equivalently
ax+by=-c is called a linear equation in x and y variables.
ax+by+cz=d is a linear equation in three variables, x, y,
and z.
Thus, a linear equation in n variables is
a1x1+a2x2+ +anxn = b
A solution of such an equation consists of real numbers c1, c2,
c3, , cn. If you need to work more than one linear
equations, a system of linear equations must be solved
simultaneously.
26/09/2017 1
Noncomputer Methods for Solving
Systems of Equations
For small number of equations (n 3) linear
equations can be solved readily by simple
techniques such as method of elimination.
Linear algebra provides the tools to solve such
systems of linear equations.
Nowadays, easy access to computers makes
the solution of large sets of linear algebraic
equations possible and practical.
26/09/2017 2
Gauss Elimination
26/09/2017 3
Graphical Method
For two equations:
a11x1 a12 x2 b1
a21x1 a22 x2 b2
Solve both equations for x2:
a11 b1
x2
x1 x2 (slope) x1 intercept
a12 a12
a21 b2
x2
x1
a22 a22
26/09/2017 4
Graphical Method
26/09/2017 5
Plot x2 vs. x1 Fig. 9.1
on rectilinear
paper, the
intersection of
the lines
present the
solution.
26/09/2017 6
Figure 9.2
Ax b
Where A is the coefficient matrix:
26/09/2017 12
Cramers rule expresses the solution of a
systems of linear equations in terms of ratios
of determinants of the array of coefficients of
the equations. For example, x1 would be
computed as:
b1 a12 a13
b2 a22 a23
b3 a32 a33
x1
D
26/09/2017 13
26/09/2017 14
26/09/2017 15
26/09/2017 16
Method of Elimination
The basic strategy is to successively solve one
of the equations of the set for one of the
unknowns and to eliminate that variable from
the remaining equations by substitution.
The elimination of unknowns can be extended
to systems with more than two or three
equations; however, the method becomes
extremely tedious to solve by hand.
26/09/2017 17
multiplied by a21 and by a11 to give
26/09/2017 18
26/09/2017 19
26/09/2017 20
Naive Gauss Elimination
Extension of method of elimination to large
sets of equations by developing a systematic
scheme or algorithm to eliminate unknowns
and to back substitute.
As in the case of the solution of two equations,
the technique for n equations consists of two
phases:
Forward elimination of unknowns
Back substitution
26/09/2017 21
26/09/2017 22
Forward Elimination of Unknowns.
26/09/2017 23
The procedure is then repeated for the remaining equations. For
instance, Eq. (9.12a)
can be multiplied by a31/a11 and the result subtracted from the
third equation.
26/09/2017 24
Repeating the procedure for the remaining equations
results in the following modified system:
26/09/2017 25
Now repeat the above to eliminate the second unknown
from Eq. (9.14c) through (9.14d). To do this multiply Eq.
(9.14b) by a32/a22 and subtract the result from Eq. (9.14c).
Perform a similar elimination for the remaining equations to
yield
26/09/2017 26
The procedure can be continued using the remaining pivot
equations. The final manipulation in the sequence is to use
the (n 1)th equation to eliminate the xn1 term from the nth
equation. At this point, the system will have been
transformed to an upper triangular system
26/09/2017 27
Back Substitution.
Equation (9.15d) can now be solved for xn:
26/09/2017 28
26/09/2017 29
26/09/2017 30
26/09/2017 31
26/09/2017 32
26/09/2017 33
Pitfalls of Elimination Methods
It is possible that during both elimination and back-
substitution phases a division by zero can occur.
If a pivot element is zero, normalization step
leads to division by zero. The same problem
may arise, when the pivot element is close to
zero. Problem can be avoided:
Partial pivoting. Switching the rows so that the
largest element is the pivot element.
Complete pivoting. Searching for the largest
element in all rows and columns then switching.
26/09/2017 34
26/09/2017 35
Gauss-Jordan
It is a variation of Gauss elimination. The
major differences are:
When an unknown is eliminated, it is eliminated
from all other equations rather than just the
subsequent ones.
All rows are normalized by dividing them by their
pivot elements.
Elimination step results in an identity matrix.
Consequently, it is not necessary to employ back
substitution to obtain solution.
26/09/2017 36
26/09/2017 37
26/09/2017 38
26/09/2017 39