UcenlyOpen in the app

Differential Equations & Numerical Methods · BE5B01DEN · Topic 9 of 13

Gaussian elimination, LU decomposition, complexity

Week 9. Eliminate with partial pivoting, solve by back substitution, and remember the cost is about 2n³/3.

Open the interactive lesson

Key ideas

GEM with partial pivoting

In column k choose the row with the largest |entry| as pivot, swap it up, and subtract multiples l_(i,k)=c_(i,k)/c_(k,k) of the pivot row from the rows below. Then solve the triangular system by back substitution (cost n²).

LU and LUP decomposition

The multipliers l_(i,k) form the unit lower triangular L, and the reduced matrix is U, so A=LU. With row swaps PA=LU, and Ax=b is solved by Ly=Pb then Ux=y. The determinant is the product of the pivots, up to the sign of the swaps.

Norms and the condition number

The condition number cond(A)=‖A‖·‖A⁻¹‖ bounds how much a relative error in b is magnified in x. If b is reliable to k digits, x is reliable to about k−log₁₀ cond(A) digits.

In one line: Elimination is exact in principle; the condition number tells you how many digits survive in practice.

Formulas

Practice with worked solutions

Question 1

Solve the system by Gaussian elimination and back substitution; give z.

2x+y+z=54x−6y=−2−2x+7y+2z=9\begin{aligned}2x+y+z&=5\\4x-6y&=-2\\-2x+7y+2z&=9\end{aligned}
Worked solution

Answer: 2

  1. (21150−8−2−1208314)→(21150−8−2−120012)\left(\begin{array}{ccc|c}2&1&1&5\\0&-8&-2&-12\\0&8&3&14\end{array}\right)\to\left(\begin{array}{ccc|c}2&1&1&5\\0&-8&-2&-12\\0&0&1&2\end{array}\right)
  2. z=2,y=−12+4−8=1,x=5−1−22=1z=2,\quad y=\frac{-12+4}{-8}=1,\quad x=\frac{5-1-2}2=1

Eliminate x with the multipliers 2 and −1, then eliminate y.

Question 2

Find the determinant of the matrix from its row echelon form.

A=(2114−60−272)A=\begin{pmatrix}2&1&1\\4&-6&0\\-2&7&2\end{pmatrix}
Worked solution

Answer: -16

  1. U=(2110−8−2001),det⁡A=2⋅(−8)⋅1=−16U=\begin{pmatrix}2&1&1\\0&-8&-2\\0&0&1\end{pmatrix},\qquad\det A=2\cdot(-8)\cdot1=-16

The determinant is the product of the pivots (no row swaps without pivoting).

Question 3

Find the multiplier l₃₂ in the LU decomposition A = LU (no pivoting, unit diagonal in L) of the same matrix.

A=(2114−60−272)A=\begin{pmatrix}2&1&1\\4&-6&0\\-2&7&2\end{pmatrix}
Worked solution

Answer: -1

  1. l21=2, l31=−1l_{21}=2,\ l_{31}=-1
  2. l32=8−8=−1,L=(100210−1−11)l_{32}=\frac{8}{-8}=-1,\qquad L=\begin{pmatrix}1&0&0\\2&1&0\\-1&-1&1\end{pmatrix}

After the first column, the pivot is −8 and the entry below it is 8.

More Differential Equations & Numerical Methods practice in Ucenly

Sources

Written by Ucenly. Based on the BE5B01DEN course materials: