Matrix Calculator
Add, subtract and multiply matrices up to 4×4, or find a determinant, inverse or transpose — with exact fractions rather than rounded decimals.
About this tool
Enter whole numbers, decimals or fractions such as 2/3 in each cell; the grids keep their values when you change size, and your last matrices are remembered on this device. Everything is worked out with exact fractions, so the inverse of a matrix with whole numbers comes out as clean fractions like 3/5 rather than 0.6000001. Tick the box to see decimals instead.
Adding and subtracting need two matrices of the same size. Multiplying A × B needs A to have as many columns as B has rows, and the answer has A's rows and B's columns; note that A × B is usually not the same as B × A, so the Swap button is handy. The determinant and inverse need a square matrix, and the inverse only exists when the determinant is not 0. The transpose swaps rows and columns.