Matrix Calculator
Add, subtract, multiply, find determinant, inverse, transpose, REF/RREF, eigenvalues & more
Quick Examples
2×2 Determinant
det(A) = ad − bc = 24 − 14 = 10
Click to load →
Matrix Multiplication
B = [[5,6],[7,8]]
C = A × B
Click to load →
3×3 Matrix Inverse
Find A⁻¹ via adjugate
Click to load →
Identity Matrix det
det(I) = 1
Click to load →
Rotation Transpose
90° rotation matrix Aᵀ
Click to load →
Singular 3×3 Matrix
det = 0 (singular)
Click to load →
What Is a Matrix Calculator?
A matrix calculator is a tool that performs arithmetic and algebraic operations on rectangular arrays of numbers called matrices. Matrices are fundamental objects in linear algebra and appear throughout mathematics, physics, computer graphics, machine learning, and engineering. This free online matrix calculator handles all core operations — addition, subtraction, multiplication, determinant, inverse, transpose, REF, RREF, eigenvalues, rank, trace, and matrix powers — for 2×2, 3×3, and 4×4 square matrices, with full step-by-step working shown for every computation.
Operations Explained
Matrix Addition and Subtraction
Two matrices can be added or subtracted only when they have the same dimensions. The result is a matrix of the same size where each entry is the sum (or difference) of the corresponding entries in the two input matrices. For example, adding [[1,2],[3,4]] and [[5,6],[7,8]] gives [[6,8],[10,12]]. This calculator shows the individual entry computations as step-by-step working.
Matrix Multiplication
Matrix multiplication (A × B) is defined when the number of columns in A equals the number of rows in B. For square n×n matrices, this is always satisfied. Entry C[i][j] is the dot product of row i of A and column j of B — that is, the sum of products of corresponding elements. Unlike scalar multiplication, matrix multiplication is generally not commutative: A × B ≠ B × A in most cases.
Determinant
The determinant is a single number computed from a square matrix that encodes important geometric and algebraic information. For a 2×2 matrix [[a,b],[c,d]], the determinant is ad − bc. For 3×3 and 4×4 matrices, this calculator uses cofactor expansion along the first row. Key facts: a matrix is invertible if and only if its determinant is non-zero; the determinant gives the signed volume scaling factor of the associated linear transformation; and det(AB) = det(A) × det(B).
Matrix Inverse
The inverse A⁻¹ of a square matrix A satisfies A × A⁻¹ = A⁻¹ × A = I (the identity matrix). An inverse exists if and only if det(A) ≠ 0. For 2×2 matrices the formula is A⁻¹ = (1/det) × [[d,−b],[−c,a]]. For larger matrices this calculator computes the adjugate (transpose of the cofactor matrix) and divides by the determinant. The step-by-step breakdown shows each intermediate matrix.
Transpose
The transpose Aᵀ is formed by swapping rows and columns: Aᵀ[i][j] = A[j][i]. An n×m matrix becomes m×n after transposing. For square matrices, the transpose reflects entries across the main diagonal. Symmetric matrices satisfy A = Aᵀ. Orthogonal matrices (rotation matrices, for example) have the special property Aᵀ = A⁻¹.
Row Echelon Form (REF) and RREF
Gaussian elimination transforms a matrix into Row Echelon Form (REF) by using row operations (swapping rows, scaling rows, adding multiples of one row to another). REF requires that pivot entries are to the right of the pivot above, and all entries below each pivot are zero. Gauss-Jordan elimination continues to Reduced Row Echelon Form (RREF), where every pivot is 1 and all entries above and below each pivot are zero. RREF is unique for any given matrix and is used to solve systems of linear equations, find rank, and compute inverses.
Eigenvalues (2×2)
Eigenvalues λ of a matrix A are solutions to det(A − λI) = 0, the characteristic equation. For 2×2 matrices this becomes the quadratic λ² − tr(A)λ + det(A) = 0, solved by the quadratic formula. The discriminant Δ = tr(A)² − 4det(A) determines whether eigenvalues are real (Δ ≥ 0) or complex conjugate pairs (Δ < 0). Eigenvalues reveal a matrix's stability, diagonalizability, and the long-run behaviour of linear dynamical systems.
Rank and Trace
The rank of a matrix is the number of linearly independent rows (equivalently, columns), computed here by counting non-zero rows in RREF. A full-rank n×n matrix has rank n and is invertible. The trace is simply the sum of the main diagonal entries and equals the sum of all eigenvalues. Both rank and trace are computed in the Advanced tab with step-by-step explanations.
Worked Examples
Example 1 — 2×2 Determinant
Given A = [[4, 7], [2, 6]]:
- Apply the 2×2 formula: det(A) = ad − bc
- det(A) = (4)(6) − (7)(2) = 24 − 14 = 10
- Since det ≠ 0, the matrix is invertible.
Example 2 — 2×2 Matrix Multiplication
Given A = [[1,2],[3,4]] and B = [[5,6],[7,8]]:
- C[1][1] = 1×5 + 2×7 = 5 + 14 = 19
- C[1][2] = 1×6 + 2×8 = 6 + 16 = 22
- C[2][1] = 3×5 + 4×7 = 15 + 28 = 43
- C[2][2] = 3×6 + 4×8 = 18 + 32 = 50
- Result: C = [[19, 22], [43, 50]]
Example 3 — 2×2 Matrix Inverse
Given A = [[4, 7], [2, 6]]:
- Compute det(A) = 24 − 14 = 10
- Apply 2×2 inverse formula: A⁻¹ = (1/10) × [[6, −7], [−2, 4]]
- A⁻¹ = [[0.6, −0.7], [−0.2, 0.4]]
- Verify: A × A⁻¹ = [[1,0],[0,1]] ✓
Frequently Asked Questions
How do you multiply two matrices?
What is the determinant of a matrix?
How do you find the inverse of a matrix?
What is the difference between REF and RREF?
What are eigenvalues of a matrix?
What is the rank of a matrix?
What is the transpose of a matrix?
Related Calculators
Scientific Calculator
Trig, logarithms, powers & more
HCF & LCM Calculator
Highest common factor & least common multiple
Factorial Calculator
Compute n! with prime factorisation
Probability Calculator
Combinations, permutations & event probability
Percentage Calculator
Percentage of a number, percentage change & reverse percentage