Overview
The Cholesky Decomposition takes a symetric matrix and decomposes it into two triangular matrices, such that one is the transpose of the other and the original matrix is the result of the two matrices multiplied.Example
The following shows what the Cholesky decomposition looks like for a 3x3 matrix.
{%
\begin{bmatrix}
x_{1,1} & x_{1,2} & x_{1,3} \\
x_{2,1} & x_{2,2} & x_{3,3} \\
x_{3,1} & x_{3,2} & x_{3,3} \\
\end{bmatrix} =
\begin{bmatrix}
y_{1,1} & 0 & 0 \\
y_{2,1} & y_{2,2} & 0 \\
y_{3,1} & y_{3,2} & y_{3,3} \\
\end{bmatrix}
\times
\begin{bmatrix}
y_{1,1} & y_{2,1} & y_{3,1} \\
0 & y_{2,2} & y_{3,2} \\
0 & 0 & y_{3,3} \\
\end{bmatrix}
%}
Implementation
The cholesky deomposion is implemented in the linear algebra module.
let la = await import('/code/linear-algebra/v1.0.0/linear-algebra.mjs');
let matrix = [[1,0.5],[0.5,1]]
let L = la.cholesky(matrix);