← All posts

Matrix Basics: How to Multiply Matrices Step by Step

May 9, 2026 · 7 min · matrix multiplication · determinants · inverse matrix · 2x2 matrices · matrices revision

Written & checked by Rabail, a student.

Quick answer: To multiply matrices step by step, first check that the number of columns in the first matrix equals the number of rows in the second. Then take row 1 of A, pair each number with column 1 of B, multiply the pairs and add them. That total is the top-left entry of the answer. Repeat for every row-and-column combination.

I do IGCSE and A-Levels, and matrices were the topic where I was confidently wrong for two weeks. I had decided that multiplying matrices meant multiplying the numbers sitting in the same position, the way addition works. Every answer was neat, fast and wrong. What fixed it was writing out one 2x2 product four separate times, one entry per line, until my hand knew the pattern.

Order first: what you are allowed to do

A matrix is a grid of numbers, and its order is always written rows by columns. A grid with 2 rows and 3 columns is a 2x3 matrix, however wide it looks. Write it as [[1, 5, -2], [0, 3, 4]], where the first inner bracket is the top row.

Order decides everything:

  • You can add or subtract two matrices only if their orders match exactly.
  • You can multiply A by B only if the number of columns in A matches the number of rows in B.
  • The product takes the outer numbers: a 2x3 times a 3x4 gives a 2x4.

So before touching a number, write the two orders side by side, like 2x3 and 3x4: the inner pair must match, and the outer pair is your answer's size.

Adding is the gentle part. With A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]], A + B = [[6, 8], [10, 12]]: add the numbers in matching positions. Scalars are as easy, so 3A = [[3, 6], [9, 12]]. The trap is assuming two matrices multiply the same way. They do not, and that is the whole difficulty of this topic.

How to multiply matrices step by step

Matrix multiplication pairs a row with a column. The entry in row i, column j comes from row i of the first matrix and column j of the second: multiply the matching numbers, then add.

Let A = [[2, 3], [1, 4]] and B = [[5, 0], [-2, 6]]. Both are 2x2, so AB exists and is 2x2: four entries to find.

  1. Top-left: row 1 of A (2, 3) and column 1 of B (5, -2): (2 x 5) + (3 x -2) = 10 - 6 = 4.
  2. Top-right: row 1 of A (2, 3) and column 2 of B (0, 6): (2 x 0) + (3 x 6) = 18.
  3. Bottom-left: row 2 of A (1, 4) and column 1 of B (5, -2): (1 x 5) + (4 x -2) = -3.
  4. Bottom-right: row 2 of A (1, 4) and column 2 of B (0, 6): (1 x 0) + (4 x 6) = 24.

So AB = [[4, 18], [-3, 24]].

Now the other way round: BA is [[10, 15], [2, 18]]. Check its top-left yourself, using row 1 of B (5, 0) and column 1 of A (2, 1): (5 x 2) + (0 x 1) = 10.

AB and BA are different. That is the rule, not a slip: matrix multiplication is not commutative. Examiners test this constantly, so if a question asks for BA, writing AB earns nothing.

The pattern is identical for bigger matrices: a 2x3 times a 3x2 gives a 2x2, each entry a sum of three products instead of two. If a product feels chaotic, run the same numbers through /math-solver and compare its working with yours line by line to find where you slipped.

Determinants of a 2x2, and what they tell you

For A = [[a, b], [c, d]], the determinant is ad - bc. It is written det(A): a single number, not a matrix.

Using A = [[2, 3], [1, 4]]: det(A) = (2 x 4) - (3 x 1) = 8 - 3 = 5.

The determinant answers one question: does this matrix have an inverse? If det(A) is not zero it does. If det(A) = 0 the matrix is singular, with no inverse.

Look at [[2, 4], [3, 6]]: (2 x 6) - (4 x 3) = 0. The bottom row is 1.5 times the top row, and whenever one row is a multiple of another the determinant is zero. In equation terms the lines coincide or are parallel, so there is no unique solution.

The inverse of a 2x2, and how to check it

For A = [[a, b], [c, d]] with a non-zero determinant:

A inverse = (1 / det(A)) x [[d, -b], [-c, a]]

Read that carefully: this is where marks disappear. Swap a and d on the leading diagonal, change the sign of b and c but leave them in place, then divide everything by the determinant.

For A = [[2, 3], [1, 4]] with det(A) = 5, the inverse is (1/5) x [[4, -3], [-1, 2]], or [[0.8, -0.6], [-0.2, 0.4]].

Always check. Multiply A by its inverse and you must get the identity matrix [[1, 0], [0, 1]]. Top-left: (2 x 4) + (3 x -1) = 5, which divided by 5 is 1. Top-right: (2 x -3) + (3 x 2) = 0. The other two come out as 0 and 1. Identity confirmed, in thirty seconds.

Solving simultaneous equations with matrices

This is why matrices are on your syllabus. Take:

2x + 3y = 13

x + 4y = 14

The coefficient matrix is A = [[2, 3], [1, 4]], with unknown column [x, y] and constant column [13, 14]. The solution is A inverse times the constant column, and A inverse = (1/5) x [[4, -3], [-1, 2]].

  • x = (1/5) x ((4 x 13) + (-3 x 14)) = (1/5) x 10 = 2
  • y = (1/5) x ((-1 x 13) + (2 x 14)) = (1/5) x 15 = 3

Substitute back: 2(2) + 3(3) = 13 and 2 + 4(3) = 14. Both work, so x = 2 and y = 3. Had det(A) been zero, that is your cue to state there is no unique solution, often worth a mark itself.

Mistakes that cost me marks

  • Multiplying element by element. It looks reasonable and is never right.
  • Doing BA when the question asked for AB. Underline which comes first.
  • Skipping the order check, then answering a product that cannot exist.
  • Sign slips on -b and -c in the inverse formula, especially when b or c is already negative.
  • Dividing only the first element by the determinant instead of all four.

Drill these in short bursts, not one long session. I build a ten-question set on /quiz, redo it across a week, and send anything shaky to /explain. More maths guides sit on the /help-in-study/math hub.

Test yourself

  1. Multiply [[1, 2], [0, 3]] by [[4, -1], [2, 5]], showing all four entries.
  2. Find the determinant of [[6, 2], [9, 3]] and say what it tells you about the inverse.
  3. Matrix A is 3x2 and matrix B is 2x5. What is the order of AB, and does BA exist?

Check your working, not just answers, against /math-solver.

FAQ

Why is AB not the same as BA?

Each entry comes from pairing a row of the first matrix with a column of the second. Swap the order and you pair different numbers, so the sums change. Only in special cases, such as multiplying by the identity, do AB and BA match.

What does a determinant of zero actually mean?

The matrix is singular: no inverse exists, and simultaneous equations built from it have either no solution or infinitely many. One row is a multiple of another, so the equations are not independent.

Do I need 3x3 determinants and inverses?

It depends on your course. CBSE Class 12 covers 3x3 determinants, minors, cofactors and inverses in full, while AP Precalculus and Cambridge Additional Maths concentrate on 2x2 work. Check your own syllabus rather than guessing, because 3x3 inverses eat practice hours.

Where do matrices appear in school maths?

CBSE Class 12 has whole chapters on matrices and determinants, and AP Precalculus covers matrix operations and inverses. Cambridge teaches them in Additional Maths and International A-Level Further Maths. In the UK they sit in Further Maths rather than the main GCSE papers with AQA, Edexcel or OCR, and WASSCE students meet them in Further Mathematics.

In short: check the orders, multiply rows against columns and never element by element, remember AB is not BA, use ad - bc to test whether an inverse exists, and multiply your inverse back to confirm the identity. Matrices reward a careful fixed procedure rather than cleverness, which makes them winnable marks.