Matrix Multiplication

Master the rules and techniques for multiplying matrices correctly

Introduction to Matrix Multiplication

Matrix multiplication is more complex than addition or subtraction, but it follows a well-defined rule designed specifically to represent systems of linear equations. Unlike addition and subtraction, matrix multiplication has special conformability requirements and is not commutative.

To maintain consistency with number notation, we use:

  • Lowercase letters for scalars: \(a, b, x, y\)
  • Uppercase letters for matrices: \(A, B, X, Y\)
Key Point:

Matrix multiplication is not commutative: \(A \times B \neq B \times A\) in general. The order of multiplication matters!

Conformability Requirements

The Essential Rule

Multiplication Requirement:

Two matrices can be multiplied only if the number of columns in the first matrix equals the number of rows in the second matrix.

If \(A\) is \(p \times q\) and \(B\) is \(q \times r\), then \(C = A \times B\) is \(p \times r\).

Dimensions and Result Size

Result Dimension:
\(\displaystyle A_{p \times q} \times B_{q \times r} = C_{p \times r}\)

Valid and Invalid Multiplications

Valid Multiplication

A: 2×3 matrix

B: 3×2 matrix

Result: 2×2 matrix

Columns of A = Rows of B ✓

Invalid Multiplication

A: 2×3 matrix

B: 2×2 matrix

Result: Cannot multiply

3 ≠ 2 ✗

Critical Requirement:

Always check that columns of the first matrix = rows of the second matrix. If this condition is not met, multiplication is impossible.

The Multiplication Rule: Dot Product

Understanding the Dot Product

Multiplication Operation:

Each element in the product matrix is calculated by taking the dot product of a row from the first matrix and a column from the second matrix.

The dot product is calculated by multiplying corresponding elements and summing the results.

Dot Product Formula

Computing Element (i,j)
\(\displaystyle c_{ij} = a_{i1}b_{1j} + a_{i2}b_{2j} + a_{i3}b_{3j} + \cdots + a_{iq}b_{qj} = \sum_{k=1}^{q} a_{ik} \cdot b_{kj}\)

Element \((i,j)\) of the product = (Row \(i\) of A) · (Column \(j\) of B)

Simple 2×2 Example

Generic 2×2 Matrices

Multiply Two 2×2 Matrices

Setup:

\(\displaystyle \begin{bmatrix}a & b \\ c & d\end{bmatrix} \times \begin{bmatrix}i & j \\ k & l\end{bmatrix}\)

Conformability check:

  • First matrix: 2×2 (2 columns)
  • Second matrix: 2×2 (2 rows)
  • 2 = 2 ✓ Multiplication is possible, result is 2×2

Calculation:

\(\displaystyle = \begin{bmatrix}a \cdot i + b \cdot k & a \cdot j + b \cdot l \\ c \cdot i + d \cdot k & c \cdot j + d \cdot l\end{bmatrix}\)

Numerical 2×2 Matrices

Multiply Two Numerical 2×2 Matrices

Setup:

\(\displaystyle \begin{bmatrix}1 & 2 \\ 3 & 4\end{bmatrix} \times \begin{bmatrix}5 & 6 \\ 7 & 8\end{bmatrix}\)

Element (1,1): Row 1 · Column 1

\(\displaystyle c_{11} = 1 \cdot 5 + 2 \cdot 7 = 5 + 14 = 19\)

Element (1,2): Row 1 · Column 2

\(\displaystyle c_{12} = 1 \cdot 6 + 2 \cdot 8 = 6 + 16 = 22\)

Element (2,1): Row 2 · Column 1

\(\displaystyle c_{21} = 3 \cdot 5 + 4 \cdot 7 = 15 + 28 = 43\)

Element (2,2): Row 2 · Column 2

\(\displaystyle c_{22} = 3 \cdot 6 + 4 \cdot 8 = 18 + 32 = 50\)

Final Result:

\(\displaystyle = \begin{bmatrix}19 & 22 \\ 43 & 50\end{bmatrix}\)

Complex Example (2×3 × 3×4)

Multiply a 2×3 by a 3×4 Matrix

Setup:

\(\displaystyle A = \begin{bmatrix}1 & 2 & 3 \\ -1 & 4 & 5\end{bmatrix} \quad B = \begin{bmatrix}2 & 3 & -4 & 5 \\ -1 & 0 & -1 & 3 \\ 1 & 2 & 3 & 4\end{bmatrix}\)

Conformability check:

  • A: 2×3 (3 columns)
  • B: 3×4 (3 rows)
  • 3 = 3 ✓ Result is 2×4

First element: Row 1 of A · Column 1 of B

\(\displaystyle c_{11} = (1)(2) + (2)(-1) + (3)(1) = 2 - 2 + 3 = 3\)

Result:

\(\displaystyle C = \begin{bmatrix}3 & 9 & 3 & 23 \\ -1 & 7 & 15 & 27\end{bmatrix}\)

Properties of Matrix Multiplication

Property Formula Notes
Not Commutative \(AB \neq BA\) Order matters! This is very different from numbers
Associative \((AB)C = A(BC)\) Grouping doesn't change the result
Distributive \(A(B + C) = AB + AC\) Over addition on the right
Distributive \((A + B)C = AC + BC\) Over addition on the left
Identity Element \(AI = A\) and \(IA = A\) Identity matrix acts like the number 1

Tips for Matrix Multiplication

Check Conformability First
Verify columns of A = rows of B before starting
Work Systematically
Calculate row-by-row or use organized notation
Use Dot Products
Remember: element = (row) · (column) as dot product
Remember Order Matters
\(AB\) and \(BA\) are generally different operations
Verify Results
Double-check dimensions and a few elements
Use a Calculator
Complex multiplications are error-prone; use tools

Key Points to Remember

  • Matrices can only be multiplied if columns of A = rows of B
  • Result dimension: \(A_{p \times q} \times B_{q \times r} = C_{p \times r}\)
  • Each element is calculated as a dot product: row × column
  • Dot product: multiply corresponding elements and sum
  • Matrix multiplication is NOT commutative: \(AB \neq BA\)
  • Matrix multiplication is associative: \((AB)C = A(BC)\)
  • Identity matrix acts like the number 1: \(AI = IA = A\)
  • Always verify dimensions before and after multiplication
  • Use online calculators to verify complex multiplications

Practice Your Skills

Test your understanding of matrix multiplication with our interactive calculator:

Matrix Multiplication Calculator →






Is this page helpful?            
Thank you for your feedback!

Sorry about that

How can we improve it?