0% found this document useful (0 votes)
132 views27 pages

MDB3053 Chap9 LinearAlgebra Part 1 May16

The document provides an overview of methods for solving systems of simultaneous algebraic equations. It discusses both direct and iterative methods. The direct methods covered are Gaussian elimination and Gauss-Jordan elimination. Gaussian elimination uses forward elimination to transform the coefficient matrix into upper triangular form, then back substitution to solve for the unknowns. Gauss-Jordan elimination additionally performs a normalization step to transform the matrix into an identity matrix, eliminating the need for back substitution. Iterative methods find approximate solutions through repeated calculations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
132 views27 pages

MDB3053 Chap9 LinearAlgebra Part 1 May16

The document provides an overview of methods for solving systems of simultaneous algebraic equations. It discusses both direct and iterative methods. The direct methods covered are Gaussian elimination and Gauss-Jordan elimination. Gaussian elimination uses forward elimination to transform the coefficient matrix into upper triangular form, then back substitution to solve for the unknowns. Gauss-Jordan elimination additionally performs a normalization step to transform the matrix into an identity matrix, eliminating the need for back substitution. Iterative methods find approximate solutions through repeated calculations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

RECAP ON CHAPTER 6

1. Bracketing Method:
Bisection Method
False-Position Method

2. Open Method:
Fixed Point Iteration
Newton-Raphson Method
Secant Method

x2

How to solve a system of


simultaneous algebraic
equations using CM ?

x1

Cokes example

CHAP 9 : GAUSS ELIMINATION


LESSON PLAN:
What is Linear Algebraic Equations
(L.A.E) ?
x
Methods to solve L.A. E
2

Direct Method Exact Sol.

Iterative Method Approx. Sol


Graphical Method

x1

LINEAR ALGEBRAIC EQUATIONS


Example of a system of L.A.E

3x1 5 x2 2 x3 8
2 x1 3x2 x3 1
x1 2 x2 3x3 1

Three coupled,
linear equations

Why coupled? Each equation has terms in common with the


others, that is x1, x2 and x3.
Why linear? It means the effects are proportional to their cause.
Each equation contains only first order terms of x1, x2 and x3. No
terms like x12, or log(x3) or 1/x2x3.

Ax b

GENERAL FORM OF L.A.E


The general form of a system of L.A.E for n number of
equations
coefficients

a11x1 a12 x2 a1n xn b1


a21x1 a22 x2 a2 n xn b2

an1 x1 an 2 x2 ann xn bn
unknown
variables

constants

MATRIX FORM OF L.A.E


Linear Algebraic Equations in matrix form
n x 1 column vector of
unknowns
n x 1 column vector
Ax b
of constants

mxn
coefficient
matrix, A
a11

A
a
m1

Example:

2 x1 3x2 1
4 x1 x2 5

a1n
x1
b1

, x , b
x
b
amn
n
n
Ax b

augmented form

2 3 1
2 3 x1 1

or

4
1
5

4
1
5

TRY THIS
Write the matrix representation for the L.A.E
shown below:
3x1 5 x2 2 x3 8
2 x1 3x2 x3 1
x1 2 x2 3x3 1

3 5
2 8

2 3 1 1
1 2 3 1

SPECIAL TYPES OF MATRICES


Diagonal matrix

0
a11 0

0 a22 0
0
0 a33

Identity matrix, I

1 0 0

0 1 0
0 0 1

Lower triangular matrix, L

a11 0

a21 a22
a
31 a32

0
a33

Upper triangular matrix, U

a11 a12

0 a22
0
0

a13

a23
a33

WAYS TO SOLVE L.A.E


Graphical Method by plotting
Cramers Rule by determinant concept
Direct Method
(Exact Sol)
Iterative Method
(Approx. Sol)

Gaussian Elimination
Gauss-Jordan
LU Factorization
Jacobis Method
Gauss-Seidel Method

GRAPHICAL METHOD
The SOLUTION is
shown graphically
They are in the forms of
straight line because of
linear equations

3x1 2 x2 18
x1 2 x2 2
x2 9
x2

3x1
.......(1)
2

x1
1..........(2)
2

BASIC CONCEPTS OF SOLUTION


Unique Solution (Nonhomogeneous equation)
Linearly 2 x 3x
1
2
dependent
equations 4 x1 6 x2

4
8

x2

Without Solution
3x1 9 x2 5
x1 3x2 6

x1

x2

parallel lines

x1

BASIC CONCEPTS OF SOLUTION (CONT)


Infinite # of Solutions (No unique solutions)
linearly
dependant

x2

2 x1 3x2 4

4 x1 6 x2 8

identical lines

x1

ill-conditioned slopes are close to each


other, very hard to determine the solution
2 x1 2.2 x2 5.7
2 x1 2 x2 5.5

x2

x1

GAUSSIAN ELIMINATION
Most frequently used Direct Method
Principle: to reduce coefficient matrix, A into
equivalent upper triangular form
Consists of TWO stages:

Gaussian =
Elimination

Forward
Elimination

To transform the original


matrix, A into an upper, U
triangular matrix

Back
Substitution

Unknowns are solved


through Back Substitution
in the upper triangular
matrix

Augmented
form
Fig. 9.3

upper
triangular
matrix

FORWARD ELIMINATION
Forward Elimination stage reduces the augmented
matrix into an upper triangular matrix.
2 3 1

It requires Elementary Row Transformations

4
1
5

(3 Basic approaches). You can:


1. Interchange any two row in position
2. Multiply (or divide) a row by a
nonzero scalar , k=2 (eg. 2 R2)
3. Multiply (or divide) a row by a
scalar and adding it (or subtracting
it from) another row (eg R1 + 2 R2)

4 1 5

2 3 1

4 1 5

4 6 2

4 1 5

0 7 7

Example: Reducing matrix to upper matrix


Consider the matrix

R1

R2

4
4

4
6

2
4

6
10

R3

Lets perform the transformation at second row R2:


new R2

4
R2 R2 R1
1
'

4 Elimination factor or

1 multiplier

It means To get the second row of the new matrix,


multiply every element of the first row by 4 and subtract
it from the element in the second row.

EXAMPLE (cont)
Thus, the new 2nd row becomes :
R2 = [4 4 2 | 6] 4 [1 2 2 | 3]
= [0 4 6 | 6]

4
R2 R2 R1
1

Next, transformation at 3rd row

4
R3 R3 R1
1
Thus, the new 3rd row becomes:
R3 = [4 6 4 | 10] 4 [1 2 2 | 3]
= [ 0 2 4 | 2]
R3'' = [0 -2 -4 | -2] 1/2 [0 -4 -6 | -6]
= [ 0 0 1 | 1]

Original Matrix:
1 2 2 3
4 4 2 6
4 6 4 10
Transformation:
1
0
0

2
-4
-2

2 3
-6 -6
-4 -2

You can perform one


more transformation to
obtain U matrix

BACK SUBSTITUTION
Suppose that the next forward elimination step results in
the following augmented matrix:
All the entries
below the
diagonal are
ZEROS

1
0
0

2
4
0

2
6
1

3
6

By using Back Substitution, SOLUTIONS are:


R3:

x3 = 1 x3 = 1

R2:

4x2 6x3 = 6 x2 = 3

R1 :

x1 + 2x2 + 2x3 = 3 x1 = 1

Direct method
yields exact sol

CLASS ACTIVITY #1

2 x1 x2 3x3 2
4 x1 x2 x3 1
2 x1 3x2 2 x3 3
Use fraction number to reduce round-off errors.
Try this in EXCEL: (p296)
To inverse, highlight the
range, enter minverse(..)
and press Ctrl+Shift+Enter
To multiply,enter mmult(..)

Try this in MATLAB: (p298)


>> A=[2 1 3;4 1 1;-2 3 2]
>> b=[2 ; 1 ; 3]
>> x = A\b

CLASS ACTIVITY #1 (cont)


Step 1: Augmented Matrix Form:
2 x1 x2 3x3 2
4 x1 x2 x3 1
2 x1 3x2 2 x3 3

2 1 3 2

1 1 1
4
2 3 2 3

Step 2: Forward Elimination by performing


elementary row transformation
2 1 3 2

R2 2 R1 0
3 5 5 2 R1 4 2 6
2 3

2
3

Pitfalls of Gaussian Elimination


Division by zero. It is possible that during both
elimination and back-substitution phases a division by
zero can occur. can be solved by (Partial) Pivoting
Round-off errors. Because computer can only store a
fixed no. of digits to use more S.F. or fractions
Ill-conditioned systems. Systems where small changes
in coefficients result in large changes in the solution. It
happens when two or more equations are nearly
identical.
x2

x1

GAUSS-JORDAN
A variation of Gauss elimination but 50% more
computational work than Gaussian Elimination
Elimination step results in an identity matrix (not
upper triangular matrix) due to normalization step
No back substitution required
a11

a 21
a
31

Identity
matrix

a12
a 22
a23

a13 c1

a23 c2
a33 c3

1 0 0 h1

0 1 0 h2
0 0 1 h
3

Elimination +
Normalization

Fig 9.9
Elimination +
Normalization
Identity
Matrix

No back
substitution !

EXAMPLE
Suppose that the forward elimination and normalizing
steps result in the following augmented matrix:
1
0
0

0
1
0

0
0
1

The SOLUTION will be : x1 = 5

5
3
7
x2 = 3 and x3 = 7

Hence there is no need for back substitution

CLASS ACTIVITY #2
Solve the system of equations below using
Gauss-Jordan method

x1 2 x2 x3 7
2 x1 5 x2 2 x3 6
3x1 2 x2 x3 1
Ans: x1 = 2 ; x2 = 8; x3 = 21

MATRIX INVERSION
Inverse Matrix A-1 can be found through GaussJordan Method
STEP 1 : Form A I
STEP 2 : Transform A I to I B using the
Elementary Row Transformations.
STEP 3 : Finally, B = A-1, where B is the inverse
matrix

CLASS ACTIVITY #3
MATRIX INVERSION
Find the inverse of the matrix below using
the Gauss-Jordan Method

1 2 2

A 1 3 1
2 1 6

17 10 4

1
A 4 2 1
5 3
1

You might also like