Concepts · 4 min read
Matrices for Beginners: Multiplication, Determinant, Inverse

Multiplying matrices
Each entry of the product is a row of the first matrix times a column of the second (multiply pairs, then add).
| Entry | Working | Value |
|---|---|---|
| (1,1) | 1×5 + 2×7 | 19 |
| (1,2) | 1×6 + 2×8 | 22 |
| (2,1) | 3×5 + 4×7 | 43 |
| (2,2) | 3×6 + 4×8 | 50 |
Order matters: A × B is usually not B × A.
Determinant of a 2×2
For [[a,b],[c,d]] the determinant is ad − bc. Here 1×4 − 2×3 = -2. A non-zero determinant means the matrix can be inverted.
The inverse
A⁻¹ = (1/det) × [[d, −b], [−c, a]] = [[−2, 1], [1.5, −0.5]]. Multiplying A by A⁻¹ gives the identity matrix.
Where matrices are used
They describe transformations in computer graphics, solve systems of equations and model networks. For single equations see the linear equation solver.
Adding, subtracting and scaling matrices
Addition and subtraction work entry by entry, and only for matrices of the same size. Scalar multiplication multiplies every entry by the same number.
| Operation | Result |
|---|---|
| [[1,2],[3,4]] + [[5,6],[7,8]] | [[6, 8], [10, 12]] |
| [[5,6],[7,8]] − [[1,2],[3,4]] | [[4, 4], [4, 4]] |
| 3 × [[1,2],[3,4]] | [[3, 6], [9, 12]] |
Unlike multiplication, addition is commutative: A + B always equals B + A.
The identity matrix
The 2×2 identity matrix I = [[1, 0], [0, 1]] plays the role of the number 1. Multiplying any 2×2 matrix by I, on either side, leaves it unchanged. The inverse A⁻¹ is the matrix with A × A⁻¹ = I, which is why a zero determinant (no inverse) matters: no matrix can multiply back to the identity.
Solving a system with a matrix inverse
A pair of equations can be written as a matrix product. Take 2x + 3y = 12 and 4x − 3y = 6. Write it as A × [x, y] = [12, 6] with A = [[2, 3], [4, −3]].
| Step | Working |
|---|---|
| Determinant of A | 2 × (−3) − 3 × 4 = -18 |
| Inverse of A | (1/-18) × [[−3, −3], [−4, 2]] |
| Multiply A⁻¹ by [12, 6] | x = (−3 × 12 + −3 × 6) / -18 = 3 |
| y = (−4 × 12 + 2 × 6) / -18 = 2 |
The solution is x = 3, y = 2. You can confirm it with elimination as in solving systems of equations, or by entering the matrix into the matrix calculator, which uses exact fractions.
A 3×3 determinant
For a 3×3 matrix, expand along the first row: a(ei − fh) − b(di − fg) + c(dh − eg). For [[2, 1, 3], [0, 4, 1], [5, 2, 1]] that is 2(4×1 − 1×2) − 1(0×1 − 1×5) + 3(0×2 − 4×5) = 4 + 5 − 60 = -51.
Because the determinant is not zero, this matrix has an inverse. A zero determinant would mean the rows are dependent, for instance one row being a multiple of another, and there would be no unique solution to the corresponding system.
Common mistakes with matrices
- Multiplying entry by entry. Matrix multiplication uses row-by-column sums, not entrywise products.
- Ignoring size rules. An m×n matrix can multiply an n×p matrix; the inner sizes must match.
- Assuming A × B = B × A. It usually does not.
- Forgetting the 1/det factor when writing the inverse.
Frequently asked questions
Can every matrix be inverted?
Only square matrices with a non-zero determinant.
Why is matrix multiplication not commutative?
Because rows of A pair with columns of B; swapping the order pairs different numbers.
What size matrices can be multiplied?
The number of columns of the first must equal the number of rows of the second. The result has the rows of the first and the columns of the second.
What does a zero determinant mean?
The matrix has no inverse. For a system of equations it means there is no unique solution: either none or infinitely many.
Keep reading
Calculus Basics: Derivatives and Integrals With Numbers
A gentle introduction to derivatives as slopes and integrals as areas, with numerical tables showing slopes and sums converging to exact answers.
Charts & referencesAlgebra Formulas Cheat Sheet: Identities, Exponents, Quadratics
The algebra formulas you need most: special products, exponent and log rules, the quadratic formula, slope and distance, with a worked check.
How-to guidesHow to Solve Linear Equations Step by Step (With Examples)
Learn to solve linear equations in x with a repeatable method: undo operations, balance both sides, handle brackets, fractions and special cases.
How-to guidesHow to Find the Slope of a Line: Formula and Examples
Slope = rise ÷ run = (y₂ − y₁) ÷ (x₂ − x₁). Find slope from two points, an equation or a graph, and use it for parallel and perpendicular lines.