5 views

Uploaded by Julian David Henao Escobar

fisica

- Introduction to Linear algebra (MATH 202)
- plugin-BBA
- Math Review Handout
- Circle Fitting
- Matlab Matrices.doc
- 24766466
- F - Physically Based Modeling, Principles and Practice - Constrained Dynamics
- Optimization Technique
- Math Review Handout
- B Yakir-Nonlinear Optimization
- Gaussian Quinn
- Xray Manual
- Optimization
- Linear algebra
- mp2
- Introduction to Linear Transformation
- Untitled
- Mathematics Jee
- Copy Pasta
- Improved Solution for Potential Flow About Arbitrary A Xi Symmetric Bodies by the Use of a Higher-Order Surface Source Method

You are on page 1of 18

Lecture 2:

Iterative methods for system of linear equations: The

conjugate gradient method

Computer Tutorial 3: Implementation

conjugate gradient method without the agonizing

pain, (1994). available at:

http://www.cs.cmu.edu/~jrs/jrspapers.html

2.1: The Conjugate Gradient Method

vector b, solve the linear system

Ax = b

Some linear algebra:

definite

zTAz > 0 for all nonzero vectors, z, with real elements.

positive definite example:

1 0 z0 1 0 z0

A , z z0 z1 z02 z12 0.

0 1 z1 0 1 z1

non-positive definite example:

0 1 1 0 1 1

A , z 1 1 2 0.

1 0 1 1 0 1

Some linear algebra:

n

T T

x, y x y y x xi yi

i 1

Orthogonal vectors: <x,y> = 0.

Transpose of matrix multiplication: (AB)T = BTAT

Inverse of matrix multiplication: (AB)-1 = B-1A-1

The quadratic form:

1 T T

f ( x) x Ax b x c

2

The quadratic form:

3 2 2

Example: A , b , c 0.

2 6 8

Plot of f(x):

The quadratic form and Ax=b

figure?

2.1: The Gradient of f(x):

T

f f f

f ( x) f ( x)

x1 x2 xn

steepest increase of f(x), and is orthogonal to the

contour lines

Instead of solving Ax=b...

1 T

f ( x) x Ax bT x c

2

1 T 1 A is symmetric:

f ( x) A x Ax b Ax b AT = A

2 2

f(x). Hence, Ax = b can be solved by finding x that

minimizes f(x).

Method of Steepest Descent

Start with an arbitrary point: x(0).

Find residual vector: r(i) = b Ax(i)

This indicates how far we are from the correct value of b.

Note that r(i) = -f (x(i))

Also, if e(i) = x(i) x is the (error) vector indicating how far

we are from the solution, then r(i) = -Ae(i)

Determine the direction for the next step: move in the

direction in which f(x) decreases most quickly, i.e.

opposite f (x), that is, r(i) .

How big a step should be taken? x(1) = x(0) + r(0)

Determine by the condition that it should minimize f:

d T d

f ( x(1) ) f ( x(1) ) x(1) f ( x(1) )T r( 0) 0

d d

Method of Steepest Descent

T

r(1) r( 0 ) 0

(b Ax(1) )T r( 0 ) 0

(b A( x( 0 ) r( 0 ) ))T r( 0 ) 0

(b Ax( 0) )T r( 0 ) ( Ar( 0 ) )T r( 0 ) 0

(b Ax( 0 ) )T r( 0 ) ( Ar( 0 ) )T r( 0 )

r(T0 ) r( 0 ) r(T0 ) ( Ar( 0 ) )

r(T0 ) r( 0 )

r(T0 ) Ar( 0 )

Method of Steepest Descent

Start with an arbitrary point

r(i ) b Ax(i )

T

r(i ) r(i )

(i ) T

r Ar(i )

(i )

x(i 1) x(i ) r

(i ) (i )

Premultiplying last equation by A

and adding b gives:

Use this for i > 0. CAUTION: Since the feedback from x(i) is not

present here, use the form above periodically to prevent

misconvergence

Method of Conjugate Gradient

Method of Steepest Descent was constructing

steps with successive residual vectors being

orthogonal:

T

r r

(1) ( 0 ) 0

Conjugate gradient method employs vectors that

are A-orthogonal (or conjugate)

T

d Ad ( j )

(i ) 0

Details of the derivation of the method are

omitted

Method of Conjugate Gradients

d (0) b Ax( 0 )

r(Ti) r(i )

(i )

d (Ti ) Ad (i )

x(i 1) x(i ) (i ) d (i )

r(i 1) r(i ) ( i ) Ad ( i )

r(Ti 1) r(i 1)

( i 1)

r(Ti) r(i )

r(i 1) r(i 1) ( i 1) d (i )

Preconditioned Conjugate Gradient Method

from numerical errors (rounding, overflow, underflow).

2 1 x 3

x 1501.5, y 3000

2 1.001 y 0

2 1 x 3

x 751.5, y 1500

2 1.002 y 0

1 1, ill conditioned

Matrix condition number: cond A A A

1, well conditioned

n

Matrix norm: A max Aij

1 i n

j 1

Preconditioned Conjugate Gradient Method

Suppose that M is a

symmetric positive definite

r( 0 ) b Ax( 0 )

matrix that approximates A, d (0) M 1r( 0 )

but easier to invert (well T 1

conditioned). Then we can r( i ) M r( i )

solve instead: M-1 Ax = M-1x (i )

d (Ti ) Ad ( i )

x(i 1) x( i ) (i ) d (i )

r(i 1) r(i ) ( i ) Ad ( i )

T 1

r( i 1) M r( i 1)

( i 1)

r(Ti) M 1r( i )

1

d (i 1) M r( i 1) ( i 1) d (i )

Preconditioned Conjugate Gradient Method

M ij

0 i j

Symmetric successive overrelaxation

preconditioner:

A L D LT

where L is the strictly lower part of A and D is

diagonal of A.

D 1 D

M ( L) D ( LT )

2

in the interval ]0,2[ is the relaxation parameter to

be chosen.

CG Method: sample code for Matlab

CG Method: sample problem

Sample problem:

4 1 1 x1 12

1 4 2 x2 1

1 2 4 x3 5

exact solution: x1 = 3, x2 = x3 = 1.

- Introduction to Linear algebra (MATH 202)Uploaded bykotabelud
- plugin-BBAUploaded byMohammad Asif
- Math Review HandoutUploaded byDavid Reaver
- Circle FittingUploaded byJosephRomeralo
- Matlab Matrices.docUploaded byMeddyDanial
- 24766466Uploaded byPaVan Nelakuditi
- F - Physically Based Modeling, Principles and Practice - Constrained DynamicsUploaded byFelipe Soares Maia
- Optimization TechniqueUploaded byZakwan Hisyam
- Math Review HandoutUploaded byDavid Reaver
- B Yakir-Nonlinear OptimizationUploaded byGogy
- Gaussian QuinnUploaded bytulkas72
- Xray ManualUploaded byNaiIan
- OptimizationUploaded byhsa89
- Linear algebraUploaded bymydeardog
- mp2Uploaded bygon972001
- Introduction to Linear TransformationUploaded bypanbuu
- UntitledUploaded byapi-150536296
- Mathematics JeeUploaded byPranav Pandey
- Copy PastaUploaded byStefan
- Improved Solution for Potential Flow About Arbitrary A Xi Symmetric Bodies by the Use of a Higher-Order Surface Source MethodUploaded bymfregeau3654
- IIT JEE 2012 Mathematics SyllabusUploaded byxkrishyx
- Mathe QuestionUploaded bycocojumbo12345
- ss-111202115106-phpapp02Uploaded byarifmj
- Mathematics Syllabus (1)Uploaded byVipul Jain
- Maths Paper - i _question Paper\i\iUploaded byJatin
- Advanced Engineering Mathematics 3rd Ed - Merle C. Potter Et Al. (OUP, 2005)Uploaded byMarcelo Fabiano
- Structural Dynamics - MDOFUploaded bynitroxx7
- Praktis SPM 1_questionsUploaded byzakry80
- docfem2dUploaded byelie chane
- CalcLinAlg2_C01Uploaded byGlenn Sulistio

- VariasVariablesFinal2013-02Uploaded byJulian David Henao Escobar
- variasUploaded byJulian David Henao Escobar
- variasUploaded byJulian David Henao Escobar
- fisicaUploaded byJulian David Henao Escobar
- Fenomenos Parcial 2014 2Uploaded byJulian David Henao Escobar
- Exam 1_001Uploaded byJose Carlos Argeñal
- examenesUploaded byJulian David Henao Escobar
- 333688029-FE-Practice-Exam-Solutions.pdfUploaded byJulian David Henao Escobar
- Lista 02 2011 SolucaoUploaded byThais Franco Carvalho
- 1835338.2014Uploaded byJulian David Henao Escobar
- Fisica III - Hector AlzateUploaded byFabian Antonio Legaspi Figueroa
- Problemas de fisicaUploaded byJuliuzCezar
- solucion examenUploaded byJulian David Henao Escobar
- esUploaded byJulian David Henao Escobar
- vibraciones mecanicasUploaded byDarwin Santamaría Calderón
- Fenomenos-Parcial-2015-2.pdfUploaded byJulian David Henao Escobar
- Fenomenos-Parcial-2015-2.pdfUploaded byJulian David Henao Escobar
- 473.pdfUploaded byANGELA
- variasUploaded byJulian David Henao Escobar
- Ajuste de Redes Gps_actualizadoUploaded byJulian David Henao Escobar
- Examen final de física de campos semestre 2016-2.pdfUploaded byJulian David Henao Escobar
- cap7Uploaded byGorky Limachi Ccapa
- examenesUploaded byJulian David Henao Escobar
- Robot2Uploaded byObito U Chiha
- fisicaUploaded byJulian David Henao Escobar
- Dinámica del cuerpo rígido. momento de inerciaUploaded byRafael Julio Morales Palomino
- solucion examenUploaded byJulian David Henao Escobar
- solucion examenUploaded byJulian David Henao Escobar
- EstaticaUploaded byJulian David Henao Escobar
- Determinación de Propiedades Ópticas y MecánicasUploaded byJulian David Henao Escobar

- Experiment No.5 Audio and Image Signal RepresentationUploaded byDaniel Bobis
- What Makes Python So Popular?Uploaded byjhrhew9800
- Answers for Chapter 3Uploaded byIsabel Barroso
- Data Warehouse Testing - Practical ApproachUploaded byRahul Sharma
- ownCloudAdminManual (1).pdfUploaded bykefferhauss6
- Cloning Procedure of R12 Single TierUploaded bymuhammadimran730
- IP Sample PaperUploaded byDilpreet Sachdeva
- debugger for power pc processorsUploaded byi_luxi
- Comp DesignUploaded byLokesh Ranjan
- ICTL Notes - ProgrammingUploaded bysarah johari
- IBM Tivoli Storage Manager Versions 5.4 and 5.5 Technical Guide Sg247447Uploaded byelouahabi1
- Opencv c++ OnlyUploaded byd-fbuser-119595565
- 2 Public InterfaceUploaded byeregulations
- 61941412-tgaUploaded byChiranjivi Kottam
- A Case Study on the Security of Application WhitelistingUploaded bybf10l2
- Tma SolutionUploaded byMinh Nam
- Midterm 1 Study GuideUploaded byDaniel Au
- Unix IntroUploaded bySudhakar Lakkaraju
- How to Access JDE Web Client From Any MachineUploaded byMuthu Lakshmanan
- h15104 Vxrail Appliance TechbookUploaded bytech_halo
- Exploring Sas Enterprise Miner Special Collection(1)Uploaded bylui
- Atmel 42733 8 Bit AVR Microcontroller ATmega48A 88A 168A DatasheetUploaded byMirada Polar Sovietico
- a Scenario 4Uploaded byVasi Acm
- Angraj Manjhi.docUploaded byroamer10
- DirectX 9 Managed Code With VBUploaded byDS
- pinaUploaded byفأحمد
- Cheatsheet OS 2Uploaded byalchandrairawan
- Syllabus Seventh SemesterUploaded bySingh Ak
- Hospital Mgmt (2)Uploaded byDarshit Patel
- OutputUploaded bylogick