Comparative numerical laboratory

Direct Linear Solvers: Pivoting and Conditioning — Chapter 4

Solve the same \(2\times2\) linear system with and without a stable pivoting idea.

\[ A=\begin{pmatrix}\varepsilon&1\\1&1\end{pmatrix}, Ax=b. \]

Methods compared

MethodConvenienceInconvenience / warning
No pivotingFast and simple in exact arithmetic.Can divide by a tiny pivot and amplify roundoff.
Partial pivotingMajor stability safeguard in Gaussian elimination.Still affected by ill-conditioning.
Residual checkCheap way to verify the computed solution satisfies equations.Residual alone does not measure forward error when \(A\) is ill-conditioned.

Illustrative plot / animation

Numerical diagnostics

What the student must compare