The Cholesky decomposition (also Cholesky factorization ) (after André-Louis Cholesky , 1875-1918) describes in numerical mathematics a decomposition of a symmetrical positive definite matrix into a product of a lower triangular matrix and its transpose . It was developed by Cholesky before 1914 as part of the triangulation of Crete by the Service géographique de l'armée . The concept can also be defined more generally for Hermitian matrices .
Areas of application
When using the least squares method , one possibility is to solve the minimization problems that arise via the normal equations, which have a symmetrical positive definite system matrix. This is possible with the help of the Cholesky decomposition and this was the motivation for Cholesky to develop the decomposition. With the Gauss-Newton method , a system of equations has to be solved for each iteration step, which can be determined with the Cholesky method.
The Cholesky decomposition can also be used to obtain a preconditioning method for linear systems of equations with a positive definite matrix; for this purpose there are especially the variants of the incomplete Cholesky decomposition and the modified incomplete Cholesky decomposition .
At the same time, the decomposition represents a test whether a given symmetrical matrix is positive definite. Otherwise one of the entries on the main diagonal is negative, so that the root cannot be drawn, or equal , so that the entry cannot be divided. The algorithm stops in both cases. The Cholesky decomposition can also be used to determine the determinant of the matrix because it holds .
Outside of mathematics, the Cholesky decomposition is also used in econometric research into macroeconomic relationships. In so-called vector autoregressive models (VAR), the sequence in which the endogenous variables are influenced is determined.
In addition, it is also used in the Monte Carlo simulation in order to bring predefined correlations into independently generated random number sequences (as a discretization of stochastic processes).
Formulation and application
the Cholesky decomposition - equivalent - is also formulated as
If the Cholesky decomposition has been calculated, the system of equations can be solved efficiently by inserting it forwards and backwards :
- By substituting forwards: Solving the linear system of equations
- By then inserting it backwards: Solving the linear equation system
If one sets , one obtains for the elements of :
This relationship leads directly to the following formulas for :
With this algorithm it is important to carry out the order of the calculated matrix entries correctly. The entries are calculated column by column and starting with the lowest row index.
The decomposition is calculated in the same way for and :
With these algorithms, too, it is important to choose the correct order of the calculated matrix entries. First you have to calculate the entry for the index and then the -th column of the matrix , i.e.: for .
Effort and stability
The Cholesky decomposition is numerically stable . In comparison, the elimination method according to Gauss with its algorithmic implementation, the LR decomposition , requires about twice as many operations, since not only one matrix , but two factors and have to be calculated. The Cholesky decomposition involves arithmetic operations, including multiplications, divisions and root operations.
The calculations in the above formulas can be performed in a number of ways. The variant named after Tadeusz Banachiewicz calculates the lower triangular matrix line by line. In pseudocode , the procedure for breaking down the matrix into the form looks like this :
For i = 1 To n For j = 1 To i Summe = a(i, j) For k = 1 To j-1 Summe = Summe - a(i, k) * a(j, k) If i > j Then a(i, j) = Summe / a(j, j) // Untere Dreiecksmatrix Else If Summe > 0 Then // Diagonalelement a(i, i) = Sqrt(Summe) // ... ist immer groesser Null Else ERROR // Die Matrix ist (wenigstens numerisch) nicht symmetrisch positiv definit
The running indices in the code correspond to the mathematical notation of elements of the matrix . Here, the number of rows and at the same time the number of columns of the matrix , are auxiliary variables and sum . The algorithm works in-place ; that is, it modifies the matrix to include the lower triangular matrix . There is therefore no need to allocate new storage space.
The algorithm only processes the lower left triangular matrix of , the elements for do not need to be assigned values (since the matrix is symmetrical according to the assumption), and if they contain values, these are not changed. If one searches for the Cholesky decomposition according to , then the matrix elements from above the diagonal ( ) are to be set equal to 0.
- taramath online tool for calculating the Cholesky decomposition of symmetrical and positive definite matrices.
- Hans Rudolf Schwarz, Norbert Köckler: Numerical Mathematics. 5th edition. Teubner, Stuttgart 2004, ISBN 3-519-42960-8 .
- Gene H. Golub, Charles F. Van Loan: Matrix computations. 3rd edition. Johns Hopkins University Press, 1996, ISBN 0-8018-5414-8 .
- Michael Saunders: Commentary - Major Cholesky Would Feel Proud. In: ORSA Journal on Computing , 6, 1994, pp. 23-27.
- Andreas Meister: Numerics of linear systems of equations. 5th edition. Vieweg, Wiesbaden 2015, ISBN 3-528-13135-7 , p. 49.