Gauss-Seidel Iteration Matrix Calculator

Solve systems of linear equations with the Gauss-Seidel iterative method. Enter your coefficient matrix, constants and initial guess to calculate successive approximations, inspect the iterations and check convergence.

Enter Your Matrix and Values

Enter one matrix row per line. Separate numbers with spaces or commas. Enter the right-hand-side vector and initial guess as lists of numbers.

Example: The sample system is diagonally dominant, which is a useful sufficient condition for convergence of the Gauss-Seidel method. Select "Load Example" to populate the fields.
Example: 4 1 1 on the first line, 2 7 1 on the second line, and so on. The matrix must be square.
Enter one value for each matrix row.
Enter an initial value for every unknown.
The algorithm stops when the maximum change between consecutive vectors is no greater than this value.
Choose between 1 and 1,000 iterations.

Calculation Results

Iterations performed —
Maximum final change —
Maximum residual —

Approximate Solution Vector

Iteration History

Each row shows the solution vector after one complete Gauss-Seidel iteration. The maximum change is the largest absolute difference between consecutive solution vectors.

Residual Check

The residual vector is calculated as Ax − b using the final approximate solution. A small residual indicates that the calculated solution closely satisfies the original equations.

What Is the Gauss-Seidel Method?

The Gauss-Seidel method is an iterative numerical method for solving a system of linear equations. Instead of calculating the exact solution directly, it starts with an initial guess and repeatedly improves the estimated values.

It is commonly used in numerical analysis, engineering simulations, computational mathematics and scientific computing.

Gauss-Seidel Formula

Consider a system of linear equations represented by:

Ax = b

The Gauss-Seidel update for the i-th variable is:

xᵢ⁽ᵏ⁺¹⁾ = [bᵢ − Σ(j < i) aᵢⱼxⱼ⁽ᵏ⁺¹⁾ − Σ(j > i) aᵢⱼxⱼ⁽ᵏ⁾] / aᵢᵢ

Here:

  • xᵢ is the unknown variable being updated.
  • aᵢⱼ is an element of the coefficient matrix.
  • bᵢ is the corresponding constant.
  • k represents the current iteration.
  • k + 1 represents the next iteration.

The key feature is that the method immediately uses newly calculated values within the same iteration. This distinguishes it from the Jacobi iterative method, which uses only values from the previous iteration.

When Does Gauss-Seidel Converge?

The method does not converge for every possible matrix. A common sufficient condition is strict diagonal dominance. A matrix is strictly diagonally dominant by rows when:

|aᵢᵢ| > Σ(j ≠ i) |aᵢⱼ|

for every row i. Symmetric positive definite matrices also guarantee convergence. Other matrices may converge, but convergence depends on the particular system.

Important: This calculator checks whether the matrix is strictly diagonally dominant, but that check is not a complete convergence test. Always inspect the iteration history and residual when solving a system.

How to Use This Calculator

  1. Enter a square coefficient matrix A.
  2. Enter the right-hand-side vector b.
  3. Provide an initial guess for all unknown variables.
  4. Set the convergence tolerance.
  5. Choose the maximum number of iterations.
  6. Click Calculate Gauss-Seidel Solution.
  7. Review the approximate solution, iteration history and residual.

Gauss-Seidel Method vs. Jacobi Method

Feature Gauss-Seidel Jacobi
Uses updated values immediately Yes No
Uses previous iteration values For variables not yet updated For all variables
Implementation Sequential updates Simultaneous updates
Parallel computation Less straightforward More straightforward

Frequently Asked Questions

1. What is the Gauss-Seidel iteration method used for?

It is used to approximate solutions to systems of linear equations, particularly in numerical analysis and engineering.

2. Does the Gauss-Seidel method always converge?

No. Strict diagonal dominance and symmetric positive definiteness are common sufficient conditions for convergence. Other matrices require additional analysis.

3. What happens if the diagonal contains zero?

The standard Gauss-Seidel update cannot divide by a zero diagonal element. This calculator reports an error if any diagonal entry is zero.

4. What does the tolerance mean?

Tolerance defines how small the maximum change between consecutive solution vectors must become before the calculator stops.

5. What is the residual?

The residual is Ax − b. It measures how closely the approximate solution satisfies the original system.

Related Matrix Tools

Explore other matrix and numerical calculation tools: