These are the human proofs of Cholesky decomposition, at full length.
Cholesky's algorithm finds the factor exactly when A is positive definite, and is backward stable full
This proof shows: correctness, termination.
Notation: A is a real symmetric n×n matrix, Aj is its leading j×j block, Rj is the leading j×j block of the computed R, u is the unit roundoff and γm=mu/(1−mu). The algorithm stops: line L1 runs n times and each inner loop has a fixed length.
Exact arithmetic
Invariant I(j). After the pass of line L1 for j: for all 1≤k≤j and k≤i≤n,
aki=l=1∑krlkrli,rkk>0.
Initialization.I(0) is empty and true.
Maintenance. Assume I(j−1) and that line L3 does not return. Line L2 gives s=ajj−∑k<jrkj2>0, and line L4 gives rjj=s>0, so ajj=∑k≤jrkj2. For i>j, line L6 gives rjjrji=aji−∑k<jrkjrki, so aji=∑k≤jrkjrki. With I(j−1) this is I(j).
At the end.I(n) says (RTR)ki=∑l≤min(k,i)rlkrli=aki for k≤i, since rlk=0 for l>k. Both sides are symmetric, so RTR=A.
Lemma 1. Assume I(j−1). Then the value s of line L2 at step j is s=detAj/det(Rj−1)2 (with detR0=1), and detRj−1>0.
Proof. Let c=(r1j,…,rj−1,j)T. By I(j−1), Aj=(Rj−1TRj−1cTRj−1Rj−1Tcajj). Multiply out to check that
Aj=(Rj−1TcT01)(Rj−10cs),s=ajj−cTc:
the block (2,2) of the product is cTc+s=ajj, and the other blocks are those of Aj. Both factors are triangular, so detAj=det(Rj−1)⋅det(Rj−1)⋅s. Rj−1 is triangular with positive diagonal, so detRj−1>0. □
Theorem 2. (a) If A is positive definite, the algorithm returns R upper triangular with positive diagonal and RTR=A. (b) If it returns NOT-POSITIVE-DEFINITE, then A is not positive definite. (c) The factor is unique, and A=RTR with such an R implies that A is positive definite.
Proof. (a) For z∈Rj, z=0, put z~=(z,0,…,0)∈Rn. Then zTAjz=z~TAz~>0, so Aj is positive definite, its eigenvalues are positive and detAj>0. By Lemma 1 and induction on j, s>0 at each step, so line L3 never returns, and I(n) gives RTR=A.
(b) If line L3 returns at step j, then s≤0, and Lemma 1 gives detAj≤0. By the argument of (a), A is then not positive definite.
(c) Let S be upper triangular with positive diagonal and STS=A. Entry (j,i), i≥j, of STS=A reads aji=∑k≤jskjski. By induction on j, rows 1,…,j−1 of S and R agree; then sjj2=ajj−∑k<jskj2 is the value of line L2, and sjj>0 forces sjj=rjj; the entries sji, i>j, then solve the same equation as line L6. So S=R. Finally, if A=RTR with R nonsingular, then zTAz=∥Rz∥22>0 for z=0. □
Floating point
Assume the standard modelfl(a∘b)=(a∘b)(1+δ), fl(a)=a(1+δ), ∣δ∣≤u, no underflow or overflow, and (3n+1)u<1. We use two facts: a product of m factors (1+δk)±1 is 1+θ with ∣θ∣≤γm (Higham, Lemma 3.1; proved on the back substitution proof page), and γa+γb+γaγb≤γa+b (Higham, Lemma 3.3).
Theorem 3. If the algorithm runs to completion, then R^TR^=A+ΔA with ∣ΔA∣≤γn+1∣R^T∣∣R^∣.
Proof. Fix j. Off the diagonal (i>j): line L6 computes m=j−1 products, m subtractions in order and one division. As in the proof of Theorem 3 for back substitution, unrolling the roundings and dividing by the factors of the subtractions gives
r^jjr^ji(1+θ0)+k<j∑r^kjr^ki(1+θk)=aji,
with ∣θ0∣≤γm+1=γj and ∣θk∣≤γm. So ∣aji−∑k≤jr^kjr^ki∣≤γj∑k≤j∣r^kj∣∣r^ki∣.
On the diagonal: line L2 gives s^(1+θ0′)+∑k<jr^kj2(1+θk′)=ajj with m factors in θ0′ and at most m in each θk′. Line L4 gives r^jj=s^(1+δ), so s^=r^jj2(1+δ)−2. Then the factor of r^jj2 is a product of m+2=j+1 terms, and ∣ajj−∑k≤jr^kj2∣≤γj+1∑k≤jr^kj2.
Set ΔA=R^TR^−A; it is symmetric, its entry (j,i), i≥j, is bounded as above, and γj≤γj+1≤γn+1. □
Theorem 4. The solution computed by CHOLESKY-SOLVE satisfies (A+ΔA′)x^=b with ∣ΔA′∣≤γ3n+1∣R^T∣∣R^∣.
Proof. By the backward error of substitution, the computed y^ and x^ satisfy (R^T+E1)y^=b and (R^+E2)x^=y^ with ∣E1∣≤γn∣R^T∣ and ∣E2∣≤γn∣R^∣. So (R^T+E1)(R^+E2)x^=b, and