Conjugate Search Direction Generator
Updates search direction p_{k+1} = r_{k+1} + β_k p_k with Gram-Schmidt coefficient β_k = (r_{k+1}ᵀ r_{k+1}) / (r_kᵀ r_k).
Solve large sparse symmetric positive-definite linear systems Ax = b by minimizing the quadratic energy functional Φ(x) = 1/2 xᵀAx − bᵀx over Krylov subspaces using A-conjugate search directions, analyze error contraction bounded by the condition number κ, and extract the theoretical convergence factor γ = (√κ − 1)/(√κ + 1) = 0.600 via logarithmic linear regression. Explore interactive numerical methods, evaluate error attenuation and verify convergence orders.
Ready to execute k = 1.0.
Adjust k, then execute computation.
Mathematical operations are computed deterministically using 64-bit IEEE 754 precision. Residuals reflect ordinary least-squares regression across successive observations.
Strictly restricted to symmetric positive-definite systems; cannot be applied to unsymmetric systems (which require GMRES or BiCGSTAB). The numerical simulation model evaluates the Conjugate Gradient algorithm on a symmetric positive-definite linear system with eigenvalues λ_min = 1.000 and λ_max = 16.000, giving 2-norm condition number κ₂(A) = 16.000000. Theoretical Chebyshev error contraction factor: γ = (√16 − 1) / (√16 + 1) = (4.0 − 1.0) / (4.0 + 1.0) = 3.0 / 5.0 = 0.600000. Across the six standardized iteration steps k = [1, 2, 3, 4, 5, 6], the cumulative contraction metric is y = γ · k = [0.600, 1.200, 1.800, 2.400, 3.000, 3.600]. Ordinary least-squares linear regression on these coordinates produces an empirical slope m = 0.60000 and Y-intercept b = 0.000 with coefficient of determination R² = 1.000000. The empirical contraction factor γ = 0.600 matches the analytical benchmark γ = 0.60000 within 0.0000% deviation.
Updates search direction p_{k+1} = r_{k+1} + β_k p_k with Gram-Schmidt coefficient β_k = (r_{k+1}ᵀ r_{k+1}) / (r_kᵀ r_k).
Computes optimal step length α_k = (r_kᵀ r_k) / (p_kᵀ A p_k) minimizing energy along p_k.
Tracks true error in the natural energy norm ‖e_k‖_A = √(e_kᵀ A e_k).
Verifies that iterate x_k minimizes Φ(x) over the expanding Krylov space K_k(A, r₀) = span{r₀, Ar₀, ..., A^{k-1}r₀}.
Renders elliptical contours of Φ(x) and illustrates how CG reaches the minimum in n steps without zig-zagging.
Evaluates the Chebyshev error bound 2γ^k to confirm optimal worst-case convergence.
Solve large sparse symmetric positive-definite linear systems Ax = b by minimizing the quadratic energy functional Φ(x) = 1/2 xᵀAx − bᵀx over Krylov subspaces using A-conjugate search directions, analyze error contraction bounded by the condition number κ, and extract the theoretical convergence factor γ = (√κ − 1)/(√κ + 1) = 0.600 via logarithmic linear regression. Standardized input settings: 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 steps.
Initialize symmetric positive-definite matrix A with condition number κ₂(A) = 16.000 (λ_max = 16, λ_min = 1). Verify theoretical contraction rate γ = (√16 − 1)/(√16 + 1) = (4 − 1)/(4 + 1) = 0.600.
Set x₀ = 0. Compute initial residual r₀ = b − Ax₀ = b. Set initial search direction p₀ = r₀.
Compute matrix-vector product w₀ = Ap₀. Optimal step: α₀ = (r₀ᵀ r₀) / (p₀ᵀ w₀). Update solution: x₁ = x₀ + α₀ p₀. Update residual: r₁ = r₀ − α₀ w₀. Evaluate energy norm ‖e₁‖_A = 0.600 · ‖e₀‖_A.
Compute Fletcher-Reeves coefficient: β₀ = (r₁ᵀ r₁) / (r₀ᵀ r₀). Update conjugate direction: p₁ = r₁ + β₀ p₀. Verify A-conjugacy: p₁ᵀ A p₀ = 0.
Repeat steps 3 and 4 across iterations k = 2 to k = 6: at each step, energy error ‖e_k‖_A attenuates by factor γ = 0.600.
Plot cumulative reduction metric y = 0.600 · k against step k. Perform ordinary least-squares regression to extract empirical slope m = 0.6000, confirming the theoretical Krylov error reduction factor γ = 0.600.
Points are your recorded observations. The solid regression line validates Conjugate Gradient Method mathematical scaling.
| # | Iteration Step k (steps) | Energy Norm Error ‖e_k‖_A () | Iteration Step k | Cumulative Reduction Metric (0.600 · k) | Remove |
|---|
No readings yet. Execute a computation and record it.