🧮
🧮 Math & statistics

Matrix Condition Number Calculator (κ₂, κ₁ and κ∞ from singular values and norms)

Results update as you type.

Your numbers

Understanding the matrix condition number calculator — concept and principle

This calculator finds the condition number of a square matrix in three norms: κ₂ from the singular values, and κ₁ and κ∞ from column and row sums. It also estimates how many digits of accuracy can be lost when solving Ax = b. Use it in numerical linear algebra, data fitting and engineering models to judge whether a system is trustworthy.

3 × 3 Hilbert matrix3 × 3 Hilbert matrixunit circle → Along axis σmax 1.40832short axis σmin 0.00268734κ₁ = κ∞11/6 × 408 = 748Digits lost≈ 2.7κ₂ = σmax ÷ σmin524.057
A squashes some directions 500× more than others, so tiny input errors grow.

How it is calculated

κ(A) = ‖A‖ × ‖A⁻¹‖

2-norm: κ₂ = σ_max ÷ σ_min (largest ÷ smallest singular value)

1-norm: ‖A‖₁ = largest absolute column sum

∞-norm: ‖A‖∞ = largest absolute row sum

Digits that can be lost ≈ log₁₀ κ₂

The principle

Solving Ax = b amplifies errors. If b or A carries a small relative error, the relative error in x can be up to about κ times larger. Geometrically, A stretches space by different amounts in different directions; σ_max is the largest stretch and σ_min the smallest. When σ_min is tiny, A nearly flattens some direction, and undoing that (computing A⁻¹) blows small errors up. The rule of thumb: with κ ≈ 10ᵏ, expect to lose about k significant digits.

Worked example

Default input: the 3 × 3 Hilbert matrix A = [1 1/2 1/3; 1/2 1/3 1/4; 1/3 1/4 1/5].

  1. Singular values: largest σ_max = 1.40832, smallest σ_min = 0.00268734.
  2. κ₂ = 1.40832 ÷ 0.00268734 = 524.057.
  3. ‖A‖₁ = 1 + 1/2 + 1/3 = 11/6, and A⁻¹ = [9 −36 30; −36 192 −180; 30 −180 180] has ‖A⁻¹‖₁ = 408, so κ₁ = 11/6 × 408 = 748.
  4. A is symmetric, so row and column sums agree: κ∞ = 748.
  5. Digits that can be lost ≈ log₁₀ 524 = 2.7.

How to read the result

κ near 1 is excellent; κ in the hundreds, as here, means about three digits may be lost; κ above about 10¹⁰ with ordinary double-precision arithmetic (about 16 digits) leaves few reliable digits. Hilbert matrices get worse very quickly with size and are a classic test case. A large κ does not mean a solution is wrong, only that it is sensitive to errors in the data.

Common mistakes

Keep in mind: Condition numbers measure sensitivity, not correctness. For important numerical work, use a validated library and consider rescaling the problem.

Frequently asked questions

What is a good condition number?

Close to 1. Each factor of 10 costs roughly one significant digit of accuracy.

Why is the Hilbert matrix ill-conditioned?

Its columns are nearly parallel, so the smallest singular value is tiny.

Is the condition number the same in every norm?

No, but the norms give values of the same order of magnitude for small matrices.

Sources: J. Demmel, UC Berkeley Math 221 lecture notes, Lecture 3 (2011) · E. W. Weisstein, "Matrix Norm", Wolfram MathWorld

Checked 9 Nov 2026. J. Demmel, UC Berkeley Math 221 lecture notes, Lecture 3 (Fall 2011): κ(A) = norm(A)·norm(inv(A)) ≥ 1, in the 2-norm κ(A) = σ(1)/σ(n), SVD A = UΣVᵀ; Wolfram MathWorld, “Matrix Norm” (maximum absolute column sum norm ‖A‖₁, maximum absolute row sum norm ‖A‖∞, spectral norm ‖A‖₂).

🧮 All math & statistics tools →🌍 Calculators by country →