Algorithm Search⌘K

Proofs: BiCGSTAB

These are the human proofs of BiCGSTAB, at full length.

Cost per step of BiCGSTAB full

This proof shows: time.worst, space.extra, matvecs.per_step, flops.per_step.

One pass of L3 to L11, with AA stored with zz nonzeros:

  • Products: v=Apv = A p (L4) and t=Ast = A s (L7), each at most 2z2 z flops: 4z4 z, so 2 matvecs.
  • Inner products and squared norms, each 2n−12 n - 1 flops: rTrr^T r (L3 test), r^Tv\hat r^T v (L4), sTss^T s (L6), tTst^T s and tTtt^T t (L8), r^Tr\hat r^T r (L10): six, 12n−612 n - 6.
  • Updates: s=r−αvs = r - \alpha v (2n2n), x←x+αp+ωsx \leftarrow x + \alpha p + \omega s (4n4 n), r=s−ωtr = s - \omega t (2n2 n), p=r+β(p−ωv)p = r + \beta(p - \omega v) (4n4 n): 12n12 n.
  • Scalars: O(1)O(1).

Total 4z+24n+O(1)4 z + 24 n + O(1) flops. Over kk passes plus the initial residual, O(k(z+n))O(k (z + n)) time. Storage: x,r,r^,p,v,s,tx, r, \hat r, p, v, s, t, seven vectors of length nn reused at every pass, so Θ(n)\Theta(n) extra space. ■\blacksquare

The product form of BiCGSTAB and its finite termination full

This proof shows: correctness, termination.

Exact arithmetic. Notation of the page. BiCG with shadow r^0\hat r_0 produces residuals rkB=φk(A)r0r_k^B = \varphi_k(A) r_0 and directions pkB=πk(A)r0p_k^B = \pi_k(A) r_0, with φ0=π0=1\varphi_0 = \pi_0 = 1 and

φk+1(t)=φk(t)−αktπk(t),πk+1(t)=φk+1(t)+βkπk(t),\varphi_{k+1}(t) = \varphi_k(t) - \alpha_k t \pi_k(t), \qquad \pi_{k+1}(t) = \varphi_{k+1}(t) + \beta_k \pi_k(t),

αk=ρkB/σkB\alpha_k = \rho_k^B / \sigma_k^B, βk=ρk+1B/ρkB\beta_k = \rho_{k+1}^B / \rho_k^B, where ρkB=r~kTrkB\rho_k^B = \tilde r_k^T r_k^B and σkB=p~kTApkB\sigma_k^B = \tilde p_k^T A p_k^B, with r~k=φk(AT)r^0\tilde r_k = \varphi_k(A^T) \hat r_0 and p~k=πk(AT)r^0\tilde p_k = \pi_k(A^T) \hat r_0. Let ψ0=1\psi_0 = 1 and ψk+1(t)=(1−ωk+1t)ψk(t)\psi_{k+1}(t) = (1 - \omega_{k+1} t) \psi_k(t). All polynomials in AA commute.

Lemma 1 (invariant). r=b−Axr = b - A x holds after L1 and after each L9.

Proof. If r=b−Axr = b - A x and s=r−αAps = r - \alpha A p, then b−A(x+αp+ωs)=s−ωAs=s−ωtb - A(x + \alpha p + \omega s) = s - \omega A s = s - \omega t, which is the new rr. The same computation with ω=0\omega = 0 covers the return in L6. □\square

Lemma 2 (bilinear identities). Let φk\varphi_k have leading coefficient ckc_k (coefficient of tkt^k), and ψk\psi_k leading coefficient dk=(−1)kω1⋯ωkd_k = (-1)^k \omega_1 \cdots \omega_k. Then

ρkB=ckdk r^0Tψk(A)φk(A)r0,σkB=ckdk r^0TAψk(A)πk(A)r0.\rho_k^B = \frac{c_k}{d_k} \, \hat r_0^T \psi_k(A) \varphi_k(A) r_0, \qquad \sigma_k^B = \frac{c_k}{d_k} \, \hat r_0^T A \psi_k(A) \pi_k(A) r_0.

Proof. ρkB=r^0Tφk(A)φk(A)r0\rho_k^B = \hat r_0^T \varphi_k(A) \varphi_k(A) r_0. By BiCG biorthogonality, φk(A)r0=rkB\varphi_k(A) r_0 = r_k^B is orthogonal to Kk(AT,r^0)\mathcal K_k(A^T, \hat r_0), so in r^0Tq(A)rkB\hat r_0^T q(A) r_k^B only the tkt^k coefficient of qq matters, for any qq of degree ≤k\le k. Applied to q=φkq = \varphi_k and q=ψkq = \psi_k, r^0Tφk(A)rkB=(ck/dk)r^0Tψk(A)rkB\hat r_0^T \varphi_k(A) r_k^B = (c_k / d_k) \hat r_0^T \psi_k(A) r_k^B. For σB\sigma^B: p~kTApkB=r^0Tπk(A)Aπk(A)r0\tilde p_k^T A p_k^B = \hat r_0^T \pi_k(A) A \pi_k(A) r_0, and ApkBA p_k^B is AA-biconjugate: r^0Tq(A)Aπk(A)r0=0\hat r_0^T q(A) A \pi_k(A) r_0 = 0 for deg⁡q<k\deg q < k (since p~jTApkB=0\tilde p_j^T A p_k^B = 0 for j<kj < k and the p~j\tilde p_j span Kk(AT,r^0)\mathcal K_k(A^T, \hat r_0)). The leading coefficient of πk\pi_k equals ckc_k (because πk=φk+βk−1πk−1\pi_k = \varphi_k + \beta_{k-1}\pi_{k-1} with deg⁡πk−1<k\deg \pi_{k-1} < k), so the same argument applies with πk\pi_k replaced by ψk\psi_k. □\square

Theorem 1 (product form). If no breakdown occurs before step kk, then at the start of pass kk of L3 the vectors are r=ψk(A)φk(A)r0r = \psi_k(A) \varphi_k(A) r_0, p=ψk(A)πk(A)r0p = \psi_k(A) \pi_k(A) r_0, ρ=r^0Tr\rho = \hat r_0^T r, and the α\alpha computed in L4 equals the BiCG value αk\alpha_k; in L5, s=ψk(A)φk+1(A)r0s = \psi_k(A) \varphi_{k+1}(A) r_0; and β\beta in L10 equals βk\beta_k.

Proof. Induction on kk. At k=0k = 0: r=p=r0r = p = r_0, ψ0=φ0=π0=1\psi_0 = \varphi_0 = \pi_0 = 1. Assume the claim at the start of pass kk. In L4, σ=r^0TAψk(A)πk(A)r0\sigma = \hat r_0^T A \psi_k(A) \pi_k(A) r_0, so by Lemma 2, ρ/σ=ρkB/σkB=αk\rho / \sigma = \rho_k^B / \sigma_k^B = \alpha_k (the factors ck/dkc_k/d_k cancel). Then s=ψk(A)(φk(A)−αkAπk(A))r0=ψk(A)φk+1(A)r0s = \psi_k(A) (\varphi_k(A) - \alpha_k A \pi_k(A)) r_0 = \psi_k(A) \varphi_{k+1}(A) r_0. In L9, r=(I−ωk+1A)s=ψk+1(A)φk+1(A)r0r = (I - \omega_{k+1} A) s = \psi_{k+1}(A) \varphi_{k+1}(A) r_0. In L10, ρnew=r^0Tψk+1(A)φk+1(A)r0=(dk+1/ck+1)ρk+1B\rho_{\text{new}} = \hat r_0^T \psi_{k+1}(A) \varphi_{k+1}(A) r_0 = (d_{k+1}/c_{k+1}) \rho_{k+1}^B and ρ=(dk/ck)ρkB\rho = (d_k / c_k) \rho_k^B, and ck+1=−αkckc_{k+1} = -\alpha_k c_k (leading coefficient of φk+1\varphi_{k+1}) and dk+1=−ωk+1dkd_{k+1} = -\omega_{k+1} d_k. Hence

ρnewρ⋅αkωk+1=ρk+1BρkB⋅dk+1ckdkck+1⋅αkωk+1=βk⋅ωk+1αk⋅αkωk+1=βk.\frac{\rho_{\text{new}}}{\rho} \cdot \frac{\alpha_k}{\omega_{k+1}} = \frac{\rho_{k+1}^B}{\rho_k^B} \cdot \frac{d_{k+1} c_k}{d_k c_{k+1}} \cdot \frac{\alpha_k}{\omega_{k+1}} = \beta_k \cdot \frac{\omega_{k+1}}{\alpha_k} \cdot \frac{\alpha_k}{\omega_{k+1}} = \beta_k.

Finally, in L11, p=r+βk(p−ωk+1v)=ψk+1(A)φk+1(A)r0+βk(I−ωk+1A)ψk(A)πk(A)r0=ψk+1(A)(φk+1(A)+βkπk(A))r0=ψk+1(A)πk+1(A)r0p = r + \beta_k (p - \omega_{k+1} v) = \psi_{k+1}(A) \varphi_{k+1}(A) r_0 + \beta_k (I - \omega_{k+1} A) \psi_k(A) \pi_k(A) r_0 = \psi_{k+1}(A) (\varphi_{k+1}(A) + \beta_k \pi_k(A)) r_0 = \psi_{k+1}(A) \pi_{k+1}(A) r_0. □\square

Lemma 3 (local optimality). ω=tTs/tTt\omega = t^T s / t^T t minimizes f(ω)=∥s−ωt∥22f(\omega) = \|s - \omega t\|_2^2, and ∥rk+1∥22=∥s∥22−(tTs)2/tTt≤∥s∥22\|r_{k+1}\|_2^2 = \|s\|_2^2 - (t^T s)^2 / t^T t \le \|s\|_2^2.

Proof. ff is a quadratic in ω\omega with f′(ω)=2(ωtTt−tTs)f'(\omega) = 2(\omega t^T t - t^T s), zero at the stated ω\omega (t≠0t \ne 0 since s≠0s \ne 0 and AA is nonsingular); substitute. □\square

Theorem 2 (termination). If no breakdown occurs, BiCGSTAB returns CONVERGED with Ax=bA x = b after at most nn passes when tol=0\mathrm{tol} = 0; in every case the code returns after at most kmax+1\mathrm{kmax} + 1 passes.

Proof. BiCG without breakdown reaches φd(A)r0=0\varphi_d(A) r_0 = 0 for some d≤nd \le n (finite termination of BiCG). The BiCG scalars used by BiCGSTAB up to step dd are the same (Theorem 1), so at pass d−1d - 1, s=ψd−1(A)φd(A)r0=0s = \psi_{d-1}(A) \varphi_d(A) r_0 = 0, the test in L6 succeeds, and xx is updated so that b−Ax=s=0b - A x = s = 0 (Lemma 1). If the residual vanishes earlier, the L3 test returns earlier. Each pass either returns or completes, and the loop has kmax+1\mathrm{kmax} + 1 passes. ■\blacksquare

Back to BiCGSTAB