Content deleted Content added
→Background: Fixed link |
Started bolding vectors to be more consistent with other linear algebra pages |
||
Line 9:
{{AfC topic|stem}}
In [[numerical linear algebra]], the '''conjugate gradient squared method (CGS)''' is an [[iterative method|iterative]] algorithm for solving [[systems of linear equations]] of the form <math>
As with other methods for solving matrix-vector equations, the CGS method can be used to solve optimisation problems, such as power-flow analysis.
== Background ==
A system of linear equations <math>
== The Algorithm ==
Line 20:
The algorithm is as follows:<ref>{{cite book|author1=R. Barrett|author2=M. Berry|author3=T. F. Chan|author4=J. Demmel|author5=J. Donato|author6=J. Dongarra|author7=V. Eijkhout|author8=R. Pozo|author9=C. Romine|author10=H. Van der Vorst|title=Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods, 2nd Edition|publisher=SIAM|year=1994|url=https://netlib.org/linalg/html_templates/Templates.html}}</ref>
# Choose an initial guess <math>
# <math>r_0 = b -
# Choose <math>\tilde r_0 = r_0</math>
# For <math>i = 1, 2, 3, \dots</math> do:
Line 37:
## <math>q_i = u_i - \alpha_i\hat v</math>
## Solve <math>M\hat u = u_i + q_i</math>
## <math>
## <math>\hat q = A\hat u</math>
## <math>r_i = r_{i-1} - \alpha_i\hat q</math>
|