# Successive over-relaxation

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. A similar method can be used for any slowly converging iterative process.

It was devised simultaneously by David M. Young, Jr. and by Stanley P. Frankel in 1950 for the purpose of automatically solving linear systems on digital computers. Over-relaxation methods had been used before the work of Young and Frankel. An example is the method of Lewis Fry Richardson, and the methods developed by R. V. Southwell. However, these methods were designed for computation by human calculators, and they required some expertise to ensure convergence to the solution which made them inapplicable for programming on digital computers. These aspects are discussed in the thesis of David M. Young, Jr.[1]

## Formulation

Given a square system of n linear equations with unknown x:

${\displaystyle A\mathbf {x} =\mathbf {b} }$

where:

${\displaystyle A={\begin{bmatrix}a_{11}&a_{12}&\cdots &a_{1n}\\a_{21}&a_{22}&\cdots &a_{2n}\\\vdots &\vdots &\ddots &\vdots \\a_{n1}&a_{n2}&\cdots &a_{nn}\end{bmatrix}},\qquad \mathbf {x} ={\begin{bmatrix}x_{1}\\x_{2}\\\vdots \\x_{n}\end{bmatrix}},\qquad \mathbf {b} ={\begin{bmatrix}b_{1}\\b_{2}\\\vdots \\b_{n}\end{bmatrix}}.}$

Then A can be decomposed into a diagonal component D, and strictly lower and upper triangular components L and U:

${\displaystyle A=D+L+U,}$

where

${\displaystyle D={\begin{bmatrix}a_{11}&0&\cdots &0\\0&a_{22}&\cdots &0\\\vdots &\vdots &\ddots &\vdots \\0&0&\cdots &a_{nn}\end{bmatrix}},\quad L={\begin{bmatrix}0&0&\cdots &0\\a_{21}&0&\cdots &0\\\vdots &\vdots &\ddots &\vdots \\a_{n1}&a_{n2}&\cdots &0\end{bmatrix}},\quad U={\begin{bmatrix}0&a_{12}&\cdots &a_{1n}\\0&0&\cdots &a_{2n}\\\vdots &\vdots &\ddots &\vdots \\0&0&\cdots &0\end{bmatrix}}.}$

The system of linear equations may be rewritten as:

${\displaystyle (D+\omega L)\mathbf {x} =\omega \mathbf {b} -[\omega U+(\omega -1)D]\mathbf {x} }$

for a constant ω > 1, called the relaxation factor.

The method of successive over-relaxation is an iterative technique that solves the left hand side of this expression for x, using previous value for x on the right hand side. Analytically, this may be written as:

${\displaystyle \mathbf {x} ^{(k+1)}=(D+\omega L)^{-1}{\big (}\omega \mathbf {b} -[\omega U+(\omega -1)D]\mathbf {x} ^{(k)}{\big )}=L_{w}\mathbf {x} ^{(k)}+\mathbf {c} ,}$

where ${\displaystyle \mathbf {x} ^{(k)}}$ is the kth approximation or iteration of ${\displaystyle \mathbf {x} }$ and ${\displaystyle \mathbf {x} ^{(k+1)}}$ is the next or k + 1 iteration of ${\displaystyle \mathbf {x} }$. However, by taking advantage of the triangular form of (D+ωL), the elements of x(k+1) can be computed sequentially using forward substitution:

${\displaystyle x_{i}^{(k+1)}=(1-\omega )x_{i}^{(k)}+{\frac {\omega }{a_{ii}}}\left(b_{i}-\sum _{ji}a_{ij}x_{j}^{(k)}\right),\quad i=1,2,\ldots ,n.}$

The choice of relaxation factor ω is not necessarily easy, and depends upon the properties of the coefficient matrix. In 1947, Ostrowski proved that if ${\displaystyle A}$ is symmetric and positive-definite then ${\displaystyle \rho (L_{\omega })<1}$ for ${\displaystyle 0<\omega <2}$. Thus convergence of the iteration process follows, but we are generally interested in faster convergence rather than just convergence.

## Algorithm

Since elements can be overwritten as they are computed in this algorithm, only one storage vector is needed, and vector indexing is omitted. The algorithm goes as follows:

Inputs: A, b, ω
Output: ${\displaystyle \phi }$

Choose an initial guess ${\displaystyle \phi }$ to the solution
repeat until convergence
for i from 1 until n do
${\displaystyle \sigma \leftarrow 0}$
for j from 1 until n do
if j ≠ i then
${\displaystyle \sigma \leftarrow \sigma +a_{ij}\phi _{j}}$
end if
end (j-loop)
${\displaystyle \phi _{i}\leftarrow (1-\omega )\phi _{i}+{\frac {\omega }{a_{ii}}}(b_{i}-\sigma )}$
end (i-loop)
check if convergence is reached
end (repeat)

Note
${\displaystyle (1-\omega )\phi _{i}+{\frac {\omega }{a_{ii}}}(b_{i}-\sigma )}$ can also be written ${\displaystyle \phi _{i}+\omega \left({\frac {b_{i}-\sigma }{a_{ii}}}-\phi _{i}\right)}$, thus saving one multiplication in each iteration of the outer for-loop.

## Symmetric successive over-relaxation

The version for symmetric matrices A, in which

${\displaystyle U=L^{T},\,}$

is referred to as Symmetric Successive Over-Relaxation, or (SSOR), in which

${\displaystyle P=\left({\frac {D}{\omega }}+L\right){\frac {1}{2-\omega }}D^{-1}\left({\frac {D}{\omega }}+U\right)^{T},}$

and the iterative method is

${\displaystyle \mathbf {x} ^{k+1}=\mathbf {x} ^{k}-\gamma ^{k}P^{-1}(A\mathbf {x} ^{k}-\mathbf {b} ),\ k\geq 0.}$

The SOR and SSOR methods are credited to David M. Young, Jr..

## Other applications of the method

A similar technique can be used for any iterative method. If the original iteration had the form

${\displaystyle x_{n+1}=f(x_{n})}$

then the modified version would use

${\displaystyle x_{n+1}^{\mathrm {SOR} }=(1-\omega )x_{n}^{\mathrm {SOR} }+\omega f(x_{n}^{\mathrm {SOR} }).}$

Note however that the formulation presented above, used for solving systems of linear equations, is not a special case of this formulation if x is considered to be the complete vector. If this formulation is used instead, the equation for calculating the next vector will look like

${\displaystyle \mathbf {x} ^{(k+1)}=(1-\omega )\mathbf {x} ^{(k)}+\omega L_{*}^{-1}(\mathbf {b} -U\mathbf {x} ^{(k)}),}$

where ${\displaystyle L_{*}=L+D}$. Values of ${\displaystyle \omega >1}$ are used to speed up convergence of a slow-converging process, while values of ${\displaystyle \omega <1}$ are often used to help establish convergence of a diverging iterative process or speed up the convergence of an overshooting process.

There are various methods that adaptively set the relaxation parameter ${\displaystyle \omega }$ based on the observed behavior of the converging process. Usually they help to reach a super-linear convergence for some problems but fail for the others.