Matrix Multiplication Examples in Math

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Matrix Multiplication.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Math.

Concept Recap

Multiplying matrices AA (mΓ—nm \times n) and BB (nΓ—pn \times p) by taking dot products of rows of AA with columns of BB to produce an mΓ—pm \times p result.

Imagine each row of AA as a question and each column of BB as an answer key. You 'grade' each row against each column by multiplying corresponding entries and summing. This is why column count of AA must match row count of BBβ€”the question and answer key must have the same length.

Read the full concept explanation β†’

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

What to Focus On

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

Common stuck point: The procedure for matrix multiplication is the easy part; the trap is multiplying when inner dimensions disagree. Asking "Does the column count of AA equal the row count of BB, and am I dotting rows with columns?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

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

Worked Examples

Example 1

medium
Compute [1234][5678]\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix}.

Answer

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

First step

1
Step 1: Entry (1,1)(1,1): 1β‹…5+2β‹…7=5+14=191 \cdot 5 + 2 \cdot 7 = 5 + 14 = 19.

See the full worked solution + why-it-works coaching

SetupKey insightWhy it worksCommon pitfallConnection

Unlock answer keys One Family plan β€” every worked solution, all subjects

Example 2

hard
Compute [20βˆ’1132][14βˆ’1]\begin{bmatrix} 2 & 0 & -1 \\ 1 & 3 & 2 \end{bmatrix} \begin{bmatrix} 1 \\ 4 \\ -1 \end{bmatrix}.

Example 3

challenge
Use the Fibonacci matrix identity Fn=(Fn+1FnFnFnβˆ’1)F^n=\begin{pmatrix} F_{n+1} & F_n \\ F_n & F_{n-1} \end{pmatrix} and Fm+n=FmFnF^{m+n}=F^m F^n to derive an identity relating Fm+nF_{m+n} to Fm,Fmβˆ’1,Fn,Fn+1F_m, F_{m-1}, F_n, F_{n+1}.

Practice Problems

Try these problems on your own first, then open the solution to compare your method.

Example 1

easy
Can you multiply a 2Γ—32 \times 3 matrix by a 2Γ—32 \times 3 matrix? Why or why not?

Example 2

medium
Compute [1001][3βˆ’257]\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 3 & -2 \\ 5 & 7 \end{bmatrix}.

Example 3

easy
Compute the dot product for the product entry: row (12)\begin{pmatrix} 1 & 2 \end{pmatrix} times column (34)\begin{pmatrix} 3 \\ 4 \end{pmatrix}.

Example 4

easy
What are the dimensions of ABAB if AA is 2Γ—32 \times 3 and BB is 3Γ—23 \times 2?

Example 5

easy
Compute (1001)(5678)\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}\begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix}.

Example 6

easy
Compute (2003)(11)\begin{pmatrix} 2 & 0 \\ 0 & 3 \end{pmatrix}\begin{pmatrix} 1 \\ 1 \end{pmatrix}.

Example 7

easy
Can you multiply a 2Γ—32 \times 3 matrix by a 2Γ—32 \times 3 matrix?

Example 8

easy
Compute (1234)(10)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\begin{pmatrix} 1 \\ 0 \end{pmatrix}.

Example 9

easy
Compute the (1,1) entry of (2103)(4567)\begin{pmatrix} 2 & 1 \\ 0 & 3 \end{pmatrix}\begin{pmatrix} 4 & 5 \\ 6 & 7 \end{pmatrix}.

Example 10

easy
Is matrix multiplication commutative in general?

Example 11

medium
Compute (1234)(5678)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix}.

Example 12

medium
Compute (2113)(1021)\begin{pmatrix} 2 & 1 \\ 1 & 3 \end{pmatrix}\begin{pmatrix} 1 & 0 \\ 2 & 1 \end{pmatrix}.

Example 13

medium
Show that AB≠BAAB \neq BA for A=(1101)A = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}, B=(1011)B = \begin{pmatrix} 1 & 0 \\ 1 & 1 \end{pmatrix}. Compute ABAB.

Example 14

medium
Compute (123)(456)\begin{pmatrix} 1 & 2 & 3 \end{pmatrix}\begin{pmatrix} 4 \\ 5 \\ 6 \end{pmatrix}.

Example 15

medium
Compute (23)(14)\begin{pmatrix} 2 \\ 3 \end{pmatrix}\begin{pmatrix} 1 & 4 \end{pmatrix}.

Example 16

medium
Compute A2A^2 for A=(0110)A = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}.

Example 17

medium
Compute (3002)(1234)\begin{pmatrix} 3 & 0 \\ 0 & 2 \end{pmatrix}\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}.

Example 18

medium
Compute (1201)(3124)\begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix}\begin{pmatrix} 3 & 1 \\ 2 & 4 \end{pmatrix}.

Example 19

medium
Compute the (2,1) entry of (1234)(5061)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\begin{pmatrix} 5 & 0 \\ 6 & 1 \end{pmatrix}.

Example 20

challenge
Find a nonzero 2Γ—22 \times 2 matrix AA with A2=0A^2 = 0 (the zero matrix). Give one example and verify.

Example 21

challenge
If A=(1101)A = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}, find A3A^3.

Example 22

challenge
For A=(2002)A = \begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix} and any 2Γ—22 \times 2 matrix BB, why does AB=BAAB = BA? Compute ABAB for B=(1357)B = \begin{pmatrix} 1 & 3 \\ 5 & 7 \end{pmatrix}.

Example 23

easy
Can a 3Γ—43 \times 4 matrix be multiplied (on the right) by a 5Γ—25 \times 2 matrix?

Example 24

easy
Compute (0000)(5678)\begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix} \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix}.

Example 25

easy
For AA a 3Γ—33\times 3 matrix, what are the dimensions of A4A^4?

Example 26

easy
True/false: matrix multiplication is associative β€” (AB)C=A(BC)(AB)C = A(BC) whenever defined.

Example 27

medium
Compute (1βˆ’120)(3412)\begin{pmatrix} 1 & -1 \\ 2 & 0 \end{pmatrix}\begin{pmatrix} 3 & 4 \\ 1 & 2 \end{pmatrix}.

Example 28

medium
Compute (123014)(10011βˆ’1)\begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \end{pmatrix}\begin{pmatrix} 1 & 0 \\ 0 & 1 \\ 1 & -1 \end{pmatrix}.

Example 29

medium
For A=(1101)A=\begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}, compute A2A^2.

Example 30

medium
Compute (1234)(0110)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} and explain the geometric effect.

Example 31

medium
Compute (0110)(1234)\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} and explain.

Example 32

medium
For A=(1234)A=\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} and B=(0110)B=\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, compute both ABAB and BABA, showing they differ.

Example 33

medium
Show that (AB)T=BTAT(AB)^T = B^T A^T by computing both sides for A=(1234)A=\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}, B=(5006)B=\begin{pmatrix} 5 & 0 \\ 0 & 6 \end{pmatrix}.

Example 34

medium
Compute (200030005)(111)\begin{pmatrix} 2 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & 5 \end{pmatrix} \begin{pmatrix} 1 \\ 1 \\ 1 \end{pmatrix}.

Example 35

medium
Compute (1111)2\begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}^2.

Example 36

medium
For the rotation matrix R(ΞΈ)=(cosβ‘ΞΈβˆ’sin⁑θsin⁑θcos⁑θ)R(\theta)=\begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix}, compute R(ΞΈ)R(Ο•)R(\theta)R(\phi).

Example 37

hard
For A=(1101)A = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}, find a closed form for AnA^n.

Example 38

hard
Find A2A^2 for A=(123012001)A = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 2 \\ 0 & 0 & 1 \end{pmatrix}.

Example 39

hard
Find a 2Γ—22\times 2 matrix AA with A2=βˆ’IA^2 = -I.

Example 40

hard
Find 2×22\times 2 matrices A,BA,B with AB=0AB = 0 but A,B≠0A,B \ne 0.

Example 41

hard
Compute (1234)(βˆ’213/2βˆ’1/2)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\begin{pmatrix} -2 & 1 \\ 3/2 & -1/2 \end{pmatrix}.

Example 42

hard
For the projection matrix P=12(1111)P = \tfrac{1}{2}\begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}, compute P2P^2 and explain.

Example 43

challenge
For Fibonacci matrix F=(1110)F = \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix}, compute F3F^3 and identify the entries.

Background Knowledge

These ideas may be useful before you work through the harder examples.

matrix operationsmatrix definition