Jump to content

LU decomposition: Difference between revisions

m
Corrected the index for diagonal matrix when calculating L matrix entries
(jq)
m (Corrected the index for diagonal matrix when calculating L matrix entries)
Line 90:
:<math>l_{ij} = \frac{1}{u_{jj}} (a_{ij} - \sum_{k=1}^{j-1} u_{kj}l_{ik})</math>
 
We see in the second formula that to get the <math>l_{ij}</math> below the diagonal, we have to divide by the diagonal element (pivot) <math>u_{ijjj}</math>, so we get problems when <math>u_{ijjj}</math> is either 0 or very small, which leads to numerical instability.
 
The solution to this problem is ''pivoting'' <math>A</math>, which means rearranging the rows of <math>A</math>, prior to the <math>LU</math> decomposition, in a way that the largest element of each column gets onto the diagonal of <math>A</math>. Rearranging the columns means to multiply <math>A</math> by a permutation matrix <math>P</math>:
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.