Matrix Calculator
Add, subtract, multiply, transpose and invert 2×2, 3×3 and 4×4 matrices.
All calculations happen locally in your browser — nothing is uploaded, stored or tracked.
Choose the size
2×2, 3×3 or 4×4 for each matrix.
Enter the entries
Type values into the grid cells.
Pick an operation
Add, subtract, multiply, transpose, determinant or inverse.
What Is a Matrix Calculator?
A matrix is a rectangular grid of numbers, and matrix algebra is the language of linear systems, transformations and data. This calculator performs the core operations: addition and subtraction, multiplication, transpose, determinant and inverse.
Sizes from 2×2 up to 4×4 are supported. For multiplication, the number of columns of the first matrix must match the number of rows of the second — the calculator checks this and explains any mismatch.
Key Definitions
A matrix has an inverse only when its determinant is non-zero — such matrices are called invertible or non-singular. The inverse is computed with the adjugate method (Gauss–Jordan elimination internally), with results rounded for display.
Your data never leaves your device.
Every calculation on this site runs in your browser using vanilla JavaScript. Nothing is uploaded, stored or tracked.
- 100% local, client-side calculations
- No data stored on any server
- No tracking, no analytics, no ads scripts
- Works offline once loaded
Frequently Asked Questions
How do I multiply two matrices?
Each entry of the result is the dot product of a row of the first matrix with a column of the second. The first matrix's columns must equal the second's rows.
When does a matrix have an inverse?
Only when its determinant is non-zero. The calculator reports the determinant alongside the inverse.
What is a determinant?
A scalar value computed from a square matrix that indicates whether it is invertible and how it scales areas or volumes.
Can I multiply a 2×3 by a 3×4 matrix?
Yes — the inner dimensions match (3), giving a 2×4 result. The calculator sizes the output automatically.
What is the transpose of a matrix?
It flips rows and columns: entry (i, j) becomes entry (j, i).