Matrix Calculator
Calculate matrix addition, subtraction, multiplication, transposition, and determinants online with automatic dimension checking.
Run tool
This online matrix calculator performs essential linear algebra operations, including addition, subtraction, multiplication, transposition, and determinant calculation. You can provide matrices using standard whitespace-separated rows, structured arrays, or lists of numbers. The tool automatically validates that every provided matrix forms a nonempty rectangular grid where each row contains an identical number of columns. For addition and subtraction, both input matrices must share identical row and column dimensions. For matrix multiplication, the number of columns in the first matrix must match the number of rows in the second matrix. Transposition exchanges rows and columns using only the first matrix, while determinant evaluation requires a square matrix between 1-by-1 and 4-by-4 in size. Calculated determinant values are rounded to ten decimal places for precision. After you click Run, the result panel shows the resulting matrix dimensions, values, or numeric scalar directly in your browser.
Instructions
- Enter the values for Matrix A using spaces between numbers on each line.
- If your calculation requires two matrices, enter the values for Matrix B in the same format.
- Select an operation from the dropdown list: Add, Subtract, Multiply, Transpose, or Determinant.
- Click Run to calculate the result.
- Review the resulting matrix elements or computed determinant scalar in the result display.
Examples
- Multiply two 2x2 matrices: set Matrix A to '1 2' on row 1 and '3 4' on row 2, set Matrix B to '5 6' on row 1 and '7 8' on row 2, select Multiply, and receive rows '19 22' and '43 50'.
- Calculate the determinant of a 2x2 matrix: enter Matrix A as '1 2' and '3 4', choose Determinant, and receive -2.
FAQ
What input formats are supported for matrix entries?
You can enter matrix elements as whitespace-separated numbers across lines, comma-separated values, or structured arrays of numbers.
What matrix dimensions are required for multiplication?
Matrix multiplication requires the number of columns in Matrix A to equal the number of rows in Matrix B.
What matrix sizes are supported for determinant calculations?
Determinant calculations are supported for square matrices ranging from 1x1 up to 4x4. Nonsquare matrices cannot have determinants evaluated.
Do transposition and determinant operations require Matrix B?
No, both Transpose and Determinant operations only evaluate Matrix A; any values entered in Matrix B are ignored.