Matrix Calculator
Add, subtract, multiply, or find the determinant of 2×2 and 3×3 matrices.
Pick a size and operation, fill in the values, and calculate.
What Is a Matrix?
A matrix is a rectangular grid of numbers used throughout algebra, computer graphics, engineering, and data science to represent and transform systems of numbers efficiently. This calculator handles the core operations on 2×2 and 3×3 matrices — the sizes most commonly encountered in introductory linear algebra.
The Four Operations
Multiplication: row-by-column dot products — (A×B)ᵢⱼ = Σ Aᵢₖ × Bₖⱼ
Determinant (2×2): ad − bc
Determinant (3×3): expansion by cofactors along the first row
Addition and subtraction are entry-by-entry and intuitive. Multiplication is the operation people most often get wrong by hand — each entry in the result comes from multiplying a full row of A by a full column of B and summing the products.
How to Use This Calculator
Choose your matrix size and operation. For addition, subtraction, and multiplication, fill in both Matrix A and Matrix B. For the determinant, only Matrix A is needed. Enter your values and calculate — the result displays as a grid (for add/subtract/multiply) or a single number (for determinant).
Why Matrix Multiplication Isn't Commutative
Unlike regular number multiplication, A×B usually does not equal B×A for matrices — order matters. This trips up many students first learning linear algebra, since it breaks an assumption that holds for ordinary arithmetic.
Common Uses of Matrices
- Solving systems of linear equations: representing multiple equations compactly
- Computer graphics: rotating, scaling, and transforming 2D/3D objects
- Data science: representing data sets and transformations in machine learning
- Engineering: modeling systems with multiple interacting variables
Worked Example
For matrices A = [[1,2],[3,4]] and B = [[5,6],[7,8]]: A+B = [[6,8],[10,12]]. A×B = [[19,22],[43,50]] — note how each entry comes from a row-column dot product, not simple entry-wise multiplication. The determinant of A is (1×4)−(2×3) = −2.
Where This Fits
Pair this with our quadratic equation solver for other algebra needs.
Frequently Asked Questions
Explore All NerdyTools By Categories
Find the right tool for any task — free, fast, and no sign-up required
