Condition Number Calculator

Calculate the condition number of a square matrix using the 1-norm, infinity norm, or 2-norm.

The condition number is κ(A) = ||A|| · ||A⁻¹||. The matrix must be square and invertible.

About the Author: Created by Fotios Angelakis, MSc in Mechanical Engineering, with experience in numerical analysis, matrix methods, and engineering calculations. Learn more about the author's qualifications and experience.

Matrix A

Enter a square matrix and choose a norm.

How the Condition Number Calculator Works

The Condition Number Calculator measures how sensitive a matrix is to small input errors. It is important in numerical analysis, linear algebra, engineering simulations, optimization, and solving systems of equations.

The condition number is defined as:

κ(A) = ||A|| · ||A⁻¹||

A small condition number means the matrix is relatively stable. A large condition number means small errors can be amplified.

Matrix A measure κ(A) error sensitivity small κ: stable large κ: sensitive singular: no inverse Condition number shows numerical stability

Condition Number Formula

The condition number of a matrix A is:

κ(A) = ||A|| · ||A⁻¹||

where ||A|| is the norm of the matrix and ||A⁻¹|| is the norm of the inverse matrix.

Supported Norms

1-Norm

The 1-norm is the maximum absolute column sum:

||A||₁ = max column sum of |aᵢⱼ|

Infinity Norm

The infinity norm is the maximum absolute row sum:

||A||∞ = max row sum of |aᵢⱼ|

2-Norm

The 2-norm is based on singular values:

||A||₂ = σmax(A)

For the 2-norm condition number:

κ₂(A) = σmax(A) / σmin(A)

How to Interpret the Result

Condition Number Meaning
κ(A) ≈ 1 Very well-conditioned
κ(A) around 10 to 100 Moderately conditioned
κ(A) very large Ill-conditioned; errors may be strongly amplified
Singular matrix No finite condition number because A⁻¹ does not exist

Example Calculation

For:

A = [1  2]
    [3  4]

The calculator computes the selected norm of A, then finds A⁻¹, computes the same norm of A⁻¹, and multiplies both values.

κ(A) = ||A|| · ||A⁻¹||

Applications

  • Linear systems: checking sensitivity before solving Ax = b.
  • Engineering: evaluating stability of numerical simulations.
  • Optimization: detecting unstable or poorly scaled matrices.
  • Machine learning: identifying numerical instability in matrix operations.
  • Scientific computing: estimating error amplification.
Important: A high condition number does not always mean a calculation is impossible, but it does mean results may be sensitive to small input or rounding errors.

Frequently Asked Questions

What is a condition number used for?

It measures how much errors in input data can be amplified in the output of a matrix calculation.

Can a singular matrix have a condition number?

A singular matrix has no inverse, so it does not have a finite condition number.

Which norm should I use?

The 2-norm is common for theoretical analysis because it uses singular values. The 1-norm and infinity norm are often easier to compute and interpret through columns or rows.

Does the matrix need to be square?

For the classic formula κ(A) = ||A|| · ||A⁻¹||, yes. The matrix must be square and invertible.