Académique Documents
Professionnel Documents
Culture Documents
Systems of Linear
Algebraic Equations
1
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
• Problems are similar in spirit as to roots of
equations,
• Values that satisfy simultaneously a set of
linear algebraic equations,
Chapter 11 2
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Lesson Outcomes
Student will be able to:
3
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Linear Algebraic Equations
• An equation of the form ax+by+c=0 or equivalently
ax+by=-c is called a linear equation with 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
c 1 , c2 , c3 , … , c n .
• If need to work more than one linear equations, a system
of linear equations must be solved simultaneously.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Non-computer 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.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Fig. pt3.5
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Gauss Elimination
Solving Small Numbers of Equations
• There are many ways to solve a system of
linear equations:
– Graphical method
– Cramer’s rule For n ≤ 3
– Method of elimination
– Computer methods
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Graphical Method
• For two equations:
a11 x1 a12 x2 b1
a21 x1 a22 x2 b2
• Solve both equations for x2:
a11 b1
x2 x1 x2 (slope)x1 intercept
a12 a12
a21 b2
x2 x1
a22 a22
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
• Plot x2 vs. x1 Fig. 9.1
on rectilinear
paper, the
intersection
of the lines
present the
solution.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Figure 9.2: Singular or Ill-conditioned systems;
(a) No solution, (b) infinite solution, (c) ill-conditioned; where slopes are
so close and not easily detected
10
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
REVISION
Matrix of n by m
(row by column)
or i by j (aij )
11
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Revision
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Gauss Elimination
Consider a 3 set of equations of 3 unknowns:
a11 x1 + a12 x2 + a13 x3 = c1 …. Eqn1
In Matrix form:
13
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Naive Gauss Elimination Method
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The equations are presented in terms of an
augmented matrix:
Row 1 (or R1)
…R2
…R3
1. R1 & R2,
R1 & R3
2. R2 & R3
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Objectives:
• To make matrix into an upper triangular type: i.e.
elements a21 = 0, a31 = 0 and a32 = 0.
• All elements in R1 will be the pivot elements.
• To make a21 = 0 (in R2), a11 in R1must be
factored and then eliminated from that element
a21. The easiest would be multiplying the
coefficient of a21 and dividing by coefficient a11.
This is Forward Elimination.
17
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1. Forward Elimination
• Reduce the set of equations to an UPPER
triangular system,
• Initial step: eliminate the 1st unknown x1
from the second set through the nth
equations.
To do this: Multiply Eqn. 1 by a21/a11 to
give:
a 21 a 21 a 21
a 21 x1 a12 x 2 ... a1n x n c1 Eqn 1a
a11 a11 a11
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Then, Subtract : *Eqn 2 – Eqn 1a
a 21 a 21 a 21
a 22 a12 x2 ... a1n x n c2 c1
a11 a11 a11
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Solution:
In augmented matrix:
From R3”,
10.0120 x3 = 70.0843
x3 = 70.0843/ 10.0120
= 7.0000
23
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Back substitution in R2” :
R1” :
24
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Pitfalls of Elimination Methods
1. Division by zero ~ it is possible that a
division by zero can occur. This gives a
technique of “pivoting”.
2. Round-off Errors ~ Use of significant
figures; important for very large numbers
of equations to be solved.
3. Ill-conditioned systems ~ Very small
changes in coefficients will result in large
changes in the solution.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
4. Singular systems. When two equations are
identical, one degree of freedom can be lost and
dealing with the impossible case of n-1 equations
for n unknowns. For large sets of equations, it
may not be obvious.
The determinant of a singular system is zero can
be used and tested by computer algorithm after
the elimination stage. If a zero diagonal element
is created, calculation is terminated.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Techniques for Improving Solutions
• Use of more significant figures.
• Pivoting. 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.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
With pivoting
To avoid division by zero;
~ determine the largest coefficient in the
column below the pivot (usually the a11)
element.
~ Rows can be switched, so that the largest
element is the PIVOT element (called
Partial pivoting)~ See Example 9.9
~ If involved both columns and rows, it is
called complete pivoting. (This is rare as it
may disturb the order of the x’s, i.e. x1 can
be interchange with x2 etc.).
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Gauss-Jordan Method
• It is a variation of Gauss elimination.
• 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.
29
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Identity
A x B matrix, thus
find unknown
x
30
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
31
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
See example 9.12 (Text book)
R1’ = R1 3
R2’ = R2 – (0.1xR1’)
R3’ = R3 – (0.3xR1’)
32
Normalise R2’ by dividing it by 7.00333 (= a22’ )
Then eliminate a12’ and a32’ (to make other elements in column 2 = 0)
33
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
EXERCISES
34
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.