---
title: "Gauss-Seidel: four unknowns"
subject: "Numerical Method"
chapter: 3
key: "semester_4/numerical_method:gauss-seidel-four-unknowns"
source: https://www.bctengineer.com/q/semester_4/numerical_method/gauss-seidel-four-unknowns
site: BCT Engineering
---

# Gauss-Seidel: four unknowns

Numerical Method · Chapter 3: Solution of system of linear algebraic equations

- Asked in: 2070 Magh, 8 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_4/numerical_method/gauss-seidel-four-unknowns
- Whole chapter: https://www.bctengineer.com/md/semester_4/numerical_method/chapter-3

## Question

Solve the following systems of linear equations using the Gauss-Seidel iteration method.
x1 + 3x2 - x3 + 7x4 = 19
2x1 + 8x2 + x3 - x4 = 17
3x1 + x2 + 9x3 - x4 = 15
9x1 - x2 - x3 + 2x4 = 13

## Short answer

After rearranging for diagonal dominance and applying Gauss-Seidel iterations, the solution converges to x1 = 1.3665, x2 = 1.8681, x3 = 1.2138, x4 = 1.8918.

## Answer

**Gauss-Seidel method:** solve each equation for its diagonal unknown and use the newest values immediately in the same iteration. It converges when the system is diagonally dominant.

#### Step 1: Check dominance and rearrange
The given equations are not in diagonally dominant order, so rearrange them (swap equations) so that the largest coefficient of each unknown lies on the diagonal:

```text
9x1 −  x2 −  x3 + 2x4 = 13   (was 4th)
2x1 + 8x2 +  x3 −  x4 = 17   (was 2nd)
3x1 +  x2 + 9x3 −  x4 = 15   (was 3rd)
 x1 + 3x2 −  x3 + 7x4 = 19   (was 1st)
```

Now 9 > 1 + 1 + 2, 8 > 2 + 1 + 1, 9 > 3 + 1 + 1, 7 > 1 + 3 + 1, so the system is diagonally dominant.

#### Step 2: Iteration formulas
```text
x1 = (13 + x2 + x3 − 2x4) / 9
x2 = (17 − 2x1 − x3 + x4) / 8
x3 = (15 − 3x1 − x2 + x4) / 9
x4 = (19 − x1 − 3x2 + x3) / 7
```

Start with x1(0) = 0, x2(0) = 0, x3(0) = 0, x4(0) = 0.

#### Step 3: Iterations
| Iter | x1 | x2 | x3 | x4 |
|---|---|---|---|---|
| 0 | 0.0000 | 0.0000 | 0.0000 | 0.0000 |
| 1 | 1.4444 | 1.7639 | 0.9892 | 1.8933 |
| 2 | 1.3296 | 1.9056 | 1.2221 | 1.8822 |
| 3 | 1.3737 | 1.8641 | 1.2108 | 1.8921 |
| 4 | 1.3656 | 1.8688 | 1.2141 | 1.8917 |
| 5 | 1.3666 | 1.8681 | 1.2138 | 1.8919 |
| 6 | 1.3665 | 1.8681 | 1.2138 | 1.8918 |
| 7 | 1.3665 | 1.8681 | 1.2138 | 1.8918 |
| 8 | 1.3665 | 1.8681 | 1.2138 | 1.8918 |

Values of two successive iterations agree to 4 decimal places, so we stop.

**Answer: x1 ≈ 1.3665, x2 ≈ 1.8681, x3 ≈ 1.2138, x4 ≈ 1.8918**

## Check yourself

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

1. Why must the equations be reordered before applying Gauss-Seidel here?
   A. So that the largest coefficient of each unknown lies on the diagonal, making the system diagonally dominant
   B. Because the equations are inconsistent
   C. To make all constants equal
   D. To avoid using the newest values
   Answer: A. As given, the system is not diagonally dominant; swapping equations fixes this and ensures convergence. (Key point: Rearranging)

2. Which original equation becomes the first row?
   A. The 1st equation
   B. The 4th equation, 9x1 - x2 - x3 + 2x4 = 13
   C. The 2nd equation
   D. The 3rd equation
   Answer: B. The 4th equation has the dominant coefficient 9 on x1. (Key point: Which equation goes first)

3. From zeros, what is x1(1)?
   A. 19/7 = 2.7143
   B. 17/8 = 2.1250
   C. 13/9 = 1.4444
   D. 15/9 = 1.6667
   Answer: C. x1 = (13 + x2 + x3 - 2x4)/9 with all others zero gives 1.4444. (Key point: First iteration)

4. Why does the iteration stop at iteration 8?
   A. The residual is exactly 0
   B. It always takes 8 iterations
   C. x4 became larger than x1
   D. Successive iterations agree to 4 decimal places
   Answer: D. Iterations 6, 7 and 8 give the same values to 4 decimals: 1.3665, 1.8681, 1.2138, 1.8918. (Key point: Stopping)

## Related in Numerical Method

- [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: 20x+y-2z=17](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Agauss-seidel-20x-y-2z) — Numerical Method, chapter 3
- [Gauss elimination: 4x4 system](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Agauss-elimination-4x4-eleven) — Numerical Method, chapter 3, asked 3×
- [Gauss elimination, partial pivoting, 4 unknowns](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Agauss-elimination-four-pivoting) — Numerical Method, chapter 3, asked 4×
- [Gauss-Jordan pseudo-code](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Agauss-jordan-pseudocode) — Numerical Method, chapter 3, asked 4×

## Related in other subjects

- [Find x3[n] from X3=X1X2, x1 5-point, x2 4-point](https://www.bctengineer.com/question.md?key=semester_7%2Fdigital_signal_analysis_and_processing%3Adft-product-x3-73s) — Digital Signal Analysis and Processing, chapter 7, asked 3×
- [Transfer function from state equations, output x1](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Atf-from-de-3x1-x2) — Control Systems, chapter 8, asked 2×
- [Direct, iterative methods; Gauss-Seidel numerical](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Adirect-iterative-gauss-seidel) — Computational Techniques in Civil Engineering, chapter 2
- [Transfer function from state equations, output x2](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Atf-from-de-3x1-x2-y) — Control Systems, chapter 8, asked 2×
