Condition Number — Definition, Formula & Examples
The condition number of a matrix measures how sensitive its output is to small changes in input. A large condition number means even tiny errors in data can produce large errors in the solution, making the system ill-conditioned.
For a nonsingular matrix and a given matrix norm , the condition number is defined as . It satisfies , with for orthogonal (or unitary) matrices. When is large, the linear system is ill-conditioned, meaning the relative error in can be amplified by a factor of relative to the perturbation in or .
Key Formula
Where:
- = A nonsingular (invertible) square matrix
- = A consistent matrix norm (e.g., 2-norm, Frobenius norm)
- = The condition number of A with respect to the chosen norm
How It Works
When you solve numerically, rounding errors and measurement noise perturb by some small relative amount . The condition number bounds the worst-case amplification: . If , you can lose roughly digits of accuracy in your solution. A system with near 1 is called well-conditioned; one with is ill-conditioned. Checking the condition number before solving a linear system is standard practice in scientific computing.
Worked Example
Problem: Find the 2-norm condition number of the matrix .
Step 1: For the 2-norm, the condition number equals the ratio of the largest singular value to the smallest. Since is diagonal, its singular values are the absolute values of the diagonal entries: and .
Step 2: Compute the condition number as the ratio of these singular values.
Answer: . This means perturbations in can be amplified by up to a factor of 1000 in the solution , so roughly 3 digits of accuracy could be lost.
Why It Matters
In engineering simulations, weather modeling, and machine learning, you routinely solve large linear systems. Checking the condition number tells you whether your computed answer can be trusted or whether you need techniques like preconditioning, regularization, or higher-precision arithmetic to obtain reliable results.
Common Mistakes
Mistake: Assuming a large determinant means the matrix is well-conditioned.
Correction: Determinant magnitude and condition number are unrelated. A matrix can have a large determinant yet be extremely ill-conditioned (e.g., a large diagonal matrix with entries of vastly different magnitudes). Always compute directly.
