Euler Hall — free maths guides

Recognize A = R transpose R with positive diagonal entries in R

Read the diagonal of R as the square roots of the pivots. The idea in plain words, a worked example, and a check with the answers shown — part of the free Linear Algebra guides.

Cholesky is elimination with the pivots moved onto a diagonal

For a symmetric positive definiteSS there is an upper triangularRR with positive diagonal entries such that

S=RTR.S=R^{T}R.

This is the Cholesky factorisation. Two facts make it usable:

-RR's diagonal holds the square roots of the pivots:rkk=dkr_{kk}=\sqrt{d_k}. -RR exists with real entries exactly whenSS is positive definite, becausedk\sqrt{d_k} is real exactly whendk>0d_k>0.

So "has a real Cholesky factor" and "is positive definite" are the same statement. That is the whole content of Test 3 in the source:S=ATAS=A^{T}A with independent columns.

Two conventions, one matrix. A library may returnLL lower triangular withS=LLTS=LL^{T}, orRR upper triangular withS=RTRS=R^{T}R. They are transposes of each other. The exam asks for one of them; read which.

Why the factor exists exactly when every pivot is positive

Elimination givesS=LDLTS=LDL^{T} withLL unit lower triangular andDD holding the pivots. Split the diagonal ofDD into two square roots:

D=D1/2D1/2,D1/2=diag⁡(d1,…,dn).D=D^{1/2}D^{1/2},\qquad D^{1/2}=\operatorname{diag}(\sqrt{d_1},\dots,\sqrt{d_n}).

Then

S=LDLT=(D1/2LT)T(D1/2LT)=RTR,R=D1/2LT.S=LDL^{T}=(D^{1/2}L^{T})^{T}(D^{1/2}L^{T})=R^{T}R,\qquad R=D^{1/2}L^{T}.

RR is upper triangular becauseLTL^{T} is, and its diagonal is the square roots of the pivots.

Now the equivalence is immediate. If somedk<0d_k<0 thendk\sqrt{d_k} is not real, so no realRR exists. Conversely positive definiteness forces every pivot positive, so every root is real andRR exists.

Why symmetry alone is not enough.[1331]\begin{bmatrix}1&3\\3&1\end{bmatrix} is perfectly symmetric, and its second pivot is−8-8:−8\sqrt{-8} is not real. Symmetry gets youLDLTLDL^{T}; only positivity of the pivots gets youRTRR^{T}R over the reals. Over the complex numbers a factor always exists — that is a different statement and not the one the exam asks.

Where the factor comes from in practice. You do not need to remember a formula. Run elimination to get the pivots, take their square roots for the diagonal, and fill in the off-diagonal entries by matchingSS entry by entry from the top down.

Worked example, both directions

GivenSS, findRR.S=[42210]S=\begin{bmatrix}4&2\\2&10\end{bmatrix}.

  • -r11=4=2r_{11}=\sqrt4=2.
  • -r11r12=2r_{11}r_{12}=2 →r12=1r_{12}=1.
  • -r122+r222=10r_{12}^{2}+r_{22}^{2}=10 →1+r222=101+r_{22}^{2}=10 →r22=3r_{22}=3.

SoR=[2103]R=\begin{bmatrix}2&1\\0&3\end{bmatrix}. Check:RTR=[4221+9]=[42210]R^{T}R=\begin{bmatrix}4&2\\2&1+9\end{bmatrix}=\begin{bmatrix}4&2\\2&10\end{bmatrix} ✔. Pivots:44 anddet⁡S/4=(40−4)/4=9\det S/4=(40-4)/4=9, andr22=9=3r_{22}=\sqrt9=3 ✔.

GivenRR, findSS and test definiteness.R=[1201]R=\begin{bmatrix}1&2\\0&1\end{bmatrix} givesS=[1225]S=\begin{bmatrix}1&2\\2&5\end{bmatrix}. The pivots are11 and5−4=15-4=1, both positive, consistent withRR having real positive diagonal entries. In fact anyRR with real entries gives a positive semidefiniteS=RTRS=R^{T}R:xTRTRx=∥Rx∥2≥0x^{T}R^{T}Rx=\|Rx\|^{2}\ge0. Definiteness additionally needsRR invertible.

By the end you can
  • Read the diagonal of R as the square roots of the pivots
  • Find the off-diagonal entries of R by matching S entry by entry
  • Decide whether a real Cholesky factor exists from the pivot signs
  • Tell the L L transpose convention from the R transpose R convention
Test yourself
  1. 1. FindRR forS=[96613]S=\begin{bmatrix}9&6\\6&13\end{bmatrix}.
  2. 2.S=[1223]S=\begin{bmatrix}1&2\\2&3\end{bmatrix} — does a real Cholesky factor exist?
  3. 3. IfR=[2003]R=\begin{bmatrix}2&0\\0&3\end{bmatrix}, what isSS, and what are its pivots?
Answers

1.r11=3r_{11}=3,3r12=63r_{12}=6 sor12=2r_{12}=2, andr222=13−4=9r_{22}^{2}=13-4=9 sor22=3r_{22}=3.R=[3203]R=\begin{bmatrix}3&2\\0&3\end{bmatrix}. 2. Pivots11 and3−4=−13-4=-1: the second is negative, so no real factor exists. Eigenvalues are2±52\pm\sqrt5, one negative. 3.S=[4009]S=\begin{bmatrix}4&0\\0&9\end{bmatrix}, pivots44 and99, roots22 and33 — the diagonal ofRR. ✔

Work out where to start — free, no accountAnswer six real questions — free, no account