---
title: "Direct, iterative methods; Gauss-Seidel numerical"
subject: "Computational Techniques in Civil Engineering"
chapter: 2
key: "semester_8/computational_techniques_in_civil_engineering:direct-iterative-gauss-seidel"
source: https://www.bctengineer.com/q/semester_8/computational_techniques_in_civil_engineering/direct-iterative-gauss-seidel
site: BCT Engineering
---

# Direct, iterative methods; Gauss-Seidel numerical

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

- Asked in: 2078 Kartik, 2+6 marks
- Video: [Gauss Seidel Method | Iterative Method | Numerical Methods | Problems](https://www.youtube.com/watch?v=gxy6VI1hEfs) — Dr.Gajendra Purohit and 2 more
- 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/direct-iterative-gauss-seidel
- Whole chapter: https://www.bctengineer.com/md/semester_8/computational_techniques_in_civil_engineering/chapter-2

## Question

What are the direct methods and iterative methods of solving linear equations? Solve the following set of linear equations by the Gauss-Seidel method starting with initial guess of $[1, 2, 3]$.

$12x + 3y - 5z = 1$

$x + 5y + 3z = 28$

$3x + 7y + 13z = 76$

## Short answer

Direct methods (Gauss elimination, LU, Cholesky) give exact solution in finite steps; iterative methods (Jacobi, Gauss-Seidel, SOR, CG) improve a guess. For the system, rearranging equations and iterating from (1,2,3) yields convergence to exact solution x=1, y=3, z=4 after six iterations.

## Answer

#### Direct and iterative methods
- **Direct methods** give the solution in a finite, known number of operations (exact apart from round-off). Examples: Gauss elimination, Gauss-Jordan, LU and Cholesky decomposition, matrix inverse (Cramer's rule). They are best for small or dense systems.
- **Iterative methods** start from a trial vector and improve it repeatedly until the change is below a tolerance. Examples: Jacobi, Gauss-Seidel, SOR, conjugate gradient. They are best for large sparse systems and need convergence conditions such as diagonal dominance.

#### Gauss-Seidel solution
The system is diagonally dominant ($12>8$, $5>4$, $13>10$), so it converges. Rearranging:
$$
x=\frac{1-3y+5z}{12},\quad y=\frac{28-x-3z}{5},\quad z=\frac{76-3x-7y}{13}
$$
Start $(x,y,z)=(1,2,3)$.

| Iteration | $x$ | $y$ | $z$ |
|---|---|---|---|
| 1 | 0.8333 | 3.6333 | 3.6974 |
| 2 | 0.7156 | 3.2384 | 3.9373 |
| 3 | 0.9143 | 3.0548 | 3.9903 |
| 4 | 0.9823 | 3.0094 | 3.9990 |
| 5 | 0.9973 | 3.0011 | 4.0000 |
| 6 | 0.9997 | 3.0000 | 4.0000 |

Example of iteration 1: $x=(1-3(2)+5(3))/12=0.8333$; $y=(28-0.8333-9)/5=3.6333$; $z=(76-2.5-25.4333)/13=3.6974$.

**Answer: $x\approx1,\ y\approx3,\ z\approx4$** (exact solution $x=1,y=3,z=4$).

## Check yourself

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

1. Why will Gauss-Seidel converge for this system?
   A. It is symmetric
   B. It is banded
   C. It is diagonally dominant (12>8, 5>4, 13>10)
   D. It has integer coefficients
   Answer: C. Diagonal dominance guarantees convergence. (Key point: Convergence check)

2. First iteration x with guess (1,2,3)?
   A. (1+6+15)/12
   B. (1 - 6 + 15)/12 = 0.8333
   C. (1 - 3 + 5)/12
   D. 10/13
   Answer: B. x = (1 - 3y + 5z)/12. (Key point: Iteration 1 x)

3. What is the final solution?
   A. x = 1, y = 3, z = 4
   B. x = 4, y = 3, z = 1
   C. x = 1, y = 2, z = 3
   D. x = 3, y = 4, z = 1
   Answer: A. The iterations converge to (1,3,4). (Key point: Solution)

## Related in Computational Techniques in Civil Engineering

- [CG algorithm; Gauss-Seidel numerical](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Acg-algorithm-gauss-seidel-numerical) — Computational Techniques in Civil Engineering, chapter 2
- [Iterative methods for linear equations](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Aiterative-methods-linear-equations) — Computational Techniques in Civil Engineering, chapter 2
- [Solution methods of linear equations with examples](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Asolution-methods-linear-examples) — Computational Techniques in Civil Engineering, chapter 2
- [Techniques of solving problems; FEM and FDM](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Afem-fdm-working-techniques) — Computational Techniques in Civil Engineering, chapter 1

## Related in other subjects

- [Gauss-Seidel: 10x+y-z=11.19](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Agauss-seidel-10x-y-z) — Numerical Method, chapter 3
- [Gauss-Seidel: four unknowns](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Agauss-seidel-four-unknowns) — Numerical Method, chapter 3
- [Gauss-Seidel: 20x+y-2z=17](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Agauss-seidel-20x-y-2z) — Numerical Method, chapter 3
- [Iterative method: 4 equations](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Aiterative-method-four-equations) — Numerical Method, chapter 3, asked 2×
