Matrix Calculator

Addition, subtraction, multiplication, transpose, and determinant for matrices up to 4×4.

Enter matrices

Education
Matrix A
Matrix B

What is a matrix

A matrix is a rectangular array of numbers arranged in rows and columns. Matrices are widely used in mathematics, physics, computer graphics, machine learning, and economics to compactly represent systems of equations, transformations, and data.

Basic matrix operations

The matrix multiplication rule

Unlike ordinary numbers, matrix multiplication is not commutative — meaning A×B usually doesn't equal B×A. Additionally, multiplication is only possible if the matrix dimensions are compatible: the number of columns in A must exactly match the number of rows in B.

Where matrices are used

This calculator supports matrices up to 4×4. For larger matrices or more complex operations (matrix inverse, eigenvalues), specialized software (MATLAB, Python NumPy) is recommended.

FAQ

Why can't you multiply any two matrices?

Multiplying A×B is only possible if the number of columns in matrix A equals the number of rows in matrix B. This is a fundamental rule of matrix multiplication.

What is a matrix determinant?

The determinant is a number computed from a square matrix that indicates whether the matrix has an inverse (determinant ≠ 0), and is used in many linear algebra applications.

What is matrix transpose?

Transpose is an operation that turns a matrix's rows into columns and vice versa. The element at position (i,j) moves to position (j,i).