fbpx
Wikipedia

LU decomposition

In numerical analysis and linear algebra, lower–upper (LU) decomposition or factorization factors a matrix as the product of a lower triangular matrix and an upper triangular matrix (see matrix decomposition). The product sometimes includes a permutation matrix as well. LU decomposition can be viewed as the matrix form of Gaussian elimination. Computers usually solve square systems of linear equations using LU decomposition, and it is also a key step when inverting a matrix or computing the determinant of a matrix. The LU decomposition was introduced by the Polish mathematician Tadeusz Banachiewicz in 1938.[1] It's also referred to as LR decomposition (factors into left and right triangular matrices).

Definitions

 
LDU decomposition of a Walsh matrix

Let A be a square matrix. An LU factorization refers to the factorization of A, with proper row and/or column orderings or permutations, into two factors – a lower triangular matrix L and an upper triangular matrix U:

 

In the lower triangular matrix all elements above the diagonal are zero, in the upper triangular matrix, all the elements below the diagonal are zero. For example, for a 3 × 3 matrix A, its LU decomposition looks like this:

 

Without a proper ordering or permutations in the matrix, the factorization may fail to materialize. For example, it is easy to verify (by expanding the matrix multiplication) that  . If  , then at least one of   and   has to be zero, which implies that either L or U is singular. This is impossible if A is nonsingular (invertible). This is a procedural problem. It can be removed by simply reordering the rows of A so that the first element of the permuted matrix is nonzero. The same problem in subsequent factorization steps can be removed the same way; see the basic procedure below.

LU factorization with partial pivoting

It turns out that a proper permutation in rows (or columns) is sufficient for LU factorization. LU factorization with partial pivoting (LUP) refers often to LU factorization with row permutations only:

 

where L and U are again lower and upper triangular matrices, and P is a permutation matrix, which, when left-multiplied to A, reorders the rows of A. It turns out that all square matrices can be factorized in this form,[2] and the factorization is numerically stable in practice.[3] This makes LUP decomposition a useful technique in practice.

LU factorization with full pivoting

An LU factorization with full pivoting involves both row and column permutations:

 

where L, U and P are defined as before, and Q is a permutation matrix that reorders the columns of A.[4]

Lower-diagonal-upper (LDU) decomposition

A Lower-diagonal-upper (LDU) decomposition is a decomposition of the form

 

where D is a diagonal matrix, and L and U are unitriangular matrices, meaning that all the entries on the diagonals of L and U are one.

Rectangular matrices

Above we required that A be a square matrix, but these decompositions can all be generalized to rectangular matrices as well.[5] In that case, L and D are square matrices both of which have the same number of rows as A, and U has exactly the same dimensions as A. Upper triangular should be interpreted as having only zero entries below the main diagonal, which starts at the upper left corner. Similarly, the more precise term for U is that it is the "row echelon form" of the matrix A.

Example

We factorize the following 2-by-2 matrix:

 

One way to find the LU decomposition of this simple matrix would be to simply solve the linear equations by inspection. Expanding the matrix multiplication gives

 

This system of equations is underdetermined. In this case any two non-zero elements of L and U matrices are parameters of the solution and can be set arbitrarily to any non-zero value. Therefore, to find the unique LU decomposition, it is necessary to put some restriction on L and U matrices. For example, we can conveniently require the lower triangular matrix L to be a unit triangular matrix (i.e. set all the entries of its main diagonal to ones). Then the system of equations has the following solution:

 

Substituting these values into the LU decomposition above yields

 

Existence and uniqueness

Square matrices

Any square matrix   admits LUP and PLU factorizations.[2] If   is invertible, then it admits an LU (or LDU) factorization if and only if all its leading principal minors[6] are nonzero[7] (for example   does not admit an LU or LDU factorization). If   is a singular matrix of rank  , then it admits an LU factorization if the first   leading principal minors are nonzero, although the converse is not true.[8]

If a square, invertible matrix has an LDU (factorization with all diagonal entries of L and U equal to 1), then the factorization is unique.[7] In that case, the LU factorization is also unique if we require that the diagonal of   (or  ) consists of ones.

In general, any square matrix   could have one of the following:

  1. a unique LU factorization (as mentioned above)
  2. infinitely many LU factorizations if two or more of any first (n−1) columns are linearly dependent or any of the first (n−1) columns are 0, then A has infinitely many LU factorizations.
  3. no LU factorization if the first (n−1) columns are non-zero and linearly independent and at least one leading principal minor is zero.

In Case 3, one can approximate an LU factorization by changing a diagonal entry   to   to avoid a zero leading principal minor.[9]

Symmetric positive-definite matrices

If A is a symmetric (or Hermitian, if A is complex) positive-definite matrix, we can arrange matters so that U is the conjugate transpose of L. That is, we can write A as

 

This decomposition is called the Cholesky decomposition. The Cholesky decomposition always exists and is unique — provided the matrix is positive definite. Furthermore, computing the Cholesky decomposition is more efficient and numerically more stable than computing some other LU decompositions.

General matrices

For a (not necessarily invertible) matrix over any field, the exact necessary and sufficient conditions under which it has an LU factorization are known. The conditions are expressed in terms of the ranks of certain submatrices. The Gaussian elimination algorithm for obtaining LU decomposition has also been extended to this most general case.[10]

Algorithms

Closed formula

When an LDU factorization exists and is unique, there is a closed (explicit) formula for the elements of L, D, and U in terms of ratios of determinants of certain submatrices of the original matrix A.[11] In particular,  , and for  ,   is the ratio of the  -th principal submatrix to the  -th principal submatrix. Computation of the determinants is computationally expensive, so this explicit formula is not used in practice.

Using Gaussian elimination

The following algorithm is essentially a modified form of Gaussian elimination. Computing an LU decomposition using this algorithm requires   floating-point operations, ignoring lower-order terms. Partial pivoting adds only a quadratic term; this is not the case for full pivoting.[12]

Procedure

Given an N × N matrix  , define   as the matrix   in which the necessary rows have been swapped to meet the desired conditions (such as partial pivoting) for the 1st column. The parenthetical superscript (e.g.,  ) of the matrix   is the version of the matrix. The matrix   is the   matrix in which the elements below the main diagonal have already been eliminated to 0 through Gaussian elimination for the first   columns, and the necessary rows have been swapped to meet the desired conditions for the   column.

We perform the operation   for each row   with elements (labelled as   where  ) below the main diagonal in the n-th column of  . For this operation,

 

We perform these row operations to eliminate the elements   to zero. Once we have subtracted these rows, we may swap rows to provide the desired conditions for the   column. We may swap rows here to perform partial pivoting, or because the element   on the main diagonal is zero (and therefore cannot be used to implement Gaussian elimination).

We define the final permutation matrix   as the identity matrix which has all the same rows swapped in the same order as the   matrix.

Once we have performed the row operations for the first   columns, we have obtained an upper triangular matrix   which is denoted by  . Note, we can denote   as   because the N-th column of   has no conditions for which rows need to be swapped. We can also calculate the lower triangular matrix denoted denoted as  , such that  , by directly inputting the values of values of   via the formula below.

 

Example

If we are given the matrix

 
we will chose to implement partial pivoting and thus swap the first and second row so that our matrix   and the first iteration of our   matrix respectively become
 
Once we have swapped the rows, we can eliminate the elements below the main diagonal on the first column by performing
 
such that,
 
Once these rows have been subtracted, we have derived from   the matrix
 
Because we are implementing partial pivoting, we swap the second and third rows of our derived matrix and the current version of our   matrix respectively to obtain
 
Now, we eliminate the elements below the main diagonal on the second column by performing   such that  . Because no non-zero elements exist below the main diagonal in our current iteration of   after this row subtraction, this row subtraction derives our final   matrix (denoted as  ) and final   matrix:
 
Now we can obtain our final   matrix:
 
Now these matrices have a relation such that  .

Relations when no rows are swapped

If we did not swap rows at all during this process, we can perform the row operations simultaneously for each column   by setting   where   is the N × N identity matrix with its n-th column replaced by the transposed vector   In other words, the lower triangular matrix

 

Performing all the row operations for the first   columns using the   formula is equivalent to finding the decomposition

 
Denote   so that  .

Now let's compute the sequence of  . We know that   has the following formula.

 

If there are two lower triangular matrices with 1s in the main diagonal, and neither have a non-zero item below the main diagonal in the same column as the other, then we can include all non-zero items at their same location in the product of the two matrices. For example:

 

Finally, multiply   together and generate the fused matrix denoted as   (as previously mentioned). Using the matrix  , we obtain  

It is clear that in order for this algorithm to work, one needs to have   at each step (see the definition of  ). If this assumption fails at some point, one needs to interchange n-th row with another row below it before continuing. This is why an LU decomposition in general looks like  .

LU Crout decomposition

Note that the decomposition obtained through this procedure is a Doolittle decomposition: the main diagonal of L is composed solely of 1s. If one would proceed by removing elements above the main diagonal by adding multiples of the columns (instead of removing elements below the diagonal by adding multiples of the rows), we would obtain a Crout decomposition, where the main diagonal of U is of 1s.

Another (equivalent) way of producing a Crout decomposition of a given matrix A is to obtain a Doolittle decomposition of the transpose of A. Indeed, if   is the LU-decomposition obtained through the algorithm presented in this section, then by taking   and  , we have that   is a Crout decomposition.

Through recursion

Cormen et al.[13] describe a recursive algorithm for LUP decomposition.

Given a matrix A, let P1 be a permutation matrix such that

 ,

where  , if there is a nonzero entry in the first column of A; or take P1 as the identity matrix otherwise. Now let  , if  ; or   otherwise. We have

 

Now we can recursively find an LUP decomposition  . Let  . Therefore

 

which is an LUP decomposition of A.

Randomized algorithm

It is possible to find a low rank approximation to an LU decomposition using a randomized algorithm. Given an input matrix   and a desired low rank  , the randomized LU returns permutation matrices   and lower/upper trapezoidal matrices   of size   and   respectively, such that with high probability  , where   is a constant that depends on the parameters of the algorithm and   is the  -th singular value of the input matrix  .[14]

Theoretical complexity

If two matrices of order n can be multiplied in time M(n), where M(n) ≥ na for some a > 2, then an LU decomposition can be computed in time O(M(n)).[15] This means, for example, that an O(n2.376) algorithm exists based on the Coppersmith–Winograd algorithm.

Sparse-matrix decomposition

Special algorithms have been developed for factorizing large sparse matrices. These algorithms attempt to find sparse factors L and U. Ideally, the cost of computation is determined by the number of nonzero entries, rather than by the size of the matrix.

These algorithms use the freedom to exchange rows and columns to minimize fill-in (entries that change from an initial zero to a non-zero value during the execution of an algorithm).

General treatment of orderings that minimize fill-in can be addressed using graph theory.

Applications

Solving linear equations

Given a system of linear equations in matrix form

 

we want to solve the equation for x, given A and b. Suppose we have already obtained the LUP decomposition of A such that  , so  .

In this case the solution is done in two logical steps:

  1. First, we solve the equation   for y.
  2. Second, we solve the equation   for x.

In both cases we are dealing with triangular matrices (L and U), which can be solved directly by forward and backward substitution without using the Gaussian elimination process (however we do need this process or equivalent to compute the LU decomposition itself).

The above procedure can be repeatedly applied to solve the equation multiple times for different b. In this case it is faster (and more convenient) to do an LU decomposition of the matrix A once and then solve the triangular matrices for the different b, rather than using Gaussian elimination each time. The matrices L and U could be thought to have "encoded" the Gaussian elimination process.

The cost of solving a system of linear equations is approximately   floating-point operations if the matrix   has size  . This makes it twice as fast as algorithms based on QR decomposition, which costs about   floating-point operations when Householder reflections are used. For this reason, LU decomposition is usually preferred.[16]

Inverting a matrix

When solving systems of equations, b is usually treated as a vector with a length equal to the height of matrix A. In matrix inversion however, instead of vector b, we have matrix B, where B is an n-by-p matrix, so that we are trying to find a matrix X (also a n-by-p matrix):

 

We can use the same algorithm presented earlier to solve for each column of matrix X. Now suppose that B is the identity matrix of size n. It would follow that the result X must be the inverse of A.[17]

Computing the determinant

Given the LUP decomposition   of a square matrix A, the determinant of A can be computed straightforwardly as

 

The second equation follows from the fact that the determinant of a triangular matrix is simply the product of its diagonal entries, and that the determinant of a permutation matrix is equal to (−1)S where S is the number of row exchanges in the decomposition.

In the case of LU decomposition with full pivoting,   also equals the right-hand side of the above equation, if we let S be the total number of row and column exchanges.

The same method readily applies to LU decomposition by setting P equal to the identity matrix.

Code examples

C code example

/* INPUT: A - array of pointers to rows of a square matrix having dimension N  * Tol - small tolerance number to detect failure when the matrix is near degenerate  * OUTPUT: Matrix A is changed, it contains a copy of both matrices L-E and U as A=(L-E)+U such that P*A=L*U.  * The permutation matrix is not stored as a matrix, but in an integer vector P of size N+1   * containing column indexes where the permutation matrix has "1". The last element P[N]=S+N,   * where S is the number of row exchanges needed for determinant computation, det(P)=(-1)^S   */ int LUPDecompose(double **A, int N, double Tol, int *P) {  int i, j, k, imax;   double maxA, *ptr, absA;  for (i = 0; i <= N; i++)  P[i] = i; //Unit permutation matrix, P[N] initialized with N  for (i = 0; i < N; i++) {  maxA = 0.0;  imax = i;  for (k = i; k < N; k++)  if ((absA = fabs(A[k][i])) > maxA) {   maxA = absA;  imax = k;  }  if (maxA < Tol) return 0; //failure, matrix is degenerate  if (imax != i) {  //pivoting P  j = P[i];  P[i] = P[imax];  P[imax] = j;  //pivoting rows of A  ptr = A[i];  A[i] = A[imax];  A[imax] = ptr;  //counting pivots starting from N (for determinant)  P[N]++;  }  for (j = i + 1; j < N; j++) {  A[j][i] /= A[i][i];  for (k = i + 1; k < N; k++)  A[j][k] -= A[j][i] * A[i][k];  }  }  return 1; //decomposition done  } /* INPUT: A,P filled in LUPDecompose; b - rhs vector; N - dimension  * OUTPUT: x - solution vector of A*x=b  */ void LUPSolve(double **A, int *P, double *b, int N, double *x) {  for (int i = 0; i < N; i++) {  x[i] = b[P[i]];  for (int k = 0; k < i; k++)  x[i] -= A[i][k] * x[k];  }  for (int i = N - 1; i >= 0; i--) {  for (int k = i + 1; k < N; k++)  x[i] -= A[i][k] * x[k];  x[i] /= A[i][i];  } } /* INPUT: A,P filled in LUPDecompose; N - dimension  * OUTPUT: IA is the inverse of the initial matrix  */ void LUPInvert(double **A, int *P, int N, double **IA) {    for (int j = 0; j < N; j++) {  for (int i = 0; i < N; i++) {  IA[i][j] = P[i] == j ? 1.0 : 0.0;  for (int k = 0; k < i; k++)  IA[i][j] -= A[i][k] * IA[k][j];  }  for (int i = N - 1; i >= 0; i--) {  for (int k = i + 1; k < N; k++)  IA[i][j] -= A[i][k] * IA[k][j];  IA[i][j] /= A[i][i];  }  } } /* INPUT: A,P filled in LUPDecompose; N - dimension.   * OUTPUT: Function returns the determinant of the initial matrix  */ double LUPDeterminant(double **A, int *P, int N) {  double det = A[0][0];  for (int i = 1; i < N; i++)  det *= A[i][i];  return (P[N] - N) % 2 == 0 ? det : -det; } 


C# code example

public class SystemOfLinearEquations {  public double[] SolveUsingLU(double[,] matrix, double[] rightPart, int n)  {  // decomposition of matrix  double[,] lu = new double[n, n];  double sum = 0;  for (int i = 0; i < n; i++)  {  for (int j = i; j < n; j++)  {  sum = 0;  for (int k = 0; k < i; k++)  sum += lu[i, k] * lu[k, j];  lu[i, j] = matrix[i, j] - sum;  }  for (int j = i + 1; j < n; j++)  {  sum = 0;  for (int k = 0; k < i; k++)  sum += lu[j, k] * lu[k, i];  lu[j, i] = (1 / lu[i, i]) * (matrix[j, i] - sum);  }  }  // lu = L+U-I  // find solution of Ly = b  double[] y = new double[n];  for (int i = 0; i < n; i++)  {  sum = 0;  for (int k = 0; k < i; k++)  sum += lu[i, k] * y[k];  y[i] = rightPart[i] - sum;  }  // find solution of Ux = y  double[] x = new double[n];  for (int i = n - 1; i >= 0; i--)  {  sum = 0;  for (int k = i + 1; k < n; k++)  sum += lu[i, k] * x[k];  x[i] = (1 / lu[i, i]) * (y[i] - sum);  }  return x;  } } 

MATLAB code example

function LU = LUDecompDoolittle(A)  n = length(A);  LU = A;  % decomposition of matrix, Doolittle’s Method  for i = 1:1:n  for j = 1:(i - 1)  LU(i,j) = (LU(i,j) - LU(i,1:(j - 1))*LU(1:(j - 1),j)) / LU(j,j);  end  j = i:n;  LU(i,j) = LU(i,j) - LU(i,1:(i - 1))*LU(1:(i - 1),j);  end  %LU = L+U-I end function x = SolveLinearSystem(LU, B)  n = length(LU);  y = zeros(size(B));  % find solution of Ly = B  for i = 1:n  y(i,:) = B(i,:) - LU(i,1:i)*y(1:i,:);  end  % find solution of Ux = y  x = zeros(size(B));  for i = n:(-1):1  x(i,:) = (y(i,:) - LU(i,(i + 1):n)*x((i + 1):n,:))/LU(i, i);  end  end A = [ 4 3 3; 6 3 3; 3 4 3 ] LU = LUDecompDoolittle(A) B = [ 1 2 3; 4 5 6; 7 8 9; 10 11 12 ]' x = SolveLinearSystem(LU, B) A * x 

See also

Notes

  1. ^ Schwarzenberg-Czerny, A. (1995). "On matrix factorization and efficient least squares solution". Astronomy and Astrophysics Supplement Series. 110: 405. Bibcode:1995A&AS..110..405S.
  2. ^ a b Okunev & Johnson (1997), Corollary 3.
  3. ^ Trefethen & Bau (1997), p. 166.
  4. ^ Trefethen & Bau (1997), p. 161.
  5. ^ Lay, David C. (2016). Linear algebra and its applications. Steven R. Lay, Judith McDonald (Fifth ed.). Harlow. p. 142. ISBN 1-292-09223-8. OCLC 920463015.
  6. ^ Rigotti (2001), Leading Principle Minor
  7. ^ a b Horn & Johnson (1985), Corollary 3.5.5
  8. ^ Horn & Johnson (1985), Theorem 3.5.2
  9. ^ Nhiayi, Ly; Phan-Yamada, Tuyetdong (2021). "Examining Possible LU Decomposition". North American GeoGebra Journal. 9 (1).
  10. ^ Okunev & Johnson (1997)
  11. ^ Householder (1975)
  12. ^ Golub & Van Loan (1996), p. 112, 119.
  13. ^ Cormen, Thomas H.; Leiserson, Charles E.; Rivest, Ronald L.; Stein, Clifford (2001). Introduction to Algorithms. MIT Press and McGraw-Hill. ISBN 978-0-262-03293-3.
  14. ^ Shabat, Gil; Shmueli, Yaniv; Aizenbud, Yariv; Averbuch, Amir (2016). "Randomized LU Decomposition". Applied and Computational Harmonic Analysis. 44 (2): 246–272. arXiv:1310.7202. doi:10.1016/j.acha.2016.04.006. S2CID 1900701.
  15. ^ Bunch & Hopcroft (1974)
  16. ^ Trefethen & Bau (1997), p. 152.
  17. ^ Golub & Van Loan (1996), p. 121

References

External links

References

  • LU decomposition on MathWorld.
  • LU decomposition on Math-Linux.
  • LU decomposition at Holistic Numerical Methods Institute
  • LU matrix factorization. MATLAB reference.

Computer code

  • LAPACK is a collection of FORTRAN subroutines for solving dense linear algebra problems
  • ALGLIB includes a partial port of the LAPACK to C++, C#, Delphi, etc.
  • , Prof. J. Loomis, University of Dayton
  • C code, Mathematics Source Library
  • Rust code

Online resources

decomposition, numerical, analysis, linear, algebra, lower, upper, decomposition, factorization, factors, matrix, product, lower, triangular, matrix, upper, triangular, matrix, matrix, decomposition, product, sometimes, includes, permutation, matrix, well, vie. In numerical analysis and linear algebra lower upper LU decomposition or factorization factors a matrix as the product of a lower triangular matrix and an upper triangular matrix see matrix decomposition The product sometimes includes a permutation matrix as well LU decomposition can be viewed as the matrix form of Gaussian elimination Computers usually solve square systems of linear equations using LU decomposition and it is also a key step when inverting a matrix or computing the determinant of a matrix The LU decomposition was introduced by the Polish mathematician Tadeusz Banachiewicz in 1938 1 It s also referred to as LR decomposition factors into left and right triangular matrices Contents 1 Definitions 1 1 LU factorization with partial pivoting 1 2 LU factorization with full pivoting 1 3 Lower diagonal upper LDU decomposition 1 4 Rectangular matrices 2 Example 3 Existence and uniqueness 3 1 Square matrices 3 2 Symmetric positive definite matrices 3 3 General matrices 4 Algorithms 4 1 Closed formula 4 2 Using Gaussian elimination 4 2 1 Procedure 4 2 2 Example 4 2 3 Relations when no rows are swapped 4 2 4 LU Crout decomposition 4 3 Through recursion 4 4 Randomized algorithm 4 5 Theoretical complexity 4 6 Sparse matrix decomposition 5 Applications 5 1 Solving linear equations 5 2 Inverting a matrix 5 3 Computing the determinant 6 Code examples 6 1 C code example 6 2 C code example 6 3 MATLAB code example 7 See also 8 Notes 9 References 10 External linksDefinitions Edit LDU decomposition of a Walsh matrix Let A be a square matrix An LU factorization refers to the factorization of A with proper row and or column orderings or permutations into two factors a lower triangular matrix L and an upper triangular matrix U A L U displaystyle A LU In the lower triangular matrix all elements above the diagonal are zero in the upper triangular matrix all the elements below the diagonal are zero For example for a 3 3 matrix A its LU decomposition looks like this a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 ℓ 11 0 0 ℓ 21 ℓ 22 0 ℓ 31 ℓ 32 ℓ 33 u 11 u 12 u 13 0 u 22 u 23 0 0 u 33 displaystyle begin bmatrix a 11 amp a 12 amp a 13 a 21 amp a 22 amp a 23 a 31 amp a 32 amp a 33 end bmatrix begin bmatrix ell 11 amp 0 amp 0 ell 21 amp ell 22 amp 0 ell 31 amp ell 32 amp ell 33 end bmatrix begin bmatrix u 11 amp u 12 amp u 13 0 amp u 22 amp u 23 0 amp 0 amp u 33 end bmatrix Without a proper ordering or permutations in the matrix the factorization may fail to materialize For example it is easy to verify by expanding the matrix multiplication that a 11 ℓ 11 u 11 textstyle a 11 ell 11 u 11 If a 11 0 textstyle a 11 0 then at least one of ℓ 11 textstyle ell 11 and u 11 textstyle u 11 has to be zero which implies that either L or U is singular This is impossible if A is nonsingular invertible This is a procedural problem It can be removed by simply reordering the rows of A so that the first element of the permuted matrix is nonzero The same problem in subsequent factorization steps can be removed the same way see the basic procedure below LU factorization with partial pivoting Edit It turns out that a proper permutation in rows or columns is sufficient for LU factorization LU factorization with partial pivoting LUP refers often to LU factorization with row permutations only P A L U displaystyle PA LU where L and U are again lower and upper triangular matrices and P is a permutation matrix which when left multiplied to A reorders the rows of A It turns out that all square matrices can be factorized in this form 2 and the factorization is numerically stable in practice 3 This makes LUP decomposition a useful technique in practice LU factorization with full pivoting Edit An LU factorization with full pivoting involves both row and column permutations P A Q L U displaystyle PAQ LU where L U and P are defined as before and Q is a permutation matrix that reorders the columns of A 4 Lower diagonal upper LDU decomposition Edit A Lower diagonal upper LDU decomposition is a decomposition of the form A L D U displaystyle A LDU where D is a diagonal matrix and L and U are unitriangular matrices meaning that all the entries on the diagonals of L and U are one Rectangular matrices Edit Above we required that A be a square matrix but these decompositions can all be generalized to rectangular matrices as well 5 In that case L and D are square matrices both of which have the same number of rows as A and U has exactly the same dimensions as A Upper triangular should be interpreted as having only zero entries below the main diagonal which starts at the upper left corner Similarly the more precise term for U is that it is the row echelon form of the matrix A Example EditWe factorize the following 2 by 2 matrix 4 3 6 3 ℓ 11 0 ℓ 21 ℓ 22 u 11 u 12 0 u 22 displaystyle begin bmatrix 4 amp 3 6 amp 3 end bmatrix begin bmatrix ell 11 amp 0 ell 21 amp ell 22 end bmatrix begin bmatrix u 11 amp u 12 0 amp u 22 end bmatrix One way to find the LU decomposition of this simple matrix would be to simply solve the linear equations by inspection Expanding the matrix multiplication gives ℓ 11 u 11 0 0 4 ℓ 11 u 12 0 u 22 3 ℓ 21 u 11 ℓ 22 0 6 ℓ 21 u 12 ℓ 22 u 22 3 displaystyle begin aligned ell 11 cdot u 11 0 cdot 0 amp 4 ell 11 cdot u 12 0 cdot u 22 amp 3 ell 21 cdot u 11 ell 22 cdot 0 amp 6 ell 21 cdot u 12 ell 22 cdot u 22 amp 3 end aligned This system of equations is underdetermined In this case any two non zero elements of L and U matrices are parameters of the solution and can be set arbitrarily to any non zero value Therefore to find the unique LU decomposition it is necessary to put some restriction on L and U matrices For example we can conveniently require the lower triangular matrix L to be a unit triangular matrix i e set all the entries of its main diagonal to ones Then the system of equations has the following solution ℓ 11 ℓ 22 1 ℓ 21 1 5 u 11 4 u 12 3 u 22 1 5 displaystyle begin aligned ell 11 ell 22 amp 1 ell 21 amp 1 5 u 11 amp 4 u 12 amp 3 u 22 amp 1 5 end aligned Substituting these values into the LU decomposition above yields 4 3 6 3 1 0 1 5 1 4 3 0 1 5 displaystyle begin bmatrix 4 amp 3 6 amp 3 end bmatrix begin bmatrix 1 amp 0 1 5 amp 1 end bmatrix begin bmatrix 4 amp 3 0 amp 1 5 end bmatrix Existence and uniqueness EditSquare matrices Edit Any square matrix A textstyle A admits LUP and PLU factorizations 2 If A textstyle A is invertible then it admits an LU or LDU factorization if and only if all its leading principal minors 6 are nonzero 7 for example 0 1 1 0 displaystyle begin bmatrix 0 amp 1 1 amp 0 end bmatrix does not admit an LU or LDU factorization If A textstyle A is a singular matrix of rank k textstyle k then it admits an LU factorization if the first k textstyle k leading principal minors are nonzero although the converse is not true 8 If a square invertible matrix has an LDU factorization with all diagonal entries of L and U equal to 1 then the factorization is unique 7 In that case the LU factorization is also unique if we require that the diagonal of L textstyle L or U textstyle U consists of ones In general any square matrix A n n displaystyle A n times n could have one of the following a unique LU factorization as mentioned above infinitely many LU factorizations if two or more of any first n 1 columns are linearly dependent or any of the first n 1 columns are 0 then A has infinitely many LU factorizations no LU factorization if the first n 1 columns are non zero and linearly independent and at least one leading principal minor is zero In Case 3 one can approximate an LU factorization by changing a diagonal entry a j j displaystyle a jj to a j j e displaystyle a jj pm varepsilon to avoid a zero leading principal minor 9 Symmetric positive definite matrices Edit If A is a symmetric or Hermitian if A is complex positive definite matrix we can arrange matters so that U is the conjugate transpose of L That is we can write A as A L L displaystyle A LL This decomposition is called the Cholesky decomposition The Cholesky decomposition always exists and is unique provided the matrix is positive definite Furthermore computing the Cholesky decomposition is more efficient and numerically more stable than computing some other LU decompositions General matrices Edit For a not necessarily invertible matrix over any field the exact necessary and sufficient conditions under which it has an LU factorization are known The conditions are expressed in terms of the ranks of certain submatrices The Gaussian elimination algorithm for obtaining LU decomposition has also been extended to this most general case 10 Algorithms EditClosed formula Edit When an LDU factorization exists and is unique there is a closed explicit formula for the elements of L D and U in terms of ratios of determinants of certain submatrices of the original matrix A 11 In particular D 1 A 1 1 textstyle D 1 A 1 1 and for i 2 n textstyle i 2 ldots n D i textstyle D i is the ratio of the i textstyle i th principal submatrix to the i 1 textstyle i 1 th principal submatrix Computation of the determinants is computationally expensive so this explicit formula is not used in practice Using Gaussian elimination Edit The following algorithm is essentially a modified form of Gaussian elimination Computing an LU decomposition using this algorithm requires 2 3 n 3 displaystyle tfrac 2 3 n 3 floating point operations ignoring lower order terms Partial pivoting adds only a quadratic term this is not the case for full pivoting 12 Procedure Edit Given an N N matrix A a i j 1 i j N displaystyle A a i j 1 leq i j leq N define A 0 displaystyle A 0 as the matrix A displaystyle A in which the necessary rows have been swapped to meet the desired conditions such as partial pivoting for the 1st column The parenthetical superscript e g 0 displaystyle 0 of the matrix A displaystyle A is the version of the matrix The matrix A n displaystyle A n is the A displaystyle A matrix in which the elements below the main diagonal have already been eliminated to 0 through Gaussian elimination for the first n displaystyle n columns and the necessary rows have been swapped to meet the desired conditions for the n 1 t h displaystyle n 1 th column We perform the operation r o w i r o w i ℓ i n r o w n displaystyle row i row i ell i n cdot row n for each row i displaystyle i with elements labelled as a i n n 1 displaystyle a i n n 1 where i n 1 N displaystyle i n 1 dotsc N below the main diagonal in the n th column of A n 1 displaystyle A n 1 For this operation ℓ i n a i n n 1 a n n n 1 displaystyle ell i n frac a i n n 1 a n n n 1 We perform these row operations to eliminate the elements a i n n 1 displaystyle a i n n 1 to zero Once we have subtracted these rows we may swap rows to provide the desired conditions for the n 1 t h displaystyle n 1 th column We may swap rows here to perform partial pivoting or because the element a n 1 n 1 displaystyle a n 1 n 1 on the main diagonal is zero and therefore cannot be used to implement Gaussian elimination We define the final permutation matrix P displaystyle P as the identity matrix which has all the same rows swapped in the same order as the A displaystyle A matrix Once we have performed the row operations for the first N 1 displaystyle N 1 columns we have obtained an upper triangular matrix A N 1 displaystyle A N 1 which is denoted by U displaystyle U Note we can denote A N 1 displaystyle A N 1 as U displaystyle U because the N th column of A N 1 displaystyle A N 1 has no conditions for which rows need to be swapped We can also calculate the lower triangular matrix denoted denoted as L textstyle L such that P A L U displaystyle PA LU by directly inputting the values of values of ℓ i n displaystyle ell i n via the formula below L 1 ℓ 2 1 1 ℓ n 1 n 1 ℓ N 1 ℓ N n ℓ N N 1 1 displaystyle L begin pmatrix 1 amp amp amp amp amp ell 2 1 amp ddots amp amp amp amp amp ddots amp 1 amp amp amp vdots amp cdots amp ell n 1 n amp 1 amp amp amp amp vdots amp ddots amp ddots amp ell N 1 amp cdots amp ell N n amp cdots amp ell N N 1 amp 1 end pmatrix Example Edit If we are given the matrixA 0 5 22 3 4 2 1 2 7 9 displaystyle A begin pmatrix 0 amp 5 amp frac 22 3 4 amp 2 amp 1 2 amp 7 amp 9 end pmatrix we will chose to implement partial pivoting and thus swap the first and second row so that our matrix A displaystyle A and the first iteration of our P displaystyle P matrix respectively becomeA 0 4 2 1 0 5 22 3 2 7 9 P 0 0 1 0 1 0 0 0 0 1 displaystyle A 0 begin pmatrix 4 amp 2 amp 1 0 amp 5 amp frac 22 3 2 amp 7 amp 9 end pmatrix quad P 0 begin pmatrix 0 amp 1 amp 0 1 amp 0 amp 0 0 amp 0 amp 1 end pmatrix Once we have swapped the rows we can eliminate the elements below the main diagonal on the first column by performing r o w 2 r o w 2 ℓ 2 1 r o w 1 r o w 3 r o w 3 ℓ 3 1 r o w 1 displaystyle begin alignedat 0 row 2 row 2 ell 2 1 cdot row 1 row 3 row 3 ell 3 1 cdot row 1 end alignedat such that ℓ 2 1 0 4 0 ℓ 3 1 2 4 0 5 displaystyle begin alignedat 0 ell 2 1 frac 0 4 0 ell 3 1 frac 2 4 0 5 end alignedat Once these rows have been subtracted we have derived from A 0 displaystyle A 0 the matrix 4 2 1 0 5 22 3 0 6 8 5 displaystyle begin pmatrix 4 amp 2 amp 1 0 amp 5 amp frac 22 3 0 amp 6 amp 8 5 end pmatrix Because we are implementing partial pivoting we swap the second and third rows of our derived matrix and the current version of our P displaystyle P matrix respectively to obtainA 1 4 2 1 0 6 8 5 0 5 22 3 P 1 0 1 0 0 0 1 1 0 0 displaystyle A 1 begin pmatrix 4 amp 2 amp 1 0 amp 6 amp 8 5 0 amp 5 amp frac 22 3 end pmatrix quad P 1 begin pmatrix 0 amp 1 amp 0 0 amp 0 amp 1 1 amp 0 amp 0 end pmatrix Now we eliminate the elements below the main diagonal on the second column by performing r o w 3 r o w 3 ℓ 3 2 r o w 2 displaystyle row 3 row 3 ell 3 2 cdot row 2 such that ℓ 3 2 5 6 textstyle ell 3 2 frac 5 6 Because no non zero elements exist below the main diagonal in our current iteration of A displaystyle A after this row subtraction this row subtraction derives our final A displaystyle A matrix denoted as U displaystyle U and final P displaystyle P matrix A 2 A N 1 U 4 2 1 0 6 8 5 0 0 0 25 P 0 1 0 0 0 1 1 0 0 displaystyle A 2 A N 1 U begin pmatrix 4 amp 2 amp 1 0 amp 6 amp 8 5 0 amp 0 amp 0 25 end pmatrix quad P begin pmatrix 0 amp 1 amp 0 0 amp 0 amp 1 1 amp 0 amp 0 end pmatrix Now we can obtain our final L displaystyle L matrix L 1 0 0 ℓ 2 1 1 0 ℓ 3 1 ℓ 3 2 1 1 0 0 0 1 0 0 5 5 6 1 displaystyle L begin pmatrix 1 amp 0 amp 0 ell 2 1 amp 1 amp 0 ell 3 1 amp ell 3 2 amp 1 end pmatrix begin pmatrix 1 amp 0 amp 0 0 amp 1 amp 0 0 5 amp frac 5 6 amp 1 end pmatrix Now these matrices have a relation such that P A L U displaystyle PA LU Relations when no rows are swapped Edit If we did not swap rows at all during this process we can perform the row operations simultaneously for each column n displaystyle n by setting A n L n A n 1 displaystyle A n L n A n 1 where L n displaystyle L n is the N N identity matrix with its n th column replaced by the transposed vector 0 0 1 ℓ n 1 n ℓ N n T displaystyle begin pmatrix 0 amp dotsm amp 0 amp 1 amp ell n 1 n amp dotsm amp ell N n end pmatrix textsf T In other words the lower triangular matrix L n 1 1 ℓ n 1 n ℓ N n 1 displaystyle L n begin pmatrix 1 amp amp amp amp amp amp ddots amp amp amp amp amp amp 1 amp amp amp amp amp ell n 1 n amp amp amp amp amp vdots amp amp ddots amp amp amp ell N n amp amp amp 1 end pmatrix Performing all the row operations for the first N 1 displaystyle N 1 columns using the A n L n A n 1 displaystyle A n L n A n 1 formula is equivalent to finding the decompositionA L 1 1 L 1 A 0 L 1 1 A 1 L 1 1 L 2 1 L 2 A 1 L 1 1 L 2 1 A 2 L 1 1 L N 1 1 A N 1 displaystyle A L 1 1 L 1 A 0 L 1 1 A 1 L 1 1 L 2 1 L 2 A 1 L 1 1 L 2 1 A 2 dotsm L 1 1 dotsm L N 1 1 A N 1 Denote L L 1 1 L N 1 1 textstyle L L 1 1 dotsm L N 1 1 so that A L A N 1 L U displaystyle A LA N 1 LU Now let s compute the sequence of L 1 1 L N 1 1 displaystyle L 1 1 dotsm L N 1 1 We know that L i 1 displaystyle L i 1 has the following formula L n 1 1 1 ℓ n 1 n ℓ N n 1 displaystyle L n 1 begin pmatrix 1 amp amp amp amp amp amp ddots amp amp amp amp amp amp 1 amp amp amp amp amp ell n 1 n amp amp amp amp amp vdots amp amp ddots amp amp amp ell N n amp amp amp 1 end pmatrix If there are two lower triangular matrices with 1s in the main diagonal and neither have a non zero item below the main diagonal in the same column as the other then we can include all non zero items at their same location in the product of the two matrices For example 1 0 0 0 0 77 1 0 0 0 12 0 1 0 0 63 0 0 1 0 7 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 22 1 0 0 0 33 0 1 0 0 44 0 0 1 1 0 0 0 0 77 1 0 0 0 12 22 1 0 0 63 33 0 1 0 7 44 0 0 1 displaystyle left begin array ccccc 1 amp 0 amp 0 amp 0 amp 0 77 amp 1 amp 0 amp 0 amp 0 12 amp 0 amp 1 amp 0 amp 0 63 amp 0 amp 0 amp 1 amp 0 7 amp 0 amp 0 amp 0 amp 1 end array right left begin array ccccc 1 amp 0 amp 0 amp 0 amp 0 0 amp 1 amp 0 amp 0 amp 0 0 amp 22 amp 1 amp 0 amp 0 0 amp 33 amp 0 amp 1 amp 0 0 amp 44 amp 0 amp 0 amp 1 end array right left begin array ccccc 1 amp 0 amp 0 amp 0 amp 0 77 amp 1 amp 0 amp 0 amp 0 12 amp 22 amp 1 amp 0 amp 0 63 amp 33 amp 0 amp 1 amp 0 7 amp 44 amp 0 amp 0 amp 1 end array right Finally multiply L i 1 displaystyle L i 1 together and generate the fused matrix denoted as L textstyle L as previously mentioned Using the matrix L textstyle L we obtain A L U displaystyle A LU It is clear that in order for this algorithm to work one needs to have a n n n 1 0 displaystyle a n n n 1 neq 0 at each step see the definition of ℓ i n displaystyle ell i n If this assumption fails at some point one needs to interchange n th row with another row below it before continuing This is why an LU decomposition in general looks like P 1 A L U displaystyle P 1 A LU LU Crout decomposition Edit Note that the decomposition obtained through this procedure is a Doolittle decomposition the main diagonal of L is composed solely of 1s If one would proceed by removing elements above the main diagonal by adding multiples of the columns instead of removing elements below the diagonal by adding multiples of the rows we would obtain a Crout decomposition where the main diagonal of U is of 1s Another equivalent way of producing a Crout decomposition of a given matrix A is to obtain a Doolittle decomposition of the transpose of A Indeed if A T L 0 U 0 textstyle A textsf T L 0 U 0 is the LU decomposition obtained through the algorithm presented in this section then by taking L U 0 T textstyle L U 0 textsf T and U L 0 T textstyle U L 0 textsf T we have that A L U displaystyle A LU is a Crout decomposition Through recursion Edit Cormen et al 13 describe a recursive algorithm for LUP decomposition Given a matrix A let P1 be a permutation matrix such that P 1 A a w T v A displaystyle P 1 A left begin array c ccc a amp amp w textsf T amp hline amp amp amp v amp amp A amp amp amp amp end array right where a 0 textstyle a neq 0 if there is a nonzero entry in the first column of A or take P1 as the identity matrix otherwise Now let c 1 a textstyle c 1 a if a 0 textstyle a neq 0 or c 0 textstyle c 0 otherwise We have P 1 A 1 0 c v I n 1 a w T 0 A c v w T displaystyle P 1 A left begin array c ccc 1 amp amp 0 amp hline amp amp amp cv amp amp I n 1 amp amp amp amp end array right left begin array c c a amp w textsf T hline amp 0 amp A cvw textsf T amp end array right Now we can recursively find an LUP decomposition P A c v w T L U textstyle P left A cvw textsf T right L U Let v P v textstyle v P v Therefore 1 0 0 P P 1 A 1 0 c v L a w T 0 U displaystyle left begin array c ccc 1 amp amp 0 amp hline amp amp amp 0 amp amp P amp amp amp amp end array right P 1 A left begin array c ccc 1 amp amp 0 amp hline amp amp amp cv amp amp L amp amp amp amp end array right left begin array c ccc a amp amp w textsf T amp hline amp amp amp 0 amp amp U amp amp amp amp end array right which is an LUP decomposition of A Randomized algorithm Edit It is possible to find a low rank approximation to an LU decomposition using a randomized algorithm Given an input matrix A textstyle A and a desired low rank k textstyle k the randomized LU returns permutation matrices P Q textstyle P Q and lower upper trapezoidal matrices L U textstyle L U of size m k textstyle m times k and k n textstyle k times n respectively such that with high probability P A Q L U 2 C s k 1 textstyle left PAQ LU right 2 leq C sigma k 1 where C textstyle C is a constant that depends on the parameters of the algorithm and s k 1 textstyle sigma k 1 is the k 1 textstyle k 1 th singular value of the input matrix A textstyle A 14 Theoretical complexity Edit If two matrices of order n can be multiplied in time M n where M n na for some a gt 2 then an LU decomposition can be computed in time O M n 15 This means for example that an O n2 376 algorithm exists based on the Coppersmith Winograd algorithm Sparse matrix decomposition Edit Special algorithms have been developed for factorizing large sparse matrices These algorithms attempt to find sparse factors L and U Ideally the cost of computation is determined by the number of nonzero entries rather than by the size of the matrix These algorithms use the freedom to exchange rows and columns to minimize fill in entries that change from an initial zero to a non zero value during the execution of an algorithm General treatment of orderings that minimize fill in can be addressed using graph theory Applications EditSolving linear equations Edit Given a system of linear equations in matrix form A x b displaystyle A mathbf x mathbf b we want to solve the equation for x given A and b Suppose we have already obtained the LUP decomposition of A such that P A L U textstyle PA LU so L U x P b textstyle LU mathbf x P mathbf b In this case the solution is done in two logical steps First we solve the equation L y P b textstyle L mathbf y P mathbf b for y Second we solve the equation U x y textstyle U mathbf x mathbf y for x In both cases we are dealing with triangular matrices L and U which can be solved directly by forward and backward substitution without using the Gaussian elimination process however we do need this process or equivalent to compute the LU decomposition itself The above procedure can be repeatedly applied to solve the equation multiple times for different b In this case it is faster and more convenient to do an LU decomposition of the matrix A once and then solve the triangular matrices for the different b rather than using Gaussian elimination each time The matrices L and U could be thought to have encoded the Gaussian elimination process The cost of solving a system of linear equations is approximately 2 3 n 3 textstyle frac 2 3 n 3 floating point operations if the matrix A textstyle A has size n textstyle n This makes it twice as fast as algorithms based on QR decomposition which costs about 4 3 n 3 textstyle frac 4 3 n 3 floating point operations when Householder reflections are used For this reason LU decomposition is usually preferred 16 Inverting a matrix Edit When solving systems of equations b is usually treated as a vector with a length equal to the height of matrix A In matrix inversion however instead of vector b we have matrix B where B is an n by p matrix so that we are trying to find a matrix X also a n by p matrix A X L U X B displaystyle AX LUX B We can use the same algorithm presented earlier to solve for each column of matrix X Now suppose that B is the identity matrix of size n It would follow that the result X must be the inverse of A 17 Computing the determinant Edit Given the LUP decomposition A P 1 L U textstyle A P 1 LU of a square matrix A the determinant of A can be computed straightforwardly as det A det P 1 det L det U 1 S i 1 n l i i i 1 n u i i displaystyle det A det left P 1 right det L det U 1 S left prod i 1 n l ii right left prod i 1 n u ii right The second equation follows from the fact that the determinant of a triangular matrix is simply the product of its diagonal entries and that the determinant of a permutation matrix is equal to 1 S where S is the number of row exchanges in the decomposition In the case of LU decomposition with full pivoting det A textstyle det A also equals the right hand side of the above equation if we let S be the total number of row and column exchanges The same method readily applies to LU decomposition by setting P equal to the identity matrix Code examples EditC code example Edit INPUT A array of pointers to rows of a square matrix having dimension N Tol small tolerance number to detect failure when the matrix is near degenerate OUTPUT Matrix A is changed it contains a copy of both matrices L E and U as A L E U such that P A L U The permutation matrix is not stored as a matrix but in an integer vector P of size N 1 containing column indexes where the permutation matrix has 1 The last element P N S N where S is the number of row exchanges needed for determinant computation det P 1 S int LUPDecompose double A int N double Tol int P int i j k imax double maxA ptr absA for i 0 i lt N i P i i Unit permutation matrix P N initialized with N for i 0 i lt N i maxA 0 0 imax i for k i k lt N k if absA fabs A k i gt maxA maxA absA imax k if maxA lt Tol return 0 failure matrix is degenerate if imax i pivoting P j P i P i P imax P imax j pivoting rows of A ptr A i A i A imax A imax ptr counting pivots starting from N for determinant P N for j i 1 j lt N j A j i A i i for k i 1 k lt N k A j k A j i A i k return 1 decomposition done INPUT A P filled in LUPDecompose b rhs vector N dimension OUTPUT x solution vector of A x b void LUPSolve double A int P double b int N double x for int i 0 i lt N i x i b P i for int k 0 k lt i k x i A i k x k for int i N 1 i gt 0 i for int k i 1 k lt N k x i A i k x k x i A i i INPUT A P filled in LUPDecompose N dimension OUTPUT IA is the inverse of the initial matrix void LUPInvert double A int P int N double IA for int j 0 j lt N j for int i 0 i lt N i IA i j P i j 1 0 0 0 for int k 0 k lt i k IA i j A i k IA k j for int i N 1 i gt 0 i for int k i 1 k lt N k IA i j A i k IA k j IA i j A i i INPUT A P filled in LUPDecompose N dimension OUTPUT Function returns the determinant of the initial matrix double LUPDeterminant double A int P int N double det A 0 0 for int i 1 i lt N i det A i i return P N N 2 0 det det C code example Edit public class SystemOfLinearEquations public double SolveUsingLU double matrix double rightPart int n decomposition of matrix double lu new double n n double sum 0 for int i 0 i lt n i for int j i j lt n j sum 0 for int k 0 k lt i k sum lu i k lu k j lu i j matrix i j sum for int j i 1 j lt n j sum 0 for int k 0 k lt i k sum lu j k lu k i lu j i 1 lu i i matrix j i sum lu L U I find solution of Ly b double y new double n for int i 0 i lt n i sum 0 for int k 0 k lt i k sum lu i k y k y i rightPart i sum find solution of Ux y double x new double n for int i n 1 i gt 0 i sum 0 for int k i 1 k lt n k sum lu i k x k x i 1 lu i i y i sum return x MATLAB code example Edit function LU LUDecompDoolittle A n length A LU A decomposition of matrix Doolittle s Method for i 1 1 n for j 1 i 1 LU i j LU i j LU i 1 j 1 LU 1 j 1 j LU j j end j i n LU i j LU i j LU i 1 i 1 LU 1 i 1 j end LU L U I end function x SolveLinearSystem LU B n length LU y zeros size B find solution of Ly B for i 1 n y i B i LU i 1 i y 1 i end find solution of Ux y x zeros size B for i n 1 1 x i y i LU i i 1 n x i 1 n LU i i end end A 4 3 3 6 3 3 3 4 3 LU LUDecompDoolittle A B 1 2 3 4 5 6 7 8 9 10 11 12 x SolveLinearSystem LU B A xSee also EditBlock LU decomposition Bruhat decomposition Cholesky decomposition Crout matrix decomposition Incomplete LU factorization LU Reduction Matrix decomposition QR decompositionNotes Edit Schwarzenberg Czerny A 1995 On matrix factorization and efficient least squares solution Astronomy and Astrophysics Supplement Series 110 405 Bibcode 1995A amp AS 110 405S a b Okunev amp Johnson 1997 Corollary 3 Trefethen amp Bau 1997 p 166 Trefethen amp Bau 1997 p 161 Lay David C 2016 Linear algebra and its applications Steven R Lay Judith McDonald Fifth ed Harlow p 142 ISBN 1 292 09223 8 OCLC 920463015 Rigotti 2001 Leading Principle Minor a b Horn amp Johnson 1985 Corollary 3 5 5 Horn amp Johnson 1985 Theorem 3 5 2 Nhiayi Ly Phan Yamada Tuyetdong 2021 Examining Possible LU Decomposition North American GeoGebra Journal 9 1 Okunev amp Johnson 1997 Householder 1975 Golub amp Van Loan 1996 p 112 119 Cormen Thomas H Leiserson Charles E Rivest Ronald L Stein Clifford 2001 Introduction to Algorithms MIT Press and McGraw Hill ISBN 978 0 262 03293 3 Shabat Gil Shmueli Yaniv Aizenbud Yariv Averbuch Amir 2016 Randomized LU Decomposition Applied and Computational Harmonic Analysis 44 2 246 272 arXiv 1310 7202 doi 10 1016 j acha 2016 04 006 S2CID 1900701 Bunch amp Hopcroft 1974 Trefethen amp Bau 1997 p 152 Golub amp Van Loan 1996 p 121References EditBunch James R Hopcroft John 1974 Triangular factorization and inversion by fast matrix multiplication Mathematics of Computation 28 125 231 236 doi 10 2307 2005828 ISSN 0025 5718 JSTOR 2005828 Cormen Thomas H Leiserson Charles E Rivest Ronald L Stein Clifford 2001 Introduction to Algorithms MIT Press and McGraw Hill ISBN 978 0 262 03293 3 Golub Gene H Van Loan Charles F 1996 Matrix Computations 3rd ed Baltimore Johns Hopkins ISBN 978 0 8018 5414 9 Horn Roger A Johnson Charles R 1985 Matrix Analysis Cambridge University Press ISBN 978 0 521 38632 6 See Section 3 5 N 1 Householder Alston S 1975 The Theory of Matrices in Numerical Analysis New York Dover Publications MR 0378371 Okunev Pavel Johnson Charles R 1997 Necessary And Sufficient Conditions For Existence of the LU Factorization of an Arbitrary Matrix arXiv math NA 0506382 Poole David 2006 Linear Algebra A Modern Introduction 2nd ed Canada Thomson Brooks Cole ISBN 978 0 534 99845 5 Press WH Teukolsky SA Vetterling WT Flannery BP 2007 Section 2 3 Numerical Recipes The Art of Scientific Computing 3rd ed New York Cambridge University Press ISBN 978 0 521 88068 8 Trefethen Lloyd N Bau David 1997 Numerical linear algebra Philadelphia Society for Industrial and Applied Mathematics ISBN 978 0 89871 361 9 Rigotti Luca 2001 ECON 2001 Introduction to Mathematical Methods Lecture 8External links EditReferences LU decomposition on MathWorld LU decomposition on Math Linux LU decomposition at Holistic Numerical Methods Institute LU matrix factorization MATLAB reference Computer code LAPACK is a collection of FORTRAN subroutines for solving dense linear algebra problems ALGLIB includes a partial port of the LAPACK to C C Delphi etc C code Prof J Loomis University of Dayton C code Mathematics Source Library Rust code LU in X10Online resources WebApp descriptively solving systems of linear equations with LU Decomposition Matrix Calculator with steps including LU decomposition LU Decomposition Tool uni bonn de LU Decomposition by Ed Pegg Jr The Wolfram Demonstrations Project 2007 Retrieved from https en wikipedia org w index php title LU decomposition amp oldid 1134712505, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.