Loading
The conjugate gradient method solves for a symmetric positive definite by moving along directions that are conjugate (). Each step minimises the error in a new direction, so it finishes in at most steps.
. Solve by conjugate gradients from .
| 0 | (0, 0) | 2.23607 | |
| 1 | (0.25, 0.5) | 0.559017 | 0.25 |
| 2 | (1/11, 7/11) | 0 | 0.363636 |
Check: ✓
Using a non-symmetric A.
β from the old residual only.
Setting the new direction to r only.
A must be symmetric and positive definite.
Add this calculator to a new note, next to your own working. It stays live: change the numbers there any time.