Matrix calculator
Add, subtract or multiply matrices, or calculate a transpose, determinant, inverse or rank using exact fractions within bounded dimensions.
How to use
Choose the operation and A’s dimensions. Enter A’s cells, then B’s dimensions and cells when shown. Calculate and inspect the result type, dimensions and report. Operations can return a matrix, a scalar or an explicit diagnosis that no inverse exists. Copy the complete report or download TXT.
For A=[[1,2],[3,4]] and B=[[5,6],[7,8]], A+B=[[6,8],[10,12]] and A×B=[[19,22],[43,50]]. A’s determinant is −2, its inverse is [[−2,1],[3/2,−1/2]], and its rank is 2.
Support & limits
Multiplication is ordinary row-by-column matrix multiplication, not element-wise multiplication; the order of A and B matters. Rectangular matrices are accepted for transpose, rank and dimension-compatible operations. Rational results are reduced with positive denominators, without decimal rounding. Complex matrices, eigenvalues and pseudoinverses are unsupported. When an operation or dimension change hides B or a cell, the hidden value is excluded from calculation and its rejection state remains on this page.
Common questions
What happens if the matrix has no inverse?
A singular square matrix produces an explicit no-inverse result without inventing a replacement matrix. You can calculate its rank or determinant using another operation. Incompatible dimensions are a correctable input error; exceeding a work limit or deadline stops the calculation without a partial result.
Related tools
Fraction calculator
Add, subtract, multiply or divide fractions with exact integer arithmetic, an intermediate fraction and its greatest common divisor.
Linear and quadratic equation solver
Solve a linear or quadratic equation from exact numeric coefficients, distinguishing real and complex roots, identities and equations with no solution.
Linear system solver
Solve a square linear system using exact fractions, with ranks, reduced row-echelon form and a residual, distinguishing unique solutions, infinitely many solutions and inconsistency.