Matrix Calculator with Steps
Calculate determinants, inverses, RREF, and matrix multiplication with exact fractions and step-by-step traces. Perfect for Further Maths A-Level and University.
Step-by-step learning with explanations
Matrix Calculator
Enter Matrices
Matrix A
Matrix B
Enter matrix values and click Calculate to begin
To add matrices, they must have the exact same dimensions.
You cannot add a 2×2 matrix to a 3×3 matrix. The operation is undefined.
Example 1: 2×2 Matrices
How helpful was this?
Help other students find great tools
What is a Matrix?
A matrix is a rectangular array of numbers, symbols, or expressions, arranged in rows and columns. Matrices are fundamental in linear algebra and are used to represent linear transformations, solve systems of equations, and handle vast amounts of data in computer science.
Matrix Dimensions (Size)
m rows (horizontal) × n columns (vertical)
Individual items in a matrix are called elements or entries. An element in the i-th row and j-th column is usually denoted as A[i][j] or aij.
Square Matrix
- • Same number of rows and columns (n×n)
- • Contains a main diagonal (top-left to bottom-right)
- • Required for finding a Determinant
- • Required for finding an Inverse
Identity Matrix (I)
- • A square matrix with 1s on the main diagonal and 0s elsewhere
- • Acts like the number "1" in matrix math
- • A × I = A
- • A × A⁻¹ = I
Core Matrix Operations
Matrix Multiplication
To multiply two matrices A and B, the number of columns in A must equal the number of rows in B. The result C = AB is computed by taking the dot product of the rows of A and the columns of B.
Dimension Rule: If A is (m × n) and B is (n × p), then AB is (m × p).
⚠️ Remember: Matrix multiplication is not commutative. In general, AB ≠ BA.
The Determinant: |A| or det(A)
The determinant is a scalar value that can be computed from the elements of a square matrix. Geometrically, it represents the scaling factor of the linear transformation described by the matrix.
For a 2×2 matrix:
det = ad - bcWhy it matters: If det(A) = 0, the matrix is called singular. It compresses space into a lower dimension, and does not have an inverse.
Matrix Inverse (A⁻¹)
The inverse of a matrix A is the matrix A⁻¹ such that A × A⁻¹ = I. It effectively "undoes" the transformation of matrix A.
For a 2×2 matrix:
A⁻¹ = (1/det) × [[d, -b], [-c, a]]Use Case: To solve the system Ax = b, you can multiply both sides by the inverse to get x = A⁻¹b.
Row Reduction (RREF) & Vector Spaces
Gaussian elimination is a systematic method for solving systems of equations and uncovering the fundamental properties of a matrix.
REF vs RREF
- • REF (Row Echelon Form): Zeros below every leading 1.
- • RREF (Reduced Row Echelon Form): Zeros below AND above every leading 1.
- • RREF is unique for any given matrix.
Rank & Nullity
- • Rank: Number of non-zero rows in RREF (dimension of Column/Row Space).
- • Nullity: Number of free variables (dimension of Null Space).
- • Rank + Nullity = n (Rank-Nullity Theorem)
| Vector Space | Definition | How to find Basis |
|---|---|---|
| Column Space Col(A) | All possible linear combinations of the columns of A. Range of the transformation. | Find pivot columns in RREF, select those original columns from A. |
| Row Space Row(A) | All possible linear combinations of the rows of A. | Take the non-zero rows of the RREF of A. |
| Null Space Nul(A) | All solutions x to the homogeneous equation Ax = 0. The kernel. | Solve Ax = 0 using RREF and express free variables as vectors. |
Common Mistakes in Matrix Algebra
Avoid these frequent errors when solving linear algebra questions in University and A-Level exams:
Multiplying matrices in the wrong order
Unlike regular numbers, matrix multiplication is NOT commutative. AB is usually completely different from BA, and BA might not even be possible due to dimensions.
Always maintain the exact order. If you multiply an equation by A⁻¹ on the left, you must do it on the left on both sides: A⁻¹Ax = A⁻¹b.
Trying to find the determinant of a non-square matrix
Determinants are strictly defined only for square (n × n) matrices. You cannot calculate the determinant of a 2×3 matrix.
Ensure your matrix has the same number of rows and columns before finding det(A).
Incorrect dimension matching for multiplication
You cannot multiply a 3×2 matrix by a 4×2 matrix. The inner dimensions MUST match.
Write dimensions out: (3×2) × (2×5) -> inner 2s match, outer dimensions (3×5) form the result.
Dividing by a matrix
There is no such operation as "matrix division". Writing B/A is mathematically meaningless and will cost you marks.
Multiply by the inverse instead. Use A⁻¹B or BA⁻¹ (order matters!).
Assuming det(A+B) = det(A) + det(B)
Determinants do not distribute over matrix addition. This is a very common trap in exams.
Calculate the matrix sum (A+B) first, THEN take the determinant of the result. (However, det(AB) = det(A)det(B) is true!).
Worked Examples
Practice with these standard A-Level and University linear algebra problems:
Example 1: Find the 2×2 Determinant
Find the determinant of Matrix A = [[3, 2], [5, 4]].
Solution:
Formula: det = ad - bc
a = 3, b = 2, c = 5, d = 4
det(A) = (3 × 4) - (2 × 5)
det(A) = 12 - 10
det(A) = 2
Example 2: Solve the Linear System
Solve the simultaneous equations:
2x + y = 5
x + 3y = 7
Solution (using Inverse):
A = [[2, 1], [1, 3]], b = [[5], [7]]
1. Find det(A) = (2×3) - (1×1) = 6 - 1 = 5
2. Find A⁻¹ = (1/5) × [[3, -1], [-1, 2]]
3. Calculate x = A⁻¹b
x = (1/5) × [[3(5) + -1(7)], [-1(5) + 2(7)]]
x = (1/5) × [[8], [9]]
x = 8/5, y = 9/5
Frequently Asked Questions
How does the Matrix Calculator handle fractions?
The calculator uses an advanced exact-math engine. If you input 1/3, it evaluates it as an exact fraction, avoiding floating-point rounding errors (like 0.3333). Results are also formatted beautifully as fractions.
Can I copy and paste matrices from Excel?
Yes! Simply copy a block of cells from Excel, Google Sheets, or a CSV file. Click on the top-left cell of the calculator grid and press Ctrl+V. The grid will automatically resize and populate.
How do I calculate a determinant?
For 2×2 matrices: det = ad - bc. For larger matrices, use cofactor expansion along any row or column, multiplying elements by their cofactors.
How do I find the inverse of a matrix?
Use A⁻¹ = (1/det(A)) × adj(A). The matrix must be square with a non-zero determinant. The adjugate is the transpose of the cofactor matrix.
What is RREF used for?
RREF (Row Reduced Echelon Form) is used to solve systems of linear equations, find matrix rank, uncover the null space basis, and determine if a matrix is invertible.
What does matrix rank tell us?
Rank is the number of linearly independent rows/columns. It tells you the dimension of the column space and whether a system has unique, infinite, or no solutions.
How large of a matrix can I calculate?
Our calculator supports grid inputs up to 10×10. This is more than sufficient for all A-Level and standard University linear algebra assignments.
How do I multiply two matrices?
Multiply each element in row i of A by the corresponding element in column j of B, then sum. The number of columns in A must equal rows in B.
Explore More Free Tools
All our tools are 100% free with step-by-step learning