LuDecomposition<T>
Models & Types ยท AiDotNet.DecompositionMethods.MatrixDecomposition
Implements LU decomposition for matrices, which factorizes a matrix into a product of lower and upper triangular matrices.
Inheritance: MatrixDecompositionBase<T> โ LuDecomposition<T>
For Beginners
LU decomposition breaks a matrix into two simpler triangular matrices: L (lower triangular, with values only on and below the diagonal) and U (upper triangular, with values only on and above the diagonal). Think of it like factoring a number into simpler parts, but for matrices. This makes solving equations much faster.
How It Works
LU decomposition factors a matrix A into the product of a lower triangular matrix L and an upper triangular matrix U, often with row permutations represented by a permutation matrix P (PA = LU). This decomposition is fundamental in numerical linear algebra and is used for solving linear systems, computing determinants, and matrix inversion.
Real-world applications:
- Solving systems of linear equations efficiently
- Computing matrix determinants
- Finding matrix inverses in numerical algorithms
Constructors
| Constructor | Summary |
|---|---|
LuDecomposition(Matrix<T> matrix, LuAlgorithmType luAlgorithm) |
Initializes a new instance of the LuDecomposition class and performs the decomposition. |
Properties
| Property | Summary |
|---|---|
Matrix<T> L { get; set; } |
Gets the lower triangular matrix from the decomposition. |
Matrix<T> U { get; set; } |
Gets the upper factor from the decomposition, with L U = P A. |
Vector<int> P { get; set; } |
Gets the permutation vector that tracks row exchanges during pivoting. |
Methods
| Method | Summary |
|---|---|
Vector<T> Solve(Vector<T> b) |
Solves the linear system Ax = b using the LU decomposition. |