Last verified · v1.0
Calculator · math
Matrix Condition Number Calculator (2×2)
Calculate κ(A) = ‖A‖·‖A⁻¹‖ for any 2×2 matrix. Select from four norms to assess numerical stability and detect ill-conditioned linear systems.
Inputs
Condition Number κ(A)
—
Explain my result
Get a plain-English breakdown of your result with practical next steps.
The formula
How the
result is
computed.
What Is the Condition Number of a Matrix?
The condition number κ(A) of a matrix A quantifies how sensitive the solution of a linear system Ax = b is to small perturbations in either the matrix entries or the right-hand side vector b. A condition number close to 1 signals a well-conditioned system where numerical errors stay small, while a large condition number — often 106 or higher — flags an ill-conditioned system where tiny input errors amplify into catastrophically large output errors. According to the NIST Journal of Research on error estimates for linear algebraic systems, the relative error in the computed solution satisfies ‖δx‖/‖x‖ ≤ κ(A)·(‖δb‖/‖b‖), making κ(A) the fundamental tool for error estimation in numerical linear algebra.
The Formula: κ(A) = ‖A‖ · ‖A−1‖
For any invertible matrix A and a chosen matrix norm ‖·‖, the condition number equals the product of the norm of A and the norm of its inverse. This product captures the worst-case magnification of relative errors. Because ‖A‖·‖A−1‖ ≥ ‖A·A−1‖ = ‖I‖ = 1, the condition number always satisfies κ(A) ≥ 1. A singular matrix possesses no inverse and its condition number is defined as infinity.
Computing the 2×2 Matrix Inverse
For a 2×2 matrix A with entries a11, a12, a21, a22, the inverse exists when the determinant det(A) = a11·a22 − a12·a21 is nonzero. The closed-form formula is:
A−1 = (1/det(A)) · [[a22, −a12], [−a21, a11]]
This result, documented by Snyder's Linear Algebra reference at Boston University, makes the 2×2 case fully tractable by hand and ideal for verifying automated condition number tools.
Supported Norms and Their Formulas
- 1-norm (Max Column Sum): ‖A‖1 = maxj Σi |aij|. Sum the absolute values in each column and take the maximum. Apply the identical rule to A−1.
- ∞-norm (Max Row Sum): ‖A‖∞ = maxi Σj |aij|. Sum the absolute values in each row and take the maximum. This equals the 1-norm of the matrix transpose.
- Frobenius Norm: ‖A‖F = √(a112 + a122 + a212 + a222). The square root of the sum of all squared entries — rotation-invariant and straightforward to compute.
- 2-norm (Spectral Norm): ‖A‖2 = σmax, the largest singular value of A. The spectral condition number κ2(A) = σmax/σmin delivers the tightest possible error bound. Research by Alan Edelman at MIT shows that for random n×n matrices the expected spectral condition number scales as √n, providing a useful statistical baseline for assessing matrix quality.
Interpreting the Condition Number
Apply these practical thresholds when reading output from the condition number calculator:
- κ(A) = 1: Perfectly conditioned. Identity and orthogonal matrices achieve this minimum, meaning errors experience zero amplification.
- 1 < κ(A) < 100: Well-conditioned. Standard double-precision arithmetic (approximately 15–16 significant digits) handles these systems without noticeable accuracy loss.
- 100 ≤ κ(A) < 106: Moderately conditioned. Expect to lose roughly log10(κ) digits of accuracy — a condition number of 10,000 costs about 4 decimal digits of precision.
- κ(A) ≥ 106: Ill-conditioned. Numerical solutions become unreliable under standard floating-point arithmetic. Consider Tikhonov regularization, pivoted QR decomposition, or diagonal rescaling.
Worked Example
Consider A = [[3, 1], [2, 1]], which appears in two-equation economic and circuit models. Its determinant equals 3·1 − 1·2 = 1, so A−1 = [[1, −1], [−2, 3]]. Under the ∞-norm: ‖A‖∞ = max(3+1, 2+1) = 4 and ‖A−1‖∞ = max(1+1, 2+3) = 5, yielding κ∞(A) = 20. A 1% perturbation in inputs shifts outputs by at most 20% — acceptable for most engineering applications. By contrast, the near-singular matrix [[1, 1], [1, 1.001]] produces a condition number exceeding 4,000, signaling extreme sensitivity to any change in the input data.
Applications of Condition Number Analysis
Condition number checks are indispensable across engineering and science: validating the stability of finite-element stiffness matrices in structural simulation, diagnosing multicollinearity in regression models, assessing convergence of iterative solvers in fluid dynamics, and verifying inversion quality in medical image reconstruction. Evaluating κ(A) before committing to any computed solution is a standard best practice recommended in numerical methods curricula worldwide.
Reference