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
| Method | Convenience | Inconvenience / warning |
|---|---|---|
| No pivoting | Fast and simple in exact arithmetic. | Can divide by a tiny pivot and amplify roundoff. |
| Partial pivoting | Major stability safeguard in Gaussian elimination. | Still affected by ill-conditioning. |
| Residual check | Cheap 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
- determinant
- residual norm
- rough condition indicator
- pivot size