Successive overrelaxation or SOR method
The process of correcting an equation by modifying one unknown is sometimes called relaxation. The Gauss--Seidel algorithm performs successive relazations by moving from equation to equation, modifying one one unknown in a turn. In many cases, convergence can be accelerated substantially by overrelaxing that involves predefined factor ω > 0.In numerical linear algebra, the method of successive over-relaxation (SOR) is a variant of the Gauss–Seidel method for solving a linear system of equations, resulting in faster convergence. It was devised simultaneously by David M. Young Jr. (1923--2008) and by Stanley P. Frankel (1919--1978) in 1950 for the purpose of automatically solving linear systems on digital computers.
When SOR method is applied to the traditional fixed point equation (3), it generates a sequence of approximations according to the formula
To describe application of the overrelaxation for solving system of linear equations (1) or (2), we follow Gauss-Seidel approach and decompose matrix A of coefficients into sum of three matrices:
Inputs: A, b, ω
Output: φ
Choose an initial guess φ to the solution
repeat until convergence
for i from 1 until n do
set σ to 0
for j from 1 until n do
if j ≠ i then
set σ to σ + 𝑎i,j φj
end if
end (j-loop)
set φi to (1 − ω)φi + ω(bi − σ) / 𝑎i,i
end (i-loop)
check if convergence is reached
end (repeat)
input A and b
input ω
n is the size of A
while precision conditions do
for i = 1 : n do
s = 0
for j = 1 : n do
if j ne; i then
s = s + 𝑎i,j xj
end if
end for
xi = ω (bi − s)/ 𝑎i,i + (1 − ω ) xi
end for
end while
function [x,r,k]=RM(A,b,Omega,kmax,eps1)
% kmax maximum number of iterations;
% eps1 given tolerance;
% Omega: relaxation parameter
% stopping criteria: norm(r)/norm(b)<=eps1 or k>kmax
% Output: x the kth iterate, r the kth residual
% k the number of iterations
% Initial guess is x=0; r=b
n=length(b);r=b;x=zeros(n,1);nb=norm(b);
E=tril(A,-1);D=diag(diag(A));M=(1/Omega)*D-E;
k=1;mr=1;mx=1;e=1;
while e>eps1 & k<=kmax
dx=M\r;
x=x+dx;% saxpy operation
r=r-A*dx;% GAXPY operation
e=norm(r)/nb;
k=k+1;
end
Theorem 4 (Kahan, 1958): A necessary condition for the SOR method to converge is ω ∈ (0, 2).
n | 0 | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|---|
x₁ | 0 | \( \displaystyle \frac{}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{1}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₂ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₃ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
n | 0 | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|---|
x₁ | 0 | \( \displaystyle \frac{}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{1}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₂ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₃ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
n | 0 | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|---|
x₁ | 0 | \( \displaystyle \frac{}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{1}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₂ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₃ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₄ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
n | 0 | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|---|
x₁ | 0 | \( \displaystyle \frac{}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{1}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₂ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₃ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₄ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
diag = DiagonalMatrix[{4, 4, 5}];
B = Inverse[diag] . (A - diag)
n | 0 | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|---|
x₁ | 0 | \( \displaystyle \frac{}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{1}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₂ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₃ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
n | 0 | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|---|
x₁ | 0 | \( \displaystyle \frac{}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{1}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₂ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₃ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
n | 0 | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|---|
x₁ | 0 | \( \displaystyle \frac{}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{1}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₂ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₃ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
n | 0 | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|---|
x₁ | 0 | \( \displaystyle \frac{}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{1}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₂ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
x₃ | 0 | \( \displaystyle -\frac{1}{} \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) | \( \displaystyle \frac{}{} \approx \) |
- Anton, Howard (2005), Elementary Linear Algebra (Applications Version) (9th ed.), Wiley International
- Beezer, R., A First Course in Linear Algebra, 2015.
- Beezer, R., A Second Course in Linear Algebra, 2013.