We will study a direct method for solving linear systems: the LU decomposition. Given a matrix A, the aim is to build a lower triangular matrix L and an upper triangular matrix which has the following property: diagonal elements of L are unity and A=LU.

Let A be n×n matrix .LU factorization is a procedure for decomposing A into a product of a lower triangular matrix L(diagonal elements of L are unity) and an upper triangular matrix Usuch as A=LU with

L=(1l211ln1ln21)

and

U=(u11u12u1nu22u2nun1,nunn)

Solution of linear system

For the resolution of linear system : Ax=b, the system becomes

LUx=b{Ly=b(1),Ux=y(2).

We solve the system (1) to find the vector y, then the system (2) to find the vector x. The resolution is facilitated by the triangular shape of the matrices.

Ly=b{y1=b1/l11yi=1lii(bij=1i1lijyj)i=2,3,,n. Ux=y{xn=yn/unnxi=1uii(yij=i+1nuijxj)i=n1,n2,,1.

Theorems

  • if an LU factorization exists, then it is unique.
  • An invertible matrix A admits an LU factorization if and only if all its principal minors are non-zero (principal minor of order k is the determiant of the matrix (A)1i,jk ).
  • If A is only invertible, then A can be written A=PLU, where P is a permutation matrix.

LU Decomposition algorithm

We suppose that A admits an LU factorization, the LU Decomposition algorithm is:

k=1,,n1{lik=0i=1,,k1lkk=1lik=aik(k)akk(k)i=k+1,,naij(k+1)=aij(k)i=1,,kj=1,,naij(k+1)=0i=k+1,,nj=1,,kaij(k+1)=aij(k)likakj(k)i=k+1,,nj=k+1,,n lin=0i=1,,n1lnn=1U=(aij(n))1i,jnL=(lij)1i,jn

Calculating Matrix Determinant

The LU decomposition also makes it possible to calculate the determinant of A, which is equal to the product of the diagonal elements of the matrix U if A admits an LU factorization since

det(A)=det(L)×det(U)=1×det(U)=det(U)