Matrix Calculator
Perform matrix operations including addition, subtraction, multiplication, transpose, determinant, and inverse.
Perform addition, subtraction, multiplication, scalar multiplication, transpose, determinant, and inverse operations on matrices up to 4×4 (determinant and inverse are supported for 2×2 and 3×3).
How Matrix Calculator Works
Choose your matrix size (2×2 up to 4×4) and enter values into Matrix A and, for most operations, Matrix B — both start out as identity matrices by default. Selecting a tab (A+B, A−B, A×B, k×A, Transpose, det(A), A⁻¹) switches which operation runs when you press Calculate.
Addition and subtraction combine matching entries and require A and B to have identical dimensions. Multiplication (A×B) computes each output entry as the dot product of a row of A with a column of B, which requires A's column count to equal B's row count. Scalar multiplication (k×A) multiplies every entry by k, and Transpose flips rows into columns.
Determinant uses the direct ad−bc formula for 2×2 matrices and cofactor expansion along the first row for 3×3 matrices; the inverse is built from the same cofactor (adjugate) matrix divided by the determinant. Both are limited to 2×2 and 3×3 since larger matrices need a full elimination algorithm instead of a closed-form formula.
See It In Action
Who Uses Matrix Calculator and Why
- Running several different matrix operations (add, subtract, multiply, scalar, transpose, determinant, inverse) on the same pair of matrices without switching tools.
- Quickly checking a 2×2 or 3×3 homework answer for addition, multiplication, or inversion in one place.
- Exploring how scalar multiplication (k×A) differs from full matrix multiplication (A×B) side by side.
- Getting the determinant or inverse of a small coefficient matrix before moving on to a dedicated linear-system solver.
Mistakes to Avoid
- Trying to compute determinant or inverse on a 4×4 matrix — this calculator's closed-form formulas only cover 2×2 and 3×3; larger sizes need the elimination-based Matrix Rank or Inverse Matrix Method calculators.
- Entering mismatched dimensions for A + B or A − B, which requires both matrices to be exactly the same size.
- Confusing scalar multiplication (k×A, multiplying every entry by one plain number) with matrix multiplication (A×B, which uses row-by-column dot products) — they produce very different results.
Tips for Best Results
- Use this calculator for quick, small (up to 3×3 for det/inverse) exploratory checks, then move to the dedicated Matrix Rank or Inverse Matrix Method calculators for anything 4×4 or larger.
- Since A and B both default to identity matrices, only the cells you actually change need attention when setting up a quick example.
Fixing Common Problems
The determinant or inverse tab isn't giving a result for my matrix. — Confirm your matrix is 2×2 or 3×3 — det(A) and A⁻¹ aren't supported for 4×4 here; use the dedicated Determinant or Inverse Matrix calculator (or Matrix Rank / Inverse Matrix Method) for larger sizes.
A × B says it's undefined. — Check that the number of columns in A matches the number of rows in B — that compatibility is required for any matrix multiplication.
Terms Explained
Identity matrix: A square matrix with 1s on the main diagonal and 0s elsewhere, which acts as the "do-nothing" matrix under multiplication.
Scalar multiplication: Multiplying every single entry of a matrix by the same plain number.