Condition Number Calculator
Calculate the condition number of a matrix using 1-norm, infinity-norm, or Frobenius norm. Supports matrices up to 10×10 with full inverse computation.
Show Inverse Matrix A⁻¹
About
The condition number κ(A) quantifies how sensitive the solution of a linear system Ax = b is to perturbations in the input data. A matrix with κ ≈ 1 is well-conditioned. A matrix with κ > 106 is ill-conditioned. Solving ill-conditioned systems without awareness of κ leads to solutions dominated by rounding error. Finite element analysis, GPS trilateration, and regression all fail silently when the underlying matrix is near-singular. This calculator computes κ via explicit inversion using Gauss-Jordan elimination with partial pivoting.
The tool supports three norm types: 1-norm (max absolute column sum), ∞-norm (max absolute row sum), and Frobenius norm. Note: the computed condition number assumes exact arithmetic. For matrices larger than roughly 10×10, dedicated libraries with iterative refinement (LAPACK, SciPy) are more reliable. For n ≤ 10, direct inversion is adequate.
Formulas
The condition number of a nonsingular matrix A with respect to a given matrix norm is defined as:
The three supported norms are computed as follows:
Where A is the input matrix of dimensions m × n (must be square for condition number). A−1 is the matrix inverse computed via Gauss-Jordan elimination with partial pivoting. The number of digits of accuracy lost in solving Ax = b is approximately log10(κ(A)). If κ(A) = ∞, the matrix is singular.
Reference Data
| Matrix Type | Typical κ(A) | Condition | Digits Lost | Notes |
|---|---|---|---|---|
| Identity I | 1 | Perfect | 0 | Baseline reference |
| Orthogonal Q | 1 | Perfect | 0 | QTQ = I |
| Diagonal (balanced) | 1 - 10 | Well | 0 - 1 | Ratio of max/min diagonal entry |
| Tridiagonal (SPD) | 10 - 103 | Moderate | 1 - 3 | Common in FEM discretizations |
| Vandermonde (n=5) | 103 - 105 | Poor | 3 - 5 | Polynomial interpolation matrices |
| Hilbert (n=5) | ≈ 4.8 × 105 | Very poor | 5 - 6 | Hij = 1÷(i+j−1) |
| Hilbert (n=10) | ≈ 1.6 × 1013 | Catastrophic | 13 | Classic ill-conditioned benchmark |
| Random (uniform) | 10 - 103 | Moderate | 1 - 3 | Varies with realization |
| Near-singular | > 1015 | Singular | All | det(A) ≈ 0 |
| Pascal (n=6) | ≈ 8.5 × 107 | Poor | 7 - 8 | Binomial coefficient matrix |
| Frank (n=6) | ≈ 1.7 × 104 | Moderate-poor | 4 | Upper Hessenberg test matrix |
| Cauchy (n=5) | 104 - 106 | Poor | 4 - 6 | Cij = 1÷(xi+yj) |
| Toeplitz (symmetric) | 10 - 104 | Varies | 1 - 4 | Signal processing applications |