The Gauss Jordan method - PowerPoint PPT Presentation

About This Presentation
Title:

The Gauss Jordan method

Description:

Major difference - eliminate unknowns from all rows, not just subsequent ones ... 3) using Ux=d and backsubstitution, solve for x ... – PowerPoint PPT presentation

Number of Views:4194
Avg rating:3.0/5.0
Slides: 37
Provided by: tonyc7
Category:
Tags: gauss | jordan | major | method

less

Transcript and Presenter's Notes

Title: The Gauss Jordan method


1
The Gauss Jordan method Major difference -
eliminate unknowns from all rows, not just
subsequent ones Normalize matrix so all entries
are 1 Leads to identity matrix instead of upper
triangular Backsubstitution is easy
2
Example
First pivot
3
Normalize pivot row
4
Multiply 1st row by 3 and subtract from 2nd row
5
Do the other two rows
Now pivot again
6
Normalize
7
Multiply 2nd row by 0.75 and subtract from first
row
8
For first row
and after all eliminated
9
No need to pivot, so normalize
Work on rows 1,2 and 4 with row 3
10
No rows below row 4 to pivot with, so normalize
and eliminate column 4
11
We now have our answer, since backsubstitution is
trivial
12
LU decomposition - another method for solving
matrix equations Idea behind LU decomposition -
start with
or
13
We know (because we did it in G.E.) we can write
i.e
or
14
Assume there exists L
such that
15
means that
16
LU method 1) factor (decompose) A into L and U 2)
given b, determine d from Ldb 3) using Uxd and
backsubstitution, solve for x Advantage Once you
have L and U, can use many different bs
17
How do you get L and U?
Gauss elimination gives you U. It also gives you
L.
The factors are the entries in L
18
Changes in algorithm for Gauss elimination for LU
decomposition loop over all the rows except the
last one loop over all the rows below the current
one get fik aik/akk multiply row k by f and
subtract from row i put fik in L at row i, column
k end loop end loop A is now upper triangular
U make all Lkk1
19
A fancier way of storing L and U
Good if n is large More overhead to sort out
20
Pivoting in LU decomposition Still need it Messes
up order of L What to do?
Need to pivot also both L and a permutation
matrix P
21
Initialize P as identity matrix and pivot when A
is pivoted. Also pivot L
22
Example
Starting out
23
No pivot
24
Now exchange rows 2 and 4
25
The pivot factors are
26
No pivot again, factor
27
Now make the diagonal elements of L1
28
Recall
29
(No Transcript)
30
LU method 1) factor (decompose) A into L and U 2)
given b, determine d 3) using Uxd and
backsubstitution, solve for x Advantage Once you
have L and U, can use many different bs
31
Example (no pivoting)
32
Get d
33
Use Uxd and backsubstitute
34
Now change b
We dont have to do elimination again Use the
same L and U
35
Get d
36
Use Uxd and backsubstitute
Write a Comment
User Comments (0)
About PowerShow.com