Lab 2.4 · Optional
Gaussian Elimination in Detail
Lab goal
Choose a stable pivot, compute an elimination multiplier, and explain why the row update creates a zero.
- Partial pivoting
- Row exchange
- Elimination multiplier
- Upper-triangular form
Code extensionThe full optional notebook turns these same actions into nested loops and reconstructs the permutation and lower factors.
Key ideas
Terms you will use
- Partial pivoting
pivot = arg max_{i ≥ r} |U[i,j]| Choose the largest absolute candidate in the active column and move it into the pivot position.
- Multiplier
m = target / pivot Divide the target entry by the pivot to find how much of the pivot row to subtract.
- Row update
target row ← target row − m × pivot row Subtracting m times the pivot row makes the active target entry zero.
Lab 2.4 · Optional guided example
Make each elimination step visible
Instead of tracing the full 10×10 function, this page performs the two essential cancellations by hand. The notebook link keeps the complete loop available.
Select a line to see its action, array shape, and concrete operation.
The first pivot candidate U[0,0] is zero.
Look below the diagonal
Gaussian elimination will turn the two highlighted lower-triangle positions into zeros.
Reveal to compare.