← Tags

Numerical Computing

Mathematics Numerical computing

[Linear algebra] Why does the condition number describe numerical difficulty? (Rewritten from an earlier blog post)

Explain how a matrix condition number affects the accuracy of a linear-system solution. Keep the matrix fixed, perturb the right-hand side, and derive a bound on relative error amplification. Use Python to examine singular values, ellipses, error directions, and inaccurate solutions with small residuals, while distinguishing problem conditioning from algorithm stability.

Mathematics Numerical computing

[Linear algebra] Why are Hilbert matrices difficult for computers? (Rewritten from an earlier blog post)

A Hilbert matrix has an inverse, yet small input errors can greatly change the solution of a linear system. Use an integral to prove invertibility and the condition number to explain error amplification. Compare residuals and solution errors in Python, and plot the difference between rebuilding inputs at high precision and reusing inputs rounded to double precision.

Mathematics Numerical computing

[Numerical computing] Examples of Newton’s method failing to converge in Python (Rewritten from an earlier blog post)

Reproduce three failures of Newton’s method in Python: iterates that alternate between zero and one, iterates whose absolute values double, and an update blocked by a zero derivative. Explain each with update formulas and plots. Compare different starting points and Brent’s method, checking residuals and stopping reasons as well as final values.

Mathematics Numerical computing

[Numerical computing] Why does Newton’s method converge quadratically? (Rewritten from an earlier blog post)

Derive why Newton’s method converges at least quadratically near a simple root using tangent lines and a Taylor expansion. Compute a square root in Python to check error reduction, error ratios, and convergence order. Compare slower convergence at a multiple root and failure to converge from some starting points, and use plots to show the accuracy limit caused by rounding errors.