Report

Help us improve this tool

Condition Number Calculator

Calculate matrix condition numbers (1-norm, 2-norm, infinity-norm, Frobenius) for 2x2 and 3x3 matrices with step-by-step inverse, norms, and conditioning analysis.

O M T

What is the Condition Number of a Matrix?

In numerical linear algebra, the condition number $\kappa(A)$ of a square matrix $A$ measures how sensitive the solution of a linear system of equations $Ax = b$ or matrix inversion is to perturbations, noise, and floating-point round-off errors.

A matrix with a low condition number near 1 is called well-conditioned, meaning small errors in input data produce proportionally small errors in the solution. Conversely, a matrix with a very large condition number is called ill-conditioned, where tiny disturbances in $A$ or $b$ can drastically distort the computed solution $x$.

Our Condition Number Calculator computes condition numbers for $2 \times 2$ and $3 \times 3$ matrices across multiple norms (1-norm, $\infty$-norm, Frobenius norm, and 2-norm), along with determinants and explicit matrix inverses. For related matrix computations, check our Adjoint Matrix Calculator, Characteristic Polynomial Calculator, and Cholesky Decomposition Calculator.

Mathematical Definition of Condition Number

For an invertible square matrix $A$, the condition number with respect to a matrix norm $\|\cdot\|$ is defined as:

$$\kappa(A) = \|A\| \cdot \|A^{-1}\|$$

If $A$ is singular (i.e. $\det(A) = 0$), then $A^{-1}$ does not exist, and by convention:

$$\kappa(A) = \infty$$

Supported Matrix Norms

Different matrix norms can be used to evaluate the condition number:

1. 1-Norm (Maximum Absolute Column Sum)

$$\|A\|_1 = \max_{1 \le j \le n} \sum_{i=1}^n |a_{ij}|$$

2. $\infty$-Norm (Maximum Absolute Row Sum)

$$\|A\|_\infty = \max_{1 \le i \le n} \sum_{j=1}^n |a_{ij}|$$

3. Frobenius Norm (Euclidean Norm)

$$\|A\|_F = \sqrt{\sum_{i=1}^n \sum_{j=1}^n a_{ij}^2}$$

4. 2-Norm (Spectral Norm)

Defined via the singular values $\sigma(A)$ of $A$:

$$\kappa_2(A) = \frac{\sigma_{\max}(A)}{\sigma_{\min}(A)}$$

Conditioning Interpretation and Precision Loss

The condition number gives a direct rule of thumb for loss of precision during floating-point arithmetic. If you solve $Ax = b$ using standard IEEE double-precision arithmetic (which has $\approx 16$ decimal digits of precision):

$$\text{Digits of Accuracy Lost} \approx \log_{10}(\kappa(A))$$
Condition Number $\kappa(A)$ Classification Numerical Stability
$\kappa = 1$ Optimal Orthogonal / unitary matrix. Zero precision lost.
$1 < \kappa < 10^2$ Well-Conditioned Highly reliable; negligible precision loss (0 to 2 digits).
$10^2 \le \kappa < 10^5$ Moderately Conditioned Acceptable for most engineering applications (2 to 5 digits lost).
$\kappa \ge 10^5$ Ill-Conditioned Severe rounding errors; requires preconditioning or regularization.
$\kappa = \infty$ Singular Non-invertible matrix ($\det(A) = 0$). No unique solution exists.

Frequently Asked Questions

Can a condition number be less than 1?

No. For any sub-multiplicative matrix norm, $\|I\| = \|A \cdot A^{-1}\| \le \|A\| \cdot \|A^{-1}\| = \kappa(A)$. Since $\|I\| = 1$ for induced norms, $\kappa(A) \ge 1$ always. The minimum possible condition number is 1, achieved by identity and orthogonal matrices.

Why is the determinant alone not a reliable indicator of conditioning?

A matrix can have a tiny determinant simply by scaling all entries by a small constant factor (e.g. $\det(0.1 \cdot I) = 0.001$), yet remain perfectly conditioned ($\kappa = 1$). Condition number is scale-invariant: $\kappa(c \cdot A) = \kappa(A)$ for any scalar $c \neq 0$.

What is an example of a notoriously ill-conditioned matrix?

The Hilbert matrix $H_{ij} = \frac{1}{i + j - 1}$ is a famous example. Even for modest sizes like $4 \times 4$ or $5 \times 5$, its condition number exceeds $10^5$ and $10^7$, making it extremely difficult to invert with standard floating point arithmetic.

How can ill-conditioned systems be fixed?

Ill-conditioned systems are typically resolved using preconditioning (multiplying by an approximate inverse matrix $P^{-1}Ax = P^{-1}b$), Tikhonov regularization (adding a small penalty term), or higher-precision arithmetic.