- Asked 2/12
- 2079 Shrawan · 5 marks
- 2071 Bhadra · 3 marks
Conjugate gradient method and algorithm
Short answer
Conjugate gradient solves symmetric positive definite systems by minimising energy along A-conjugate directions, converging in at most n steps. Algorithm: set initial residual r0=b-Ax0, direction d0=r0; for each step compute alpha=(r_k^T r_k)/(d_k^T A d_k), update x and r, then beta=(r_{k+1}^T r_{k+1})/(r_k^T r_k) to update direction.
Explain the conjugate gradient method and its algorithm for solving a system of linear equations.
Conjugate gradient method
The conjugate gradient (CG) method solves for a symmetric, positive definite matrix . It is equivalent to minimising the quadratic energy
whose minimum is exactly the solution of . The minimum is searched along directions that are A-conjugate, i.e. for . Each step minimises along one direction without spoiling the earlier ones, so in exact arithmetic the solution is reached in at most steps for an system. The residual is the negative gradient of .
Compared with direct elimination, CG needs only matrix-vector products, so it stores only the non-zero terms of . It is good for large sparse systems, and rounding errors do not accumulate in a long elimination.
Algorithm
- Choose a starting vector (usually ). Compute the residual and set the first search direction .
- For repeat:
- Step length:
- Update the solution:
- Update the residual:
- Check convergence: stop if tolerance.
- Direction factor:
- New direction:
- The last is the solution.
Convergence is faster if has clustered eigenvalues, and preconditioning is used to improve this.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Conjugate gradient numerical (2,-1 system) · Computational Techniques in Civil Engineering, chapter 2 · asked 2×
- Conjugate gradient numerical (3,0,2 system) · Computational Techniques in Civil Engineering, chapter 2 · asked 2×
- Conjugate gradient three iterations (10,-6,0) · Computational Techniques in Civil Engineering, chapter 2
- Linear solution techniques; CG algorithm · Computational Techniques in Civil Engineering, chapter 2
- Solution methods of linear equations with examples · Computational Techniques in Civil Engineering, chapter 2
- Why conjugate gradient over Gaussian methods · Computational Techniques in Civil Engineering, chapter 2
- Consistency of a linear system · Mathematics III, chapter 1
- Two-mass system equations, X2/F, F-I and F-V analogies · Control Systems, chapter 2
- Consistency of a linear system · Mathematics III, chapter 1 · asked 9×
- Consistency of a linear system · Mathematics III, chapter 1 · asked 8×
All Computational Techniques in Civil Engineering chapter 2 questions →