Matrix Calculator
Enter two matrices up to 5×5, pick an operation, and the result updates as you type. Cells accept whole numbers, decimals or fractions like 2/3.
Matrix A (2×2)
Matrix B (2×2)
Operation
Result: A × B
Result (2×2)
Addition and subtraction work entry by entry, so A and B must be the same size. Multiplication A×B needs the number of columns in A to match the number of rows in B, and the result has A's rows and B's columns. If the sizes don't fit, the calculator tells you exactly why.
The determinant, inverse, rank and linear-system solver all use Gauss-Jordan elimination with partial pivoting, which picks the largest available pivot in each column to keep rounding errors small. For 2×2 and 3×3 matrices the determinant also shows the cofactor expansion so you can check your working by hand.
To solve a system of equations Ax = b, put the coefficients in A and set B to a single column holding the right-hand side. The calculator reports the solution vector, or says whether the system has no solution or infinitely many.
Frequently asked questions
When does a matrix have no inverse?
A square matrix has an inverse only when its determinant is not zero. If the determinant is zero the matrix is called singular: its rows are linearly dependent, so elimination runs out of pivots and no inverse exists.
Why can't I multiply A and B?
Matrix multiplication A×B is only defined when A has as many columns as B has rows. A 2×3 matrix can multiply a 3×4 matrix (giving 2×4), but not a 2×3 matrix. Swapping the order, B×A, has its own size rule, and in general A×B ≠ B×A.
What does the rank of a matrix tell me?
The rank is the number of linearly independent rows (or columns). A square n×n matrix with rank n is invertible; a lower rank means some rows are combinations of others, and a system Ax = b then has either no solution or infinitely many.
Can I enter fractions?
Yes. Type values like 3/4 or -1/2 into any cell. Use the Fractions and Decimals switch to choose how results are shown; values that are not simple fractions are always shown as decimals.



