Matrix Calculator | Add Multiply Determinant

Matrix Calculator

Add, subtract, multiply matrices and calculate determinant

A matrix is a rectangular array of numbers arranged in rows and columns, on which operations such as addition, subtraction, multiplication, and determinant calculation are performed according to defined rules.

Matrix Operations

Matrix A

Matrix B

Result

Frequently Asked Questions

How is matrix multiplication different from regular multiplication?

In matrix multiplication, the (i, j) entry of the result equals the dot product of row i of matrix A and column j of matrix B. This means A × B ≠ B × A in general (not commutative). Also, multiplication is only defined when the number of columns in A equals the number of rows in B.

Can you add two matrices of different sizes?

No. Matrix addition and subtraction require both matrices to be exactly the same size (same number of rows and same number of columns). You add corresponding entries: the (i, j) entry of A + B equals A[i][j] + B[i][j]. The calculator supports 2×2, 3×3, and 4×4 square matrices.

What is the determinant of a matrix and what does it tell you?

The determinant is a single scalar value calculated from a square matrix. For a 2×2 matrix [[a,b],[c,d]], det = ad − bc. A non-zero determinant means the matrix is invertible (has a unique inverse). A determinant of zero means the matrix is singular — the system of equations it represents has no unique solution.

What sizes of matrices does this calculator support?

The calculator supports square matrices of size 2×2, 3×3, and 4×4, selectable from a dropdown. All four operations — addition, subtraction, multiplication, and determinant — are available for these sizes. For multiplication, both matrices must be the same selected size.

What is the identity matrix and why is it special?

The identity matrix has 1s on the main diagonal and 0s elsewhere (e.g., [[1,0],[0,1]] for 2×2). Multiplying any matrix A by the identity matrix returns A unchanged — it is the matrix equivalent of multiplying by 1. The calculator initializes both matrices as identity matrices by default.