Successive Over-Relaxation Calculator
Speed up Gauss-Seidel with a relaxation factor.
What it does
Successive over-relaxation, usually shortened to SOR, is an iterative method for solving linear systems. It modifies each Gauss-Seidel update by multiplying the correction with a relaxation factor omega.
The University of Texas at Austin notes on advanced linear algebra derive SOR from the splitting of the coefficient matrix and show how the Gauss-Seidel update emerges when the relaxation factor equals one.
Choosing omega well can substantially reduce the number of iterations needed. For many model problems the optimal value lies between one and two.
This tool handles a two by two system with a zero starting guess, a chosen omega and an iteration count. It reports the current estimates of x and y.
The method still needs the system to be suitable for iteration. Diagonally dominant systems are a common safe case.
How to use
- Enter the four matrix coefficients and two right side values.
- Set omega to 1 for plain Gauss-Seidel, or above 1 to accelerate.
- Enter the number of iterations, up to 500.
- Read the x and y estimates in the main result.
- Compare different omega values on the same system.
- Watch for divergence if omega is too large.
Formula
- omega
- Relaxation factor, between 0 and 2.
- a11, a12, a21, a22
- Coefficient matrix entries.
- b1, b2
- Right hand side values.
- x, y
- Unknowns being approximated.
The engine applies the new x immediately when computing y, as in Gauss-Seidel, and multiplies each correction by omega. It rejects omega outside the open interval from 0 to 2.
Worked example
Example: accelerating a small system
System 4x + y = 11, x + 3y = 11, omega 1.2, 10 iterations.
- With omega = 1 the method reduces to Gauss-Seidel.
- Each update is the Gauss-Seidel value blended with the current value using omega.
- Starting from zero, the first sweep moves both unknowns toward the solution.
- After 10 sweeps, x is about 1.99999929 and y about 3.00000027.
- The exact solution is x = 2 and y = 3.
- Trying omega near 1.5 may converge faster or diverge depending on the matrix.
Reference table
| Omega | x | y |
|---|---|---|
| 1.0 | 2.00000000 | 3.00000000 |
| 1.2 | 1.99999929 | 3.00000027 |
| 1.5 | 2.00000018 | 2.99999986 |
Limits
- The tool handles 2 by 2 systems only.
- It uses a fixed zero starting guess.
- Convergence is not guaranteed for every omega.
- Results are shown to eight decimal places.
Common mistakes
- Choosing omega below 1 when acceleration was intended.
- Using omega at or above 2, which the tool rejects.
- Assuming a larger omega is always better.
- Applying SOR to a system for which the iteration diverges.
- Comparing iteration counts without noting the omega used.
Try it yourself
Quick checks. Answers sit tucked under each question.
What does omega equal 1 give?
Ordinary Gauss-Seidel iteration.
What range of omega does the tool accept?
Between 0 and 2.
What is the solution of the worked system?
x = 2, y = 3.
Questions
What is SOR?
An accelerated version of Gauss-Seidel iteration.
What does omega control?
How much of each correction is applied.
When is it faster?
With a well chosen omega between 1 and 2.
Can it diverge?
Yes, especially with an omega that is too large.
Does it need a derivative?
No. It works on linear systems.
What is the starting guess?
Zero for both unknowns.
Sources
- University of Texas at Austin, Foundations to Frontiers: SOR
- Millersville University, MATH 375 Jacobi and Gauss-Seidel Techniques