logo

Cholesky Decomposition for Least Squares Method 📂Matrix Algebra

Cholesky Decomposition for Least Squares Method

Algorithm

Given ACm×nA \in \mathbb{C}^{m \times n} and vector bCm\mathbf{b} \in \mathbb{C}^{m} such that rankA=n\text{rank} A = n and the least-squares solution of Ax=bA \mathbf{x} = \mathbf{b} is denoted as x\mathbf{x}_{\ast}.

Step 1.

Multiply both sides of the given equation by AA^{\ast} to form the normal equation AAx=AbA^{\ast} A \mathbf{x} = A^{\ast} \mathbf{b}.

The solution of the normal equation is the least-squares solution of the original equation, hence, solving for x\mathbf{x} fulfills our requirement.


Step 2.

Calculate y:=Ab\mathbf{y} := A^{\ast} \mathbf{b} to obtain AAx=yA^{\ast} A \mathbf{x} = \mathbf{y}.


Step 3. Cholesky Decomposition

Find a lower triangular matrix LL that satisfies AA=LLA^{\ast} A = L L^{\ast} to derive LLx=yL L^{\ast} \mathbf{x} = \mathbf{y}.


Step 4. Forward Substitution

Given LLx=yL L^{\ast} \mathbf{x} = \mathbf{y}, assume Lx:=wL^{\ast} \mathbf{x} : = \mathbf{w} then Lw=yL \mathbf{w} = \mathbf{y}

Since LL is a lower triangular matrix, the solution of the equation for w\mathbf{w} is found using the forward substitution method.


Step 5. Backward Substitution

Having found w\mathbf{w} and with LL^{\ast} being an upper triangular matrix, the solution of the equation Lx=wL^{\ast} \mathbf{x} = \mathbf{w} for x\mathbf{x} is found using the backward substitution method.

Explanation

The Cholesky decomposition originally had a strong precondition that the matrix to be decomposed must be a positive definite matrix. The key in this method lies in the trick of constructing the normal equation, which forcibly satisfies that stringent condition. Of course, this trick requires a guarantee that AAA^{\ast} A is positive definite, and proving this is not too difficult.

Theorem

For the matrix ACm×n(mn)A \in \mathbb{C}^{m \times n} (m \ge n), AA>0    rankA=nA^{\ast} A > 0 \iff \text{rank} A = n

Proof

For any vector v0\mathbf{v} \ne \mathbb{0},

vAAv=(Av)Av=Av20 \mathbf{v}^{\ast} A^{\ast} A \mathbf{v} = (A \mathbf{v})^{\ast} A \mathbf{v} = | A \mathbf{v} |^{2} \ge 0

thus, AA0A^{\ast} A \ge 0. Assuming that the inverse of AAA^{\ast} A does not exist implies the existence of v0\mathbf{v} \ne \mathbb{0} satisfying AAv=0A^{\ast} A \mathbf{v} = \mathbb{0}. Multiplying both sides of the equation by v\mathbf{v}^{\ast} on the left yields Av2=0| A \mathbf{v} |^2 = 0, and from the definition of norm, Av=0A \mathbf{v} = 0. This means that the column vectors of AA are linearly dependent, thus rankA<n\text{rank} A < n.

Conversely, assuming rankA<n\text{rank} A < n implies the existence of v0\mathbf{v} \ne \mathbb{0} satisfying Av=0A \mathbf{v} = \mathbb{0}.

Multiplying both sides of the equation by AA^{\ast} on the left yields AAv=0A^{\ast} A \mathbf{v} = \mathbb{0}, and AAA^{\ast} A does not have an inverse. Since AA0A^{\ast}A \ge 0,

AA0    rankA=n A^{\ast} A \ne 0 \iff \text{rank} A = n

therefore,

AA>0    rankA=n A^{\ast} A > 0 \iff \text{rank} A = n