Calculator
Formula used
The condition number measures how much a matrix can amplify relative error.
General form: κ(A) = ||A|| × ||A⁻¹||
2-norm form: κ₂(A) = σmax / σmin
Error bound: relative output error ≤ κ(A) × relative input error
Digits lost: lost digits ≈ log10(κ(A))
For rectangular matrices, the calculator uses singular values. For square inverse based norms, it uses partial pivot elimination.
How to use this calculator
- Enter one matrix row on each line.
- Separate row values with commas, spaces, or both.
- Select the norm type for the condition number.
- Adjust tolerance when very small pivots need special handling.
- Enter an expected input error percent for sensitivity checking.
- Press the calculate button and review the result above the form.
- Use CSV or PDF buttons to save the report.
Example data table
| Example | Matrix | Expected behavior |
|---|---|---|
| Stable symmetric | 4, 2, 0 |
Moderate or good condition. |
| Nearly dependent | 1, 2, 3 |
Large condition number. |
| Rectangular data | 1, 0 |
Uses singular value estimate. |
Why condition number matters
A matrix condition number describes sensitivity. It compares the size of a matrix with the size of its inverse. A small value means the matrix is stable. A large value means small input changes can create large output changes. This is important in linear equations, regression, simulations, and optimization.
What the calculator checks
This calculator reads the matrix, checks its shape, and estimates rank. For square matrices, it can compute determinant, inverse based norms, and standard condition numbers. For any rectangular matrix, it estimates singular values from A transpose A. The largest and smallest useful singular values give the two norm condition number. A tolerance setting helps decide when a tiny value should be treated as zero.
How to read the result
A condition number near one is excellent. Values below ten are usually stable. Values above one thousand need care. Very large values suggest near dependence between rows or columns. A zero determinant, a low rank, or a tiny singular value means the matrix is singular or nearly singular. In that case, direct solving may be unsafe.
Practical numerical advice
Use scaling when columns have very different units. Avoid rounding matrix entries too early. Check whether two columns repeat the same information. Prefer stable decomposition methods for solving systems. QR, SVD, or regularization can be safer than raw inverse multiplication. The reciprocal condition number is also useful. Values close to zero warn that the matrix may lose many reliable digits.
Where it helps
Condition analysis is used before solving Ax equals b. It also helps in least squares fitting, finite element models, control systems, and data science. A high condition number does not always prove failure. It warns that results can be sensitive. Combine it with domain knowledge, measurement error, and residual checks. This calculator gives a fast diagnostic view. It should guide decisions before deeper numerical work.
Common input tips
Enter one row per line. Use spaces or commas between values. Keep every row the same length. Start with decimal values when needed. Try the example table first. Then adjust tolerance if the warning changes too easily. Review chart bars for quick visual checks.
FAQs
What is a matrix condition number?
It measures how sensitive a matrix calculation is to small input changes. A low value means stable behavior. A high value means errors can grow strongly.
What is a good condition number?
A value near one is best. Values below ten are usually strong. Values above one thousand need caution, especially in precision sensitive work.
Can this calculator handle rectangular matrices?
Yes. The two norm option uses singular values, so rectangular matrices can be checked. Inverse based norms still need a square matrix.
Why does a singular matrix show infinity?
A singular matrix has no standard inverse. Its smallest useful singular value is zero, so the condition number becomes infinite.
What tolerance should I use?
The default works for many decimal inputs. Increase tolerance when noise is large. Decrease it when your data has trusted high precision.
Why are singular values useful?
Singular values reveal stretching directions in a matrix. The largest and smallest values show the strongest possible error amplification.
Does a high value always mean wrong answers?
No. It means answers may be sensitive. Reliable results may still be possible with better scaling, more precision, or stable decomposition methods.
Can I save the result?
Yes. After calculation, use the CSV button for spreadsheet data or the PDF button for a formatted summary report.