Maths & numbers

Iterative linear-system solver

Trace Jacobi or Gauss–Seidel iterations and inspect residual convergence.

Iterative linear-system solver
Esc to restore

Your inputs

Up to 6 × 6. Entries separated by spaces or commas; finite magnitudes from 10⁻¹² to 10¹², or zero.

Results update as you type. Larger files run when you press Update result.

Your result

LOCAL & PRIVATE

Your result will appear here.

Your inputs stay in this browser. Nothing is uploaded or saved.

A clear answer. Here’s how.

Starts from the zero vector and applies the chosen iteration without reordering rows. Diagonal entries must be non-zero at scale. Stops when max|Ax−b| meets the target or after 1–1,000 iterations; non-convergence is explicitly reported. Displays the first 100 iterates and states the final solution/residual. Convergence is not guaranteed; a small residual does not bound error for ill-conditioned matrices.

See a worked example

Worked example

A fixed demonstration, separate from the values you enter above.

Matrix: one row per line
4, 1
1, 3
Right-hand side vector
1, 2
Iteration method
Gauss–Seidel
Maximum iterations
100
Maximum absolute residual target
1e-8

Example result

First 5 rows of the example result
IterationMaximum absolute residualX1X2
10.5833333333330.250.583333333333
20.04861111111110.1041666666670.631944444444
30.004050925925930.09201388888890.63599537037
40.0003375771604940.09100115740740.636332947531
50.0000281314300410.09091676311730.636361078961

Converged after 9 iterations. Final X=[0.0909090912790855, 0.6363636362403048]; residual 1.3566467949033267e-9. First 100 iterations are shown. A small residual alone does not bound solution error in an ill-conditioned system.