Matrix Multiplication

Algebra
operation

Also known as: matrix product, multiply matrices, row by column multiplication

Grade 9-12

View on concept map

Multiplying matrices A (m \times n) and B (n \times p) by taking dot products of rows of A with columns of B to produce an m \times p result. Matrix multiplication represents composition of linear transformations.

This concept is covered in depth in our systems of equations with matrices guide, with worked examples, practice problems, and common mistakes.

Definition

Multiplying matrices A (m \times n) and B (n \times p) by taking dot products of rows of A with columns of B to produce an m \times p result.

πŸ’‘ Intuition

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

🎯 Core Idea

Matrix multiplication combines rows and columns through dot products. It is NOT commutative: AB \neq BA in general.

Example

\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix} = \begin{bmatrix} 1 \cdot 5 + 2 \cdot 7 & 1 \cdot 6 + 2 \cdot 8 \\ 3 \cdot 5 + 4 \cdot 7 & 3 \cdot 6 + 4 \cdot 8 \end{bmatrix} = \begin{bmatrix} 19 & 22 \\ 43 & 50 \end{bmatrix}

Formula

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

Notation

AB means multiply A by B (row-by-column). Dimensions: (m \times n)(n \times p) = (m \times p). The inner dimensions must match.

🌟 Why It Matters

Matrix multiplication represents composition of linear transformations. It is the workhorse of computer graphics (rotating/scaling objects), neural networks, and solving systems of equations.

πŸ’­ Hint When Stuck

For each entry, run your finger along the row of the first matrix and down the column of the second, multiplying and summing.

Formal View

For A \in \mathbb{R}^{m \times n}, B \in \mathbb{R}^{n \times p}: (AB)_{ij} = \sum_{k=1}^{n} a_{ik} b_{kj}, yielding AB \in \mathbb{R}^{m \times p}. Matrix multiplication is associative (A(BC) = (AB)C) but not commutative (AB \neq BA in general).

🚧 Common Stuck Point

Matrix multiplication is NOT commutative. AB and BA can give completely different results, or one might not even be defined when the other is.

⚠️ Common Mistakes

  • Multiplying entry by entry (that is the Hadamard product, not standard matrix multiplication)
  • Forgetting to check that inner dimensions match: (m \times n)(n \times p) works, (m \times n)(m \times p) does not
  • Assuming AB = BAβ€”matrix multiplication is not commutative

Frequently Asked Questions

What is Matrix Multiplication in Math?

Multiplying matrices A (m \times n) and B (n \times p) by taking dot products of rows of A with columns of B to produce an m \times p result.

What is the Matrix Multiplication formula?

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

When do you use Matrix Multiplication?

For each entry, run your finger along the row of the first matrix and down the column of the second, multiplying and summing.

How Matrix Multiplication Connects to Other Ideas

To understand matrix multiplication, you should first be comfortable with matrix operations and matrix definition. Once you have a solid grasp of matrix multiplication, you can move on to determinant, inverse matrix and solving systems with matrices.

Want the Full Guide?

This concept is explained step by step in our complete guide:

Solving Systems of Equations: Substitution, Elimination, and Matrices β†’