# Lec7 - Solving systems of linear equations Special matrices GaussSeidel nonlinear systems Linear Systems with Special Matrices So far we have

This preview shows pages 1–8. Sign up to view the full content.

Solving systems of linear equations Special matrices, Gauss- Seidel, & nonlinear systems

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Lecture 7 2 Linear Systems with Special Matrices z So far, we have discussed methods for solving the linear system [A]{x} = {b} where the matrix [A] is arbitrary , but non- singular z We have seen that both Gauss Elimination and LU decomposition, while of general utility, are expensive , requiring O(N 3 ) operations z In many physical problems, especially linear systems arising from ODE boundary value problems and PDEs, special [A] matrices arise that can be solved with much less effort, e.g. in O(N) flops! Examples are: Banded matrices Symmetric matrices Non-banded, sparse matrices z You should be aware of these special cases!
Lecture 7 3 Sparse matrices A sparse matrix is one with lots of zeros z Many are “banded” (diagonal & neighbors are only non-zero elements Pivoting ruins diagonal nature of matrix Often know a priori that pivoting is not necessary z Some have nearly random placement of zeros These are harder to solve efficiently 21 000 12 100 01 0 00121 00011 ⎛⎞ ⎜⎟ −− ⎝⎠ “tri-diagonal” matrix

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Lecture 7 4 Tridiagonal systems They arise in numerical solutions to ordinary and partial differential equations -- usually they are nonsingular & pivoting is not needed or desirable -- Gauss elimination is a computationally inefficient approach to solving or conducting an LU decomposition “tri-diagonal” matrix: a banded matrix with bandwidth 3 11 12 21 22 23 32 33 34 2, 3 2 1 1, 2 1 ,1 00000 0000 00 0 0 000 0 nn aa aaa a −− ⎛⎞ ⎜⎟ ⎝⎠
Lecture 7 5 L & U from a tridiagonal matrix 11 12 11 12 21 22 23 21 22 23 32 33 34 32 33 34 43 44 45 43 44 45 54 55 54 55 11 12 21 2 [] 0 0 0 1000 0 0 0 0 00 1 0 0 0 1 0 0 0 0 0 0 0 1 0000 0 0 0 000 1 0 0 0 0 A LU aa uu aaa l l l l u = ⎛⎞ ⎜⎟ = ⎝⎠ 11 12 2 2 3 2 11 1 2 2 2 2 2 3 32 33 34 32 22 32 23 33 34 43 44 45 43 33 43 34 44 45 54 55 54 44 54 45 55 0 0 0 0 0 0 0 0 0 al u l u u u l u l u l u l u a a lu u + =+ + +

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Lecture 7 6 L & U from a tridiagonal matrix: Direct Factorization 11 12 11 12 21 22 23 21 11 21 12 22 23 32 33 34 32 22 32 23 33 34 43 44 45 43 33 43 34 44 45 54 55 54 44 54 45 55 [] 000 0 0 0 00 0 0 0 0 0 0 0 0 0 A LU aa u u aaa l ul uu u l u l u l u l u a a lu u = ⎛⎞ ⎜⎟ + =+ + + ⎝⎠ 11 11 1, ,1 1 ,, 1 1 , for 2 / ii i i i i i i ua in la u l u −− = ≤≤ = = =− 11 11 12 12 21 21 11 22 22 21 12 23 23 32 32 22 33 33 32 23 34 43 43 43 33 44 44 43 34 45 54 54 54 44 55 55 54 45 45 54 ; /; ; ; ; ; u ual u u l u u u u l u = = == = = = = Equate elements row by row:
Lecture 7 7 L & U from a tridiagonal matrix: Direct Factorization 11 12 11 12 21 22 23 21 11 21 12 22 23 32 33 34 32 22 32 23 33 34 43 44 45 43 33 43 34 44 45 54 55 54 44 54 45 55 000 0 0 0 00 0 0 0 0 0 0 0 0 0 aa u u aaa l ul uu u l u l u l u l u a a lu u ⎛⎞ ⎜⎟ + =+ + + ⎝⎠ 11 11 12 12 21 21 11 22 22 21 12 23 23 32 32 22 33 33 32 23 34 43 43 43 33 44 44 43 34 45 54 54 54 44 55 55 54 45 45 54 ; /; ; ; ; ; ua la u ual u u l u u u u l u = = == = = = = 11 11 1, ,1 1 ,, 1 1 , for 2 / ii i i i i i i in u l u −− = ≤≤ = =

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 12/29/2011 for the course CHE 132b taught by Professor Ceweb during the Fall '09 term at UCSB.

### Page1 / 26

Lec7 - Solving systems of linear equations Special matrices GaussSeidel nonlinear systems Linear Systems with Special Matrices So far we have

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online