Matrix Calculator
Calculate A+B, A−B, A×B, transpose, determinant, inverse or reduced row echelon form for numeric matrices up to 8×8. Use it to check matrix arithmetic or reduce an augmented linear system; it returns numerical matrices rather than a symbolic solution narrative.
Result
Check the dimensions first
- A 2×3 matrix times a 3×2 matrix produces a 2×2 matrix.
- A×B generally differs from B×A.
- A zero determinant means a square matrix has no inverse in exact arithmetic.
How to use the Matrix Calculator
- Enter one row per line, separating finite numeric entries with spaces or commas. All rows must have equal length; fractions such as 1/2 and symbolic entries are unsupported, so enter 0.5.
- Choose an operation. Addition/subtraction require equal shapes; multiplication requires columns(A)=rows(B). Transpose and RREF also accept rectangular matrices.
- Determinant and inverse require square A. An inverse also needs nonsingular A. B is used only for addition, subtraction and multiplication.
- Read each result row in order. Determinants use elimination; RREF and inverse use row reduction with pivot selection. Non-finite arithmetic results show an error; finite results are rounded.
Use RREF to interpret a system
For a linear system, place coefficients in the first columns and constants in the final column before selecting RREF. A pivot in every variable column gives a unique solution if no contradiction row appears. A missing pivot may leave free variables; the calculator does not label variables or explain solution families automatically.
Numerical matrices are not exact algebra
Inputs and row operations use floating-point numbers. Near-dependent rows can amplify rounding, so a tiny determinant is not a reliable condition estimate and a displayed inverse is not proof of stability. Check A times its proposed inverse against the identity and rescale badly scaled problems. Exact fractions, eigenvalues, complex matrices and symbolic parameters are not implemented.
Pivot selection avoids treating every value smaller than a fixed absolute threshold as zero. It cannot eliminate floating-point cancellation or guarantee rank detection for nearly singular data. Overflow is rejected; underflow can still round a very small computed product to zero. Display formatting also rounds small residuals.
Examples
Default multiplication checked by dot products
For A=[1 2; 3 4] and B=[5 6; 7 8], A×B=[19 22; 43 50]. The top-left entry is 1×5+2×7=19. Reversing the order gives B×A=[23 34; 31 46]. Enter semicolon-separated rows here as separate lines in the calculator.
Determinant and inverse
For A=[1 2; 3 4], det(A)=1×4−2×3=−2 and A⁻¹=[−2 1; 1.5 −0.5]. Multiplying A by that result gives [1 0; 0 1]. For [1 2; 2 4], the determinant is zero and no inverse exists.
Read an augmented system
Enter [1 1 3; 1 −1 1] in A and choose RREF. The result is [1 0 2; 0 1 1], representing x=2, y=1. Substitute to verify 2+1=3 and 2−1=1. A row [0 0 1] would instead indicate an inconsistent equation 0=1.
Small numbers need not be zero
For diagonal A=[1e-13 0; 0 2e-13], det(A)=2e-26 and A⁻¹=[1e13 0; 0 5e12]. The entries are small but the matrix is nonsingular. Scientific notation keeps these inputs practical.
Frequently asked questions
Can I paste fractions or use semicolons between rows?
Use decimal or scientific-notation numbers and line breaks between rows. Enter 0.5 rather than 1/2. The semicolons in written examples mark rows for readability; they are not calculator input syntax.
Why can I multiply A by B but not B by A?
Inner dimensions must match in the chosen order. A 2×3 times B 3×4 is valid and gives 2×4; B×A fails because 4 and 2 do not match.
Does RREF automatically report the solution type?
No. It displays the reduced numeric matrix. You must identify pivot columns, free variables and contradiction rows in the augmented system.
