Docsity

Matrix Computations: Iterative Methods for Solving Linear Equations, Slides of Computer Science

Partial preview of the text

Download Matrix Computations: Iterative Methods for Solving Linear Equations and more Slides Computer Science in PDF only on Docsity!

CSE 245: Computer Aided Circuit

Simulation and Verification

Matrix Computations: Iterative

Methods I

Outline

• Introduction

• Direct Methods

• Iterative Methods

  • Formulations
  • Projection Methods
  • Krylov Space Methods
  • Preconditioned Iterations
  • Multigrid Methods
  • Domain Decomposition Methods

Introduction: Matrix Condition

4

Ax=b With errors, we have (A+eE)x(e)=b+ed Thus, the deviation is x(e)-x=e(A+eE)-1(d-Ex) |x(e)-x|/|x| <= e|A -1^ |(|d|/|x|+|E|)+O(e) <= e|A||A -1|(|d|/|b|+|E|/|A|)+O(e) We define the matrix condition as K(A)=|A||A -1|, i.e. |x(e)-x|/|x|<=K(A)(|ed|/|b|+|eE|/|A|)

Introduction: Gershgorin Circle Theorem

5

For all eigenvalues r of matrix A, there exists an i such that |r-aii|<= sum (^) i=!j |aij | Proof: Given r and eigenvector V s.t. AV=rV Let |v (^) i|>= |vj | for all j=!i, we have sumj aij vj = rvi Thus (r-aii)vi= sum (^) j=!i aij vj r-aii=(sum (^) j=!i aij vj )/vi Therefore |r-aii|<= sum (^) j=!i |aij | Note if equality holds then for all i, |v (^) i| are equal.

Stationary: Jacobi Method

In the i-th equation solve for the value of x (^) i while assuming the other entries of x remain fixed:

In matrix terms the method becomes:

where D, -L and -U represent the diagonal, the strictly lower-trg and strictly upper-trg parts of M M=D-L-U

7

ii

j i

i ij j i

N j

ij j i m

b m x m x b x

∑

∑

≠

− = → = (^1) ii

j i

k i ij j k i (^) m

b m x x

∑ ≠

− −

( 1 ) ( )

x (^ k^ ) = D−^1 ( L+U) x(^ k−^1 )^ + D−^1 b

Stationary-Gause-Seidel

Like Jacobi, but now assume that previously computed results are used as soon as they are available:

In matrix terms the method becomes:

where D, -L and -U represent the diagonal, the strictly lower-trg and strictly upper-trg parts of M M=D-L-U

8

ii

j i

i ij j i

N j

ij j i m

b m x m x b x

∑

∑

≠

− = → = (^1) ii

j i

k ij j j i

k i ij j k i (^) m

b m x m x x

∑ ∑ >

− <

− −

( ) ( 1 ) ( )

x (^ k^ ) = ( D−L)− 1 (Ux (^ k−^1 )^ +b)

SOR

  • Choose w to accelerate the convergence
    • W =1 : Jacobi / Gauss-Seidel
    • 2>W>1: Over-Relaxation
    • W < 1: Under-Relaxation

( ) = ( ) +( 1 − ) (k− 1 ) i

k i

k xi wx w x

Convergence of Stationary Method

  • Linear Equation: MX=b

  • A sufficient condition for convergence of the solution(GS,Jacob) is that the matrix M is diagonally dominant.

  • If M is symmetric positive definite, SOR converges for any w (0 Linear Equation: an optimization problem

  • Quadratic function of vector x

  • Matrix A is positive-definite, if for any nonzero

vector x

  • If A is symmetric, positive-definite, f(x) is minimized by

the solution Ax^ = b

x TAx > 0

f (x) = 21 xT^ Ax−bTx+ c

Linear Equation: an optimization problem

  • Quadratic function
  • Derivative
  • If A is symmetric
  • If A is positive-definite

is minimized by setting to 0

f (x) = 21 xT^ Ax−bTx+ c

f ′^ (x) = 21 AT^ x+ 21 Ax − b

f ′^ (x) = Ax− b

f(x) f ′(x ) Ax = b

  • If A is symmetric positive definite
    • P is the arbitrary point
    • X is the solution point

Symmetric Positive-Definite Matrix A

x = A−^1 b

f ( p)= f (x)+ 21 (p− x)T^ A(p− x )

21 (p^ −^ x)T A(p− x) >^0

since

f ( p)> f(x )

We have, If p != x

Non-stationary Iterative Method

  • State from initial guess x0, adjust it until close

enough to the exact solution

  • How to choose direction and step size?

x( i + 1 ) = x(i) + a(i)p(i ) i=0,1,2,3,……

p(i )

a(i )

Adjustment Direction

Step Size

Steepest Descent Method (2)

  • How to choose step size?
    • Line Search

should minimize f, along the direction of ,

which means da (^ (^ i+^1 ))=^0

d (^) f x

dad^ f(^ x(^ i+^1 )) =^ f′(x(i+^1 ))T dad x(i+^1 ) = f′(x(i+^1 ))Tr(i) =^0

() ( )

( ) ( ) ( )

( ) ( ) ( ) ( ) ( )

( ) ( ) ( ) ( )

( 1 ) ( )

( 1 ) ( )

iT i

iT i r Ar

r r i

i

T i i i

T i

i

T i i i

i

T i

i

T i

a

b Ax r a Ar r

b A x a r r

b Ax r

r r

r(i )

a(i )

Orthogonal

Steepest Descent Algorithm

( 1 ) ( ) ( ) ( )

( )

( ) ( )

( ) ( )

( ) ( )

i i i i

r Ar

r r i

i i

x x a r

a

r b Ax

i

T i

i

T i

Given x0, iterate until residue is smaller than error tolerance