Page actions
instrument mechanism / verified-clean
Matrix Calculator (det/inverse/rref/eigen/least-squares) mechanism
The inspectable method record for Matrix Calculator (det/inverse/rref/eigen/least-squares), kept separate from implementation and qualification.
Model scope
The elementary formulas are correct on well-conditioned, dimensionally valid inputs, but the stated numerical algorithms and unspecified failure policies do not support the full universal claim. The honest label appropriately warns about eigen-solver instability, but it should also disclose least-squares instability from normal equations, possible complex eigenvalues, tolerance dependence, and undefined behavior for singular or rank-deficient cases.
- LU decomposition is a valid determinant method only when pivoting is handled correctly; row swaps must change the determinant sign, and singular or nearly singular pivots require explicit handling.
- Cofactor expansion is mathematically correct but is computationally impractical for large variable-size matrices and should not be presented as a general-purpose implementation method.
- A plain QR eigenvalue algorithm is not sufficient as a universal eigen solver: it needs convergence controls, usually shifts or a Hessenberg/Schur reduction, and support for complex conjugate eigenvalues. It may fail or return inaccurate results for repeated, defective, or ill-conditioned matrices.
- Normal equations A^T A beta=A^T b are mathematically valid for full-column-rank least squares, but they square the condition number and can produce materially inaccurate results for ill-conditioned inputs. QR or SVD should be the robust default.
- The specification does not define behavior for singular inverse requests, rank-deficient or underdetermined least-squares systems, complex eigenvalues, eigenvalue multiplicities, convergence failure, or numerical tolerance selection.
- Matrix addition and multiplication require compatible dimensions, but those constraints and the behavior on dimension mismatch are not specified.
Units and conventions
- Matrix entries are treated as dimensionless numbers unless the caller supplies a consistent physical interpretation.
- Matrix addition requires corresponding entries to have compatible units; matrix multiplication requires inner dimensions to match and produces compound units.
- A determinant of an n by n matrix has units equal to the product of the units of the selected entries; an inverse has reciprocal units in the corresponding linear-map sense.
- Least-squares rows must use compatible units for the response vector, and columns of the design matrix must be scaled consistently before interpreting coefficients.
Inspectable vector
One of 4 source-bound review vectors:
{
"inputs": {
"operation": "determinant_and_inverse",
"A": [
[
4,
7
],
[
2,
6
]
]
},
"expected_outputs": {
"determinant": "10",
"inverse": [
[
"3/5",
"-7/10"
],
[
"-1/5",
"2/5"
]
],
"verification_product": [
[
1,
0
],
[
0,
1
]
],
"spot_checks": [
{
"at": "det([[4,7],[2,6]])",
"input_side": 10,
"answer_side": 10
}
]
},
"reference_data": {
"method": "For a 2 by 2 matrix [[a,b],[c,d]], det=ad-bc and inverse=(1/(ad-bc))*[[d,-b],[-c,a]]."
},
"working": "det(A)=4*6-7*2=24-14=10. Therefore inverse=(1/10)*[[6,-7],[-2,4]]=[[6/10,-7/10],[-2/10,4/10]]=[[3/5,-7/10],[-1/5,2/5]]. Product check: first row, first column=4*(3/5)+7*(-1/5)=12/5-7/5=1; first row, second column=4*(-7/10)+7*(2/5)=-28/10+28/10=0; second row, first column=2*(3/5)+6*(-1/5)=6/5-6/5=0; second row, second column=2*(-7/10)+6*(2/5)=-14/10+24/10=1."
}Failure boundary
- Inverse has a division-by-zero hazard when det(A)=0; near-zero determinants require a tolerance policy rather than an exact floating-point comparison.
- LU, QR, RREF, eigenvalue, rank, and least-squares results depend on pivoting, scaling, floating-point tolerances, and iteration limits.
- Normal equations can lose significant digits for ill-conditioned design matrices; rank-deficient systems can make A^T A singular.
- Eigenvectors are non-unique up to scaling, and repeated or defective eigenvalues may not have a complete eigenbasis.
- Real-input matrices can have complex eigenvalues and eigenvectors; the output type and supported arithmetic are unspecified.
- Variable-size inputs need explicit maximum dimensions and clear errors for malformed, ragged, empty, non-square, or dimensionally incompatible matrices.
- An offline build that needs a vendored math.js library must verify that the vendored version supports all claimed operations and has no runtime network dependency.
Other records
Sources and evidence
These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.
VERIFIED_LEDGER.jsonevidence-tranche8/tranche8-results.json