Condition Number Calculator

Paste a square matrix, choose a norm, calculate. See conditioning class and practical accuracy tips. Download outputs, share examples, and refine inputs easily today.

Meta description word count: 23 • Tagline word count: 24

Calculator

Paste a square matrix using commas or spaces. Rows may be separated by new lines or semicolons.

Tip: Use scientific notation like 1e-6.
2-norm uses power iteration on AᵀA.
Used for a quick sensitivity estimate.
What you will get
  • Condition number in the selected norm.
  • Determinant and norms for context.
  • Estimated sensitivity to small input errors.
Input format examples
1, 2; 3, 4
1 2 3
4 5 6
7 8 9

Example Data Table

These examples illustrate how condition numbers change with matrix structure.

Matrix Notes Typical cond₁ Typical cond₂
[ [1, 2],
[3, 4] ]
Common 2×2; stable for many tasks. ≈ 21 ≈ 14.93
Hilbert 3×3 Classic example of a sensitive matrix. ≈ 748 ≈ 524.06
[ [1, 2],
[2, 4] ]
Singular matrix; inversion is undefined.
Values shown are standard references; your computed results depend on the chosen norm and numeric rounding.

Formula Used

For a nonsingular square matrix A, the condition number (with respect to inversion) in a chosen norm is:

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

In the 2-norm, it is also expressed using singular values:

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

Larger values indicate greater sensitivity: small changes in inputs can cause large changes in outputs.

How to Use This Calculator

  1. Paste your square matrix into the Matrix A box.
  2. Select a norm (1, infinity, Frobenius, or spectral approximation).
  3. Set precision and, if needed, iterations for the 2-norm option.
  4. Click Calculate to view results above the form.
  5. Use the CSV or PDF buttons to export your report.

Why condition numbers matter

When you solve Ax=b or fit parameters from data, small measurement and rounding errors can amplify. The amplification is bounded by the condition number, so it works as a warning light for unstable computations. A value near 1 means the problem is well behaved, while large values signal that outputs may change dramatically for tiny input changes. In practice, this guides whether you should rescale features, switch methods, or improve input precision. This helps prevent costly numerical surprises in production.

What the calculator reports

This tool computes det(A), a matrix norm, an inverse norm, and cond(A)=||A||·||A⁻¹||. It also estimates digits lost using log10(cond). For example, cond≈10⁴ suggests up to four decimal digits of reliability can be lost when solving systems under typical floating point noise. Results are displayed with your chosen precision, and exports capture the same metrics for auditing.

Norm options and meaning

The 1‑norm is the maximum column sum and is useful when column scaling reflects units or feature magnitudes. The infinity norm is the maximum row sum and aligns with row‑scaled constraints and residual checks. The Frobenius norm summarizes overall energy across all entries and is easy to interpret for dense matrices. The spectral 2‑norm approximates σmax/σmin using power iteration on AᵀA, which is a common stability reference in numerical analysis.

Interpreting the sensitivity estimate

If your assumed relative input error is ε, the tool reports an upper bound cond·ε for relative output error. With ε=0.001 and cond=500, relative output error may reach 0.5, meaning a 2% target could drift toward 3%. This is not a guaranteed worst case for every vector b, but it is a conservative screening metric that flags risk before you rely on downstream decisions.

Practical actions for better stability

Start by checking for near‑singularity: very small pivots, det(A) near zero, or cond above 10⁶. Then try scaling rows and columns, using pivoted factorizations, or reformulating variables to reduce magnitude spread. For fitted models, add regularization, remove collinear features, or collect more diverse samples. Compare norms to see if sensitivity is driven by specific rows or columns, and export CSV or PDF to document assumptions and results for colleagues.

FAQs

1) What does the condition number measure?

It measures how sensitive a computed solution is to small changes in the matrix or inputs. Higher values indicate greater amplification of errors in tasks like solving linear systems or inverting matrices.

2) Why do I get an infinite or undefined value?

If the matrix is singular or nearly singular, A⁻¹ does not exist or is numerically unstable. The calculator detects tiny pivots during inversion and reports an undefined or extremely large condition number.

3) Which norm should I use for reporting?

Use the norm that matches your application: 1‑norm for column scaling, infinity norm for row scaling, Frobenius for overall magnitude, and 2‑norm when you want a standard spectral stability indicator.

4) Why is the 2‑norm marked as an approximation?

The spectral norm depends on singular values. This tool estimates them via power iteration on AᵀA and its inverse, which is fast and practical, but iterative methods can converge slowly for some matrices.

5) Can scaling reduce a large condition number?

Yes. Row and column scaling can reduce magnitude imbalance and improve numerical behavior, especially when entries vary across many orders of magnitude. However, scaling cannot fix true rank deficiency or exact linear dependence.

6) How should I interpret “digits lost”?

Digits lost is roughly log10(cond). If it is 6, you may lose about six digits of reliable precision in sensitive computations. It is a rule of thumb, not a strict guarantee for every right‑hand side.

Related Calculators

Row Reduction RREF CalculatorDiagonalization Checker CalculatorLU Decomposition Steps CalculatorQR Decomposition Steps Calculatormatrix calculator with variablesGauss-Jordan inverse calculatorPolynomial linear independence calculatorLinear independence of matrix calculatorComplex matrix inverse calculatorQR decomposition least squares

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.