Math · Algebra Fundamentals · Grade 9-12 · 5 min read

Matrix Multiplication

⚡ In one breath

Matrix multiplication forms ABAB by dotting each row of AA with each column of BB; an m×nm\times n times an n×pn\times p gives m×pm\times p.

📐 The formula

(AB)ij=k=1naikbkj(AB)_{ij} = \sum_{k=1}^{n} a_{ik} \cdot b_{kj}

Orient

The one-line idea, why it matters, and the intuition.

Section 1

Quick Answer

Matrix multiplication forms ABAB by dotting each row of AA with each column of BB; an m×nm\times n times an n×pn\times p gives m×pm\times p. Use it to compose transformations or chain systems. The cue is checking that the inner dimensions (nn) agree before multiplying. Before calculating, ask: Does the column count of AA equal the row count of BB, and am I dotting rows with columns?

Section 2

Why This Matters

It is the operation behind composing linear transformations, applying a system, and inverse matrices, and it is famously non-commutative — ABBAAB\neq BA in general — which reshapes how students think about multiplication. Recognizing it by "Does the column count of AA equal the row count of BB, and am I dotting rows with columns?" — rather than by familiar numbers — is what lets a student tell it apart from matrix addition and scalar multiplication and dot product (vectors) in a mixed problem set.

Section 3

Intuitive Explanation

Each row of AA is a question sheet, each column of BB an answer key of the same length; you score them by multiplying matching entries and summing, and the score lands at that row-column slot. This is the clean version of the idea because the visible structure matches the concept before any formula or procedure is chosen.

Multiplying entrywise like addition — ABAB is NOT aijbija_{ij}\cdot b_{ij}; it is the sum of products along a row and a column. That contrast matters because many wrong answers come from recognizing a surface feature, such as a familiar number or word, instead of the actual task.

A useful way to slow down is to name the signal words and then test them. Words like **row by column**, **dot product of rows and columns**, **inner dimensions match**, **ABAB**, **(m×n)(n×p)(m\times n)(n\times p)** are helpful clues, but they are not enough by themselves. They must point to the same structure as the mental model: Each result entry is the dot product of a row of AA with a column of BB, and inner dimensions must match.

The recognition test is simple: Does the column count of AA equal the row count of BB, and am I dotting rows with columns? If yes, matrix multiplication is probably the right tool; if not, compare with Matrix addition or Scalar multiplication or Dot product (vectors) before calculating.

Core idea

Each result entry is the dot product of a row of AA with a column of BB, and inner dimensions must match.

Recognize

The cues that signal this concept and how to distinguish it from look-alikes.

Section 4

When to Use

Use Matrix Multiplication when you compose two matrices and the columns of the first match the rows of the second. Strong signals include **row by column**, **dot product of rows and columns**, **inner dimensions match**, **ABAB**, **(m×n)(n×p)(m\times n)(n\times p)**. The safest workflow is to read the final question first, identify what kind of answer it wants, and then test the structure. Do not use matrix multiplication just because familiar numbers appear; first decide whether the situation answers "Does the column count of AA equal the row count of BB, and am I dotting rows with columns?" with yes.

✨ Pro tip

Ask: Does the column count of AA equal the row count of BB, and am I dotting rows with columns?

Section 5

How to Recognize It

Before using Matrix Multiplication, check the structure of the problem, not just the vocabulary. These questions force the same recognition move from several angles: the task, the signal words, the nearest confusion, and the thing that would make the concept fail.

  1. Does the column count of AA equal the row count of BB, and am I dotting rows with columns?

    If yes, the problem matches matrix multiplication. If no, pause before applying the procedure, because the same numbers may belong to a different idea.

  2. Which words signal the structure?

    Look for row by column, dot product of rows and columns, inner dimensions match, ABAB. These words are useful only after the situation matches them; a keyword without structure is not proof.

  3. What is the nearest confusion?

    Matrix addition is the common trap here: Combines entrywise; needs identical dimensions. Compare the desired final answer before choosing a method.

  4. What answer form should I expect?

    The answer should fit this mental model: Each result entry is the dot product of a row of AA with a column of BB, and inner dimensions must match. If the expected answer sounds more like matrix addition, use the comparison table before solving.

  5. What would make this NOT Matrix Multiplication?

    Multiplying entrywise like addition — ABAB is NOT aijbija_{ij}\cdot b_{ij}; it is the sum of products along a row and a column. This tells you when to switch tools instead of forcing the concept.

Section 6

Matrix Multiplication vs Common Confusions

The hard part is recognizing when the task is really about matrix multiplication instead of a nearby idea. Read the final answer the problem wants, then ask which row describes the structure before you start calculating.

Matrix Multiplication

Meaning
Use this when you compose two matrices and the columns of the first match the rows of the second. The deciding question is: Does the column count of AA equal the row count of BB, and am I dotting rows with columns?
Key test
Does the column count of $A$ equal the row count of $B$, and am I dotting rows with columns?
Formula
(AB)ij=k=1naikbkj(AB)_{ij} = \sum_{k=1}^{n} a_{ik} \cdot b_{kj}
Example
Compute ABAB for A=[1234]A=\begin{bmatrix}1&2\\3&4\end{bmatrix}, B=[5678]B=\begin{bmatrix}5&6\\7&8\end{bmatrix}.

Matrix addition

Meaning
Combines entrywise; needs identical dimensions.
Key test
Use when joining same-size matrices with $+$, not composing them.
Formula
(A+B)ij=aij+bij(A+B)_{ij}=a_{ij}+b_{ij}
Example
2×22\times2 plus 2×22\times2

Scalar multiplication

Meaning
Multiplies a matrix by a single number.
Key test
Use when the multiplier is a plain number, not a matrix.
Formula
(kA)ij=kaij(kA)_{ij}=k\,a_{ij}
Example
3A3A

Dot product (vectors)

Meaning
The single-number building block of each entry.
Key test
Use when multiplying one row vector by one column vector.
Formula
uv=uivi\mathbf{u}\cdot\mathbf{v}=\sum u_iv_i
Example
1,23,4=11\langle1,2\rangle\cdot\langle3,4\rangle=11

Apply

Worked examples and the mistakes most students make.

Section 7

Formula & Notation

(AB)ij=k=1naikbkj(AB)_{ij} = \sum_{k=1}^{n} a_{ik} \cdot b_{kj}
For ARm×nA \in \mathbb{R}^{m \times n}, BRn×pB \in \mathbb{R}^{n \times p}: (AB)ij=k=1naikbkj(AB)_{ij} = \sum_{k=1}^{n} a_{ik} b_{kj}, yielding ABRm×pAB \in \mathbb{R}^{m \times p}. Matrix multiplication is associative (A(BC)=(AB)C)(A(BC) = (AB)C) but not commutative (ABBAAB \neq BA in general).

How to read it: ABAB means multiply AA by BB (row-by-column). Dimensions: (m×n)(n×p)=(m×p)(m \times n)(n \times p) = (m \times p). The inner dimensions must match.

Section 8

Worked Examples

Example 1 — Multiply two matrices

Easy

Problem

Compute ABAB for A=[1234]A=\begin{bmatrix}1&2\\3&4\end{bmatrix}, B=[5678]B=\begin{bmatrix}5&6\\7&8\end{bmatrix}.

Solution

  1. Both 2×22\times2, inner dimensions match, so result is 2×22\times2.

    Name the structure before touching arithmetic — that is what makes the right method obvious.

  2. Ask the recognition question: Does the column count of AA equal the row count of BB, and am I dotting rows with columns?

    If the answer is yes, the concept applies; the cue, not a keyword, decides the method.

  3. Dot row 1 with col 1: 15+27=191\cdot5+2\cdot7=19; continue for each slot.

    The rule is chosen only after the structure matches, so the steps mean something.

  4. [15+2716+2835+4736+48]=[19224350]\begin{bmatrix}1\cdot5+2\cdot7&1\cdot6+2\cdot8\\3\cdot5+4\cdot7&3\cdot6+4\cdot8\end{bmatrix}=\begin{bmatrix}19&22\\43&50\end{bmatrix}.

    Keep units, shape, or answer form tied to the story so the work does not become symbol pushing.

  5. Check the answer against the original question.

    It should fit the mental model — row of a dotted with column of b. If it does not, revisit the recognition step before changing the arithmetic.

Answer

[19224350]\begin{bmatrix}19&22\\43&50\end{bmatrix}

Takeaway: Row-by-column dot products fill each result entry.

Example 2 — Addition, not multiplication

Standard

Problem

Compute A+BA+B for the same matrices.

Solution

  1. Notice why this looks like the same concept.

    Nearby language or numbers can tempt you toward row of a dotted with column of b.

  2. A plus sign means entrywise addition, not row-by-column dotting.

    Spotting what actually changed is what separates this from the concept it resembles.

  3. Add aligned entries instead of dotting rows with columns.

    The nearby idea may share numbers but answers a different question, so it needs a different move.

  4. State the result in the language of the actual task.

    [681012]\begin{bmatrix}6&8\\10&12\end{bmatrix}. Name it for what the problem really asked, not the concept you first expected.

  5. Say the contrast in one sentence.

    ++ is entrywise; ABAB is row-times-column.

Answer

[681012]\begin{bmatrix}6&8\\10&12\end{bmatrix}

Takeaway: ++ is entrywise; ABAB is row-times-column.

Example 3 — Spot the trap: Row of A dotted with column of B

Application

Problem

A student starts with this idea: "Multiplying when inner dimensions disagree" What should they check before accepting that reasoning?

Solution

  1. Pause before the first move.

    The first move is a decision, not a calculation — does the situation really match row of a dotted with column of b.

  2. Run the recognition test: Does the column count of AA equal the row count of BB, and am I dotting rows with columns?

    This is the single check that the trap skips.

  3. (2×3)(2×2)(2\times3)(2\times2) is undefined; the inner numbers must match.

    Stating the safer rule turns the mistake into a checkable step instead of a vague "be careful."

  4. Compare with the nearest confusion, Matrix addition.

    Combines entrywise; needs identical dimensions.

  5. State the corrected decision and reuse it.

    Using the concept only when the structure matches leaves a process the student can repeat on a new problem.

Answer

(2×3)(2×2)(2\times3)(2\times2) is undefined; the inner numbers must match.

Takeaway: The recognition step prevents the common trap: Multiplying when inner dimensions disagree

Section 9

Common Mistakes

Common slip-up

Multiplying when inner dimensions disagree

The right idea

(2×3)(2×2)(2\times3)(2\times2) is undefined; the inner numbers must match.

Common slip-up

Assuming AB=BAAB=BA

The right idea

matrix multiplication is generally non-commutative, so order matters.

Common slip-up

Multiplying entrywise

The right idea

each result entry is a row-by-column SUM of products, not a single product.

Practice

Try it, then see where this concept fits in the path.

Section 10

Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. What clue tells you this is a Matrix Multiplication situation: Compute ABAB for A=[1234]A=\begin{bmatrix}1&2\\3&4\end{bmatrix}, B=[5678]B=\begin{bmatrix}5&6\\7&8\end{bmatrix}.

    Hint: Does the column count of AA equal the row count of BB, and am I dotting rows with columns?

  2. Compute ABAB for A=[1234]A=\begin{bmatrix}1&2\\3&4\end{bmatrix}, B=[5678]B=\begin{bmatrix}5&6\\7&8\end{bmatrix}.

    Hint: Dot row 1 with col 1: 15+27=191\cdot5+2\cdot7=19; continue for each slot.

  3. Why is this a contrast case instead of Matrix Multiplication: Compute A+BA+B for the same matrices.

    Hint: A plus sign means entrywise addition, not row-by-column dotting.

  4. Fix this thinking: Multiplying when inner dimensions disagree

    Hint: Name the recognition cue before choosing a rule.

  5. Which is the better fit here: Matrix Multiplication or Matrix addition? Explain the deciding difference.

    Hint: For Matrix Multiplication, ask: Does the column count of AA equal the row count of BB, and am I dotting rows with columns?

  6. Write one sentence that would remind a classmate how to recognize Matrix Multiplication.

    Hint: Use the mental model "Row of A dotted with column of B." and one signal word.

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Section 11

Frequently Asked Questions

How do I know when to use Matrix Multiplication?

Use Matrix Multiplication when you compose two matrices and the columns of the first match the rows of the second. Do not start from the numbers alone; first name the structure of the situation. The fastest check is: Does the column count of AA equal the row count of BB, and am I dotting rows with columns? If the answer is yes and the wording matches cues like row by column, dot product of rows and columns, inner dimensions match, then matrix multiplication is probably the right tool.

What is Matrix Multiplication most often confused with?

Matrix Multiplication is often confused with Matrix addition. Matrix addition means Combines entrywise; needs identical dimensions. The difference is not just vocabulary; it changes the action you take. For matrix multiplication, the key test is "Does the column count of AA equal the row count of BB, and am I dotting rows with columns?" For matrix addition, the better cue is: Use when joining same-size matrices with ++, not composing them.

What is the fastest recognition cue for Matrix Multiplication?

Look for row by column, dot product of rows and columns, inner dimensions match, ABAB, but treat those words as clues, not proof. A word problem can contain a familiar keyword and still ask for a different idea. After noticing the cue, ask the recognition question: Does the column count of AA equal the row count of BB, and am I dotting rows with columns? That question protects you from using a memorized procedure in the wrong place.

What mistake should I avoid with Matrix Multiplication?

Avoid this thinking: "Multiplying when inner dimensions disagree" That mistake usually happens when the student jumps to a rule before checking the situation. The safer version is: (2×3)(2×2)(2\times3)(2\times2) is undefined; the inner numbers must match. A good habit is to say the mental model out loud first: "Row of A dotted with column of B." Then choose the calculation or representation.

How can I tell this apart from Scalar multiplication?

Scalar multiplication is the better fit when the task is about this: Multiplies a matrix by a single number. Matrix Multiplication is the better fit when you compose two matrices and the columns of the first match the rows of the second. If both ideas seem possible, compare what the problem wants as the final answer. The desired output often reveals whether you should use matrix multiplication or switch to the nearby concept.

Why does Matrix Multiplication matter?

It is the operation behind composing linear transformations, applying a system, and inverse matrices, and it is famously non-commutative — ABBAAB\neq BA in general — which reshapes how students think about multiplication. The practical value is recognition: once you can spot matrix multiplication, you can choose a method before calculating. That makes later topics easier because you are not memorizing isolated tricks; you are recognizing the same structure when it appears in a new representation.

Section 12

Learning Path

Before this, students should be comfortable with Matrix Addition, Subtraction, and Scalar Multiplication and Matrix Definition. This page focuses on the recognition cue: Does the column count of $A$ equal the row count of $B$, and am I dotting rows with columns? That cue is the bridge between earlier skills and later problem solving: students first learn to identify the structure, then they learn which calculation, diagram, graph, or proof move belongs to it. After this, Determinant and Inverse Matrix become easier to recognize.

Section 13

See Also