LdlDecomposition<T>
Models & Types ยท AiDotNet.DecompositionMethods.MatrixDecomposition
Performs LDL decomposition on a symmetric matrix, factoring it into a lower triangular matrix L and a diagonal matrix D such that A = LDL^T.
Inheritance: MatrixDecompositionBase<T> โ LdlDecomposition<T>
For Beginners
LDL decomposition breaks down a symmetric matrix into simpler parts: L (a lower triangular matrix with values only on and below the diagonal) and D (a diagonal matrix with values only on the diagonal). This decomposition is useful for solving linear systems, calculating determinants, and inverting matrices more efficiently than working with the original matrix.
How It Works
LDL decomposition factors a symmetric matrix A into the product A = LDL^T, where L is a lower triangular matrix with ones on the diagonal, and D is a diagonal matrix. This decomposition is particularly useful for symmetric matrices and avoids computing square roots, making it more numerically stable than Cholesky decomposition in some cases.
Real-world applications:
- Solving systems of linear equations in optimization
- Covariance matrix analysis in statistics
- Kalman filtering in signal processing
Constructors
| Constructor | Summary |
|---|---|
LdlDecomposition(Matrix<T> matrix, LdlAlgorithmType algorithm) |
Initializes a new instance of the LDL decomposition for the specified matrix. |
Properties
| Property | Summary |
|---|---|
Matrix<T> L { get; set; } |
The lower triangular matrix L from the decomposition. |
Vector<T> D { get; set; } |
The diagonal matrix D from the decomposition, stored as a vector of the diagonal elements. |
Methods
| Method | Summary |
|---|---|
Matrix<T> Invert() |
Calculates the inverse of the original matrix using the LDL decomposition. |
ValueTuple<Matrix<T>, Vector<T>> GetFactors() |
Returns the L and D factors from the decomposition. |
Vector<T> Solve(Vector<T> b) |
Solves the linear system Ax = b using the LDL decomposition. |