✅ Accuracy Methodology

How We Ensure Accuracy

Our dual-engine approach to computing, verifying, and presenting matrix results to the standard expected by students, engineers, and researchers.

Our Computational Approach

MatrixSolverPro uses a dual-engine approach: a high-precision numeric library (math.js) combined with our own step-by-step algorithms. This gives us both accuracy and educational value.

Engine 1: math.js

math.js is a widely-used, open-source JavaScript mathematics library maintained by Jos de Jong. It is used in production at companies and research institutions worldwide. We use it specifically for:

  • Eigenvalue/eigenvector computation (QR algorithm iteration)
  • Singular Value Decomposition (Golub-Reinsch algorithm)
  • High-precision arithmetic for large matrices

Engine 2: Our Step-by-Step Algorithms

We implement our own versions of standard algorithms so we can show each individual step. These are based on well-established methods from standard linear algebra textbooks:

  • Determinant: Cofactor expansion (Laplace) + LU verification
  • RREF/Inverse: Gauss-Jordan elimination with partial pivoting
  • LU Decomposition: Doolittle algorithm with partial pivoting
  • QR Decomposition: Classical Gram-Schmidt orthogonalization
  • Cross Product: Determinant expansion formula
  • Linear Systems: Augmented matrix RREF with consistency check

Rounding & Numerical Noise

Floating-point arithmetic in double-precision (IEEE 754) can introduce small numerical errors — for example, a value mathematically equal to 0 might appear as 1.3 × 10⁻¹⁵. We handle this carefully:

  • Values within 10⁻¹⁰ of zero are displayed as exactly 0
  • Results are rounded to 6–8 significant figures to remove noise
  • Clean fractions (numerator/denominator ≤ 999) are displayed in fraction form when they exactly match the decimal
  • The rounding is applied after computation, so it does not affect intermediate calculation accuracy

Verification Steps

Where possible, our calculators perform automatic verification:

  • Inverse Calculator: Computes A × A⁻¹ and displays the result — it should equal I
  • QR Decomposition: Computes Q × R and displays it — should equal A
  • LU Decomposition: Computes L × U and displays it — should equal PA
  • Gram-Schmidt: Computes Qᵀ × Q and displays it — should equal I
  • Eigenvalues: Verifies tr(A) = sum of eigenvalues and det(A) = product of eigenvalues

Known Limitations

  • Ill-conditioned matrices: Matrices with very large condition numbers (near-singular) may have reduced accuracy in eigenvalue and SVD computations. We display a condition number when available.
  • Very large matrices: Computation time and numerical errors increase with matrix size. We recommend keeping eigenvalue computations to 6×6 or smaller.
  • Complex eigenvalues: For 2×2 matrices we show complex eigenvalues exactly. For larger matrices, math.js returns numeric approximations of complex values.

If you find a result that appears incorrect, please contact us with the input matrix and we will investigate.