13.07.2015 Views

An Introduction to the Conjugate Gradient Method Without the ...

An Introduction to the Conjugate Gradient Method Without the ...

An Introduction to the Conjugate Gradient Method Without the ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

¢£©§¢£¡¡¡¤©§£¢£¥¥¥¤©§1. <strong>Introduction</strong>When I decided <strong>to</strong> learn <strong>the</strong> <strong>Conjugate</strong> <strong>Gradient</strong> <strong>Method</strong> (henceforth, CG), I read four different descriptions,which I shall politely not identify. I unders<strong>to</strong>od none of <strong>the</strong>m. Most of <strong>the</strong>m simply wrote down <strong>the</strong> method,<strong>the</strong>n proved its properties without any intuitive explanation or hint of how anybody might have invented CGin <strong>the</strong> first place. This article was born of my frustration, with <strong>the</strong> wish that future students of CG will learna rich and elegant algorithm, ra<strong>the</strong>r than a confusing mass of equations.CG is <strong>the</strong> most popular iterative method for solving large systems of linear equations. CG is effectivefor systems of <strong>the</strong> form¢¡ £ ¥where ¡ is an unknown vec<strong>to</strong>r, ¥ is a known vec<strong>to</strong>r, andis a known, square, symmetric, positive-definite(or positive-indefinite) matrix. (Don’t worry if you’ve forgotten what “positive-definite” means; we shallreview it.) These systems arise in many important settings, such as finite difference and finite elementmethods for solving partial differential equations, structural analysis, circuit analysis, and math homework.Iterative methods like CG are suited for use with sparse matrices. If is dense, your best course ofaction is probably <strong>to</strong> fac<strong>to</strong>r and solve <strong>the</strong> equation by backsubstitution. The time spent fac<strong>to</strong>ring a denseis roughly equivalent <strong>to</strong> <strong>the</strong> time spent solving <strong>the</strong> system iteratively; and once is fac<strong>to</strong>red, <strong>the</strong> systemcan be backsolved quickly for multiple values of . Compare this dense matrix with a sparse matrix oflarger size that fills <strong>the</strong> same amount of memory. The triangular fac<strong>to</strong>rs of a sparse usually have manymore nonzero elements than itself. Fac<strong>to</strong>ring may be impossible due <strong>to</strong> limited memory, and will betime-consuming as well; even <strong>the</strong> backsolving step may be slower than iterative solution. On <strong>the</strong> o<strong>the</strong>r¥hand, most iterative methods are memory-efficient and run quickly with sparse matrices.I assume that you have taken a first course in linear algebra, and that you have a solid understandingof matrix multiplication and linear independence, although you probably don’t remember what thoseeigenthingies were all about. From this foundation, I shall build <strong>the</strong> edifice of CG as clearly as I can.(1)2. NotationLet us begin with a few definitions and notes on notation.With a few exceptions, I shall use capital letters <strong>to</strong> denote matrices, lower case letters <strong>to</strong> denote vec<strong>to</strong>rs,1 matrices.Written out fully, Equation 1 isand Greek letters <strong>to</strong> denote scalars. is an § § matrix, and ¡ and ¥ are vec<strong>to</strong>rs — that is, §¢¡¢¢11 1¤1221 2¤22.. .. .¦¨§ §§¢¡¢¢12.¦¨§ §§¢¡¢¢12.¦¨§ §§¤ 1 ¤ 2 ¤¥¤The inner product of two vec<strong>to</strong>rs is written , and represents <strong>the</strong> scalar sum ¡ £ ¡ ¡¤1 . Note that¡. If ¡ and are orthogonal, <strong>the</strong>n ¡ £ 0. In general, expressions that reduce <strong>to</strong> 1 1 matrices,such as ¡ and ¡ ¡ , are treated as scalar values.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!