---
title: "Why conjugate gradient over Gaussian methods"
subject: "Computational Techniques in Civil Engineering"
chapter: 2
key: "semester_8/computational_techniques_in_civil_engineering:cg-vs-gaussian"
source: https://www.bctengineer.com/q/semester_8/computational_techniques_in_civil_engineering/cg-vs-gaussian
site: BCT Engineering
---

# Why conjugate gradient over Gaussian methods

Computational Techniques in Civil Engineering · Chapter 2: Solutions of linear equations

- Asked in: 2070 Bhadra, 4 marks
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/computational_techniques_in_civil_engineering/cg-vs-gaussian
- Whole chapter: https://www.bctengineer.com/md/semester_8/computational_techniques_in_civil_engineering/chapter-2

## Question

Why is the conjugate gradient method used in computation over Gaussian methods?

## Short answer

Gaussian elimination produces fill-in and costs roughly n^3/3 operations, while CG needs only matrix-vector products and stores just the nonzeros, so it suits large sparse systems. CG can stop early, corrects round-off using the original matrix, and parallelizes easily, but requires a symmetric positive definite matrix.

## Answer

Gaussian elimination is a direct method that reduces $[A]$ to triangular form, while the conjugate gradient (CG) method is an iterative method that minimises $\tfrac12x^TAx-b^Tx$ along A-conjugate directions. CG is preferred for large problems for these reasons:

1. **Memory:** CG needs only matrix-vector products $Ad$, so only the non-zero terms of the sparse matrix are stored. Gaussian elimination produces fill-in, which destroys sparsity inside the band.
2. **Operation count:** each CG iteration costs about $n\times(\text{non-zeros per row})$ operations, and a good solution often comes in far fewer than $n$ iterations, whereas elimination costs about $n^3/3$ (or $nb^2$ for a banded matrix).
3. **Accuracy:** round-off errors in elimination accumulate over $n$ steps; in CG each iteration uses the original matrix and corrects the error.
4. **Flexibility:** the solution can be stopped when the residual is small enough, and a good starting guess can be used; elimination cannot be stopped early.
5. **Parallelism:** matrix-vector products are easy to parallelise, and the matrix need not even be assembled (element-by-element products).
6. In exact arithmetic CG finishes in at most $n$ steps and with preconditioning converges faster.

Limitation: CG is applicable only to symmetric positive definite matrices, and for several load vectors a factorised direct solver may be cheaper.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Why does CG need less memory than Gaussian elimination for large sparse problems?
   A. CG compresses the matrix into one number
   B. Gaussian elimination only stores the diagonal
   C. CG only needs matrix-vector products, so only non-zero terms are stored, while elimination causes fill-in
   D. CG stores the full inverse matrix
   Answer: C. CG uses products A d and never changes A, so sparsity is kept. Elimination creates fill-in inside the band. (Key point: Memory and fill-in)

2. Which statement about operation counts is correct?
   A. Elimination costs about n x (non-zeros per row) per step, CG about n^3/3
   B. Each CG iteration costs about n x (non-zeros per row), while elimination costs about n^3/3
   C. Both cost exactly n^3/3
   D. CG always needs exactly n^2 iterations
   Answer: B. A CG iteration is a sparse matrix-vector product, and a good solution often comes in far fewer than n iterations; elimination costs about n^3/3 (or n b^2 for a band). (Key point: Operation count)

3. What flexibility does CG have that elimination does not?
   A. It can be stopped when the residual is small enough and can use a good starting guess
   B. It can solve non-square systems
   C. It works for any matrix, including non-symmetric
   D. It needs no starting vector
   Answer: A. Being iterative, CG can stop at a tolerance and benefit from a good initial guess. Elimination cannot be stopped early. (Key point: Early stopping)

4. What is a limitation of CG mentioned for its use?
   A. It cannot be parallelised
   B. It cannot use preconditioning
   C. It requires the matrix to be fully assembled
   D. It applies only to symmetric positive definite matrices, and a factorised direct solver may be cheaper for several load vectors
   Answer: D. CG needs a symmetric positive definite matrix, and with many load vectors, factorising once and reusing it can be cheaper. (Key point: Limitation of CG)

## Related in Computational Techniques in Civil Engineering

- [Conjugate gradient method and algorithm](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Acg-method-algorithm) — Computational Techniques in Civil Engineering, chapter 2, asked 2×
- [Conjugate gradient numerical (2,-1 system)](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Acg-numerical-three-unknowns-a) — Computational Techniques in Civil Engineering, chapter 2, asked 2×
- [Conjugate gradient numerical (3,0,2 system)](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Acg-numerical-3-0-2) — Computational Techniques in Civil Engineering, chapter 2, asked 2×
- [Conjugate gradient three iterations (10,-6,0)](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Acg-three-iterations-a) — Computational Techniques in Civil Engineering, chapter 2
- [Conjugate gradient numerical (5 iterations)](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Acg-numerical-3-0-1) — Computational Techniques in Civil Engineering, chapter 2

## Related in other subjects

- [Conjugate beam: slope and deflection at free end C](https://www.bctengineer.com/question.md?key=semester_4%2Ftheory_of_structures_i%3Aconjugate-udl-2knm-10kn-5kn-2068) — Theory of Structures I, chapter 4, asked 2×
- [Conjugate beam: stepped symmetric beam](https://www.bctengineer.com/question.md?key=semester_4%2Ftheory_of_structures_i%3Aconjugate-sym-beam-3portions) — Theory of Structures I, chapter 4
- [Conjugate beam: slope and deflection at C](https://www.bctengineer.com/question.md?key=semester_4%2Ftheory_of_structures_i%3Aconjugate-slope-defl-c-120kn-3ei) — Theory of Structures I, chapter 4
- [Conjugate beam: rotation at A, deflection at C](https://www.bctengineer.com/question.md?key=semester_4%2Ftheory_of_structures_i%3Aconjugate-a-rotation-c-defl-60knm) — Theory of Structures I, chapter 4
