Gauss-Seidel Calculator

Solve a square system of linear equations using the Gauss-Seidel method or SOR method.

The calculator solves systems in the form A · x = b. Enter the coefficient matrix A and the constant vector b.

About the Author: Created by Fotios Angelakis, MSc in Mechanical Engineering, with experience in engineering calculations, numerical methods, and data analytics. Learn more about the author's qualifications and experience.

Coefficient Matrix A

Constant Vector b

Enter the system coefficients and click calculate.

How the Gauss-Seidel Calculator Works

The Gauss-Seidel Calculator solves systems of linear equations using an iterative numerical method. It is useful in numerical analysis, engineering, scientific computing, and applied mathematics.

The calculator solves systems written as:

A · x = b

where A is the coefficient matrix, x is the unknown solution vector, and b is the constant vector.

Initial x Update x₁, x₂, ... Solution repeat until convergence

Gauss-Seidel Formula

For a system of equations, the Gauss-Seidel update for each unknown is:

xᵢ⁽ᵏ⁺¹⁾ = (bᵢ - Σ aᵢⱼxⱼ) / aᵢᵢ

The key idea is that each new value is used immediately in the next calculation during the same iteration.

How to Use the Calculator

  1. Select the number of equations.
  2. Enter the coefficient matrix A.
  3. Enter the constant vector b.
  4. Choose Gauss-Seidel or SOR.
  5. Enter tolerance, maximum iterations, and an initial guess.
  6. Click Calculate Solution.

Example System

Consider:

3x₁ + x₂ = 9
2x₁ + 4x₂ = 12

Matrix form:

A = [3, 1]
    [2, 4]

b = [9, 12]

Starting with x = [0, 0], the method converges to:

x₁ = 2.4, x₂ = 1.8

Diagonal Dominance

Diagonal dominance is important because it often helps Gauss-Seidel converge. A matrix is diagonally dominant if:

|aᵢᵢ| ≥ Σ |aᵢⱼ| for j ≠ i

For the example matrix:

[3, 1]
[2, 4]

the diagonal entries are larger than the non-diagonal row sums, so the method is expected to converge well.

Gauss-Seidel vs SOR

Method Update Use Case
Gauss-Seidel Standard iterative update Simple and reliable for many diagonally dominant systems
SOR Uses relaxation parameter ω Can converge faster with a good ω value
Important: If the matrix is not diagonally dominant, Gauss-Seidel may converge slowly, fail to converge, or diverge.

Frequently Asked Questions

What is the Gauss-Seidel method?

It is an iterative method for solving systems of linear equations. It repeatedly updates the unknowns until the solution changes by less than the selected tolerance.

What is the difference between Gauss-Seidel and Gaussian elimination?

Gaussian elimination is a direct method. Gauss-Seidel is iterative, meaning it improves an approximate solution step by step.

Why is diagonal dominance important?

Diagonal dominance often helps guarantee convergence and makes the iteration more stable.

What does tolerance mean?

Tolerance is the stopping threshold. The calculator stops when the maximum change between two iterations is smaller than this value.

What is the relaxation parameter ω?

In SOR, ω controls how strongly the new update is applied. Values between 1 and 2 may speed up convergence for some systems, but poor choices can cause divergence.