How do you compute the LU factorisation (with unit diagonal in L) of A=(21−1450−2811), use it to solve Ax=(−1−112), and explain when row pivoting (PA=LU) is needed?

Linear algebra and optimisation, Matrix decompositions
Level L2 Elementary. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can execute Gaussian elimination to record L and U, solve via forward and back substitution, and explain pivoting.

Key idea

Gaussian elimination produces upper-triangular U, while the row multipliers placed below the diagonal form unit-lower-triangular L; solving LUx=b splits into forward substitution Ly=b and back substitution Ux=y, and partial pivoting avoids zero or tiny pivots.

Steps

  1. Eliminate column 1 using pivot 2: multipliers are l21=4/2=2 and l31=−2/2=−1. Updating R2←R2−2R1 and R3←R3−(−1)R1 yields (21−10320910).
  2. Eliminate column 2 using pivot 3: multiplier is l32=9/3=3. Updating R3←R3−3R2 gives U=(21−1032004) and L=(100210−131).
  3. Solve Ly=b by forward substitution: y1=−1; 2(−1)+y2=−1  ⟹  y2=1; −(−1)+3(1)+y3=12  ⟹  y3=8.
  4. Solve Ux=y by back substitution: 4x3=8  ⟹  x3=2; 3x2+2(2)=1  ⟹  x2=−1; 2x1+(−1)−2=−1  ⟹  x1=1, so x=(1,−1,2)⊤.
  5. State why pivoting is needed: if a pivot entry is zero (even for an invertible matrix like (0110)) or very small, division by it fails or magnifies floating-point rounding error; permuting rows gives PA=LU where P is a permutation matrix.

Common mistakes

How long your answer should be

Half a page; 4 minutes.

Last checked on 4 December 2026.

Read this

Previous in Linear algebra and optimisation: For B=(221−1), how do you compute the Frobenius norm ∥B∥F, the induced ℓ1 norm ∥B∥1, the induced ℓ∞ norm ∥B∥∞ and the spectral norm ∥B∥2?
Next in Linear algebra and optimisation: Geometrically, why must the gradient of the objective be parallel to the gradient of the constraint at a smooth optimum of min⁡xf(x) subject to g(x)=0?