Matrix Calculator

Add, subtract, and multiply matrices up to 4×4, or find the transpose and determinant of a single matrix.

Operation

Matrix A

Matrix B

Matrix operation rules

Addition and subtraction require both matrices to have identical dimensions, since each entry is combined with the corresponding entry in the same position. Multiplication has a stricter rule: the number of columns in A must equal the number of rows in B, and the result takes the row count of A and column count of B. Determinants are only defined for square matrices, computed here by cofactor expansion for sizes up to 4×4.

Frequently asked questions

Why can't I multiply any two matrices? Matrix multiplication combines rows of A with columns of B element-by-element and sums the products — this only works when each row of A has the same number of entries as each column of B, i.e., A's column count matches B's row count.

What does the determinant tell you? A nonzero determinant means the matrix is invertible (has a unique inverse) and represents a scaling factor for how the matrix transforms area or volume; a determinant of zero means the matrix is singular (not invertible).

Why is A×B usually different from B×A? Unlike ordinary number multiplication, matrix multiplication is not commutative — the order of combining rows and columns matters, and the dimension requirements may not even allow the multiplication to be reversed.