LU decomposition is useful when many b’s have to
be solved for one A, where Ax=b. LU decomposition is an alternative method
to the Gaussian elimination solving the set of linear equations. Interesting
enough, Gaussian row elimination is used in LU decomposition.
The way LU decomposition works:

Matrix U is in the diagonal form needed to backwards
substitute and solve for X.
The intuition to this method is as follows. The matrix
A is reduced to row echelon form (U). In the naïve method the d vector
is also reduced, however, in LU decomposition the operations to the d vector
are recorded in the L matrix; that is, the coefficients to reduce the rows
are stored in L. L*d will reduce the d vector to the same vector d would
be if reduced at the same time as A. Now U and d’ can solve for X by backwards
substitution.
Pivoting has to be used in the cases in which an A
coefficient could be zero and cause divide by zero.
When storing the non-zero components of L in the zero
components of U efficiently uses implementing LU decomposition space.
LU decomposition used for matrix inverse

The matrix inverse is equivalent to solving d= {a,b,c}
for Ad={1,0,0}, and d for the columns in I, where d is the columns of the
inverse matrix of A. very cool, I will never do a matrix inverse another
way.