mathematics · beginner · 10 min read · Updated Nov 5, 2026

Matrix Multiplication: Geometry, Dot Products, and Transformations

Master matrix multiplication through row-by-column dot products, dimensional compatibility rules, and interactive visual step tracing.

By Dr. Clara Lindqvist (Head of Applied Mathematics)

Learning Objectives

  • •
    Determine whether two matrices can be multiplied by checking inner dimensions.
  • •
    Compute individual product entries using the row-by-column dot product formula.
  • •
    Understand why matrix multiplication is associative but non-commutative ().
  • •
    Interpret matrix multiplication geometrically as compositions of linear transformations.
Matrix multiplication is the fundamental engine of modern linear algebra, computer graphics, quantum mechanics, and neural networks. Rather than multiplying element-by-element, matrix multiplication combines rows and columns to represent compositions of linear mappings.

Why This Concept Matters

When you rotate a 3D model in a video game, compute PageRank on the web graph, or train an attention layer in a large language model, you are evaluating billions of matrix multiplications. Understanding how rows interact with columns builds intuition for higher-dimensional geometry.

Key Terminology

Dimension Compatibility
Two matrices and can be multiplied if and only if the number of columns in equals the number of rows in .
Dot Product
The sum of the products of corresponding elements from a row vector and a column vector.
Non-Commutativity
In general, matrix multiplication order matters: even when both products are defined.
Identity Matrix ()
A square matrix with ones on the main diagonal and zeros elsewhere; acts as the multiplicative neutral element ().

1. The Dimensional Compatibility Rule

Before attempting to multiply two matrices, you must check their dimensions. If matrix has dimensions (meaning rows and columns) and matrix has dimensions ( rows and columns), their product matrix has dimensions .

The inner dimensions (k) must match exactly; the outer dimensions (m × n) dictate the resulting matrix size.

(1)
— Matrix A has k columns
(2)
— Matrix B has k rows
(3)
— Inner dimension k cancels out
Common Beginner Mistake
Matrix multiplication is not element-wise multiplication (which is called the Hadamard product ). You cannot multiply two matrices using standard matrix multiplication because the inner dimensions and do not match.

2. The Row-by-Column Dot Product Formula

Each element in row and column of the product matrix is obtained by taking the dot product of row of matrix with column of matrix .
Definition · Entry-wise Product Definition
For and , the entry in row and column of is .
Intuition: Slide your left hand across row i of A while sliding your right hand down column j of B, multiplying paired numbers and adding the products together.

3. Interactive Visual Step Tracing

Use the interactive demonstration below to step through each entry calculation. Notice how row highlights in Matrix and column highlights in Matrix intersect to construct each specific element in product Matrix .
Matrix Operation

Interactive 2×2 Matrix Multiplication

Interactive
Matrix A (2×2)
1
2
3
4
×
Matrix B (2×2)
5
6
7
8
=
Product C (2×2)
Calculating Element C[1, 1] — Step 1 of 4
1 × 5 = 5 +2 × 7 = 14 = 19

Row 1 of A dot Column 1 of B: (1 × 5) + (2 × 7) = 5 + 14 = 19

Step 1 of 4
Click any cell in Product Matrix C or use Next Step to trace the exact arithmetic terms contributing to that entry.

4. Worked Example: Step-by-Step Multiplication

Worked Example: Multiplying a 2×3 Matrix by a 3×2 Matrix
Problem:
Given and , compute the product .
1.
Verify Dimensions
Matrix A is 2×3 and Matrix B is 3×2. The inner dimension is 3 for both, so multiplication is defined. The result will be 2×2.
2.
Compute Entry C[1, 1]
Dot product of Row 1 of A and Column 1 of B:
3.
Compute Entry C[1, 2]
Dot product of Row 1 of A and Column 2 of B:
4.
Compute Entry C[2, 1]
Dot product of Row 2 of A and Column 1 of B:
5.
Compute Entry C[2, 2]
Dot product of Row 2 of A and Column 2 of B:
Conclusion:
The resulting product matrix is .

5. Algebraic Properties of Matrix Multiplication

  • Associative Law: for all compatible matrices.
  • Distributive Law: and .
  • Scalar Compatibility: for any scalar .
  • Transpose Product Reversal: (the order of factors reverses upon transposition).

6. Check Your Understanding

Check Your Understanding
If matrix has dimensions and matrix has dimensions , what are the dimensions of the product matrix ?
Flashcard Deck · standard mode

Matrix Multiplication & Linear Transformations

Reinforce inner dimension compatibility, row-by-column dot products, geometric transformations, and non-commutativity with spaced repetition.

Research & Foundations

Academic References & Verification

Foundational research, standard mathematical treatises, and verified peer-reviewed literature supporting this topic.

  1. Retrieval Practice Produces More Learning than Elaborative Studying with Concept Mapping

    Jeffrey D. Karpicke & Janell R. Blunt (2011). Science, 331(6018), 772–775.

    Demonstrates that retrieval practice outperforms elaborative concept mapping for conceptual retention and inferential problem solving.

    Does not imply concept mapping is without value; hierarchical mapping excels at organizing domain schemas, but active retrieval is required to retain them.

Recommended Further Reading

  • Strang, G. (2016). Introduction to Linear Algebra (5th ed.). Wellesley-Cambridge Press.

    The definitive textbook for geometric and algebraic matrix theory.

Computer Science · 10 min read · beginner

Binary Search: Logarithmic Divide-and-Conquer Search

Understand the logarithmic efficiency of binary search, its strict sorted-array precondition, interval halving mechanics, and edge case implementations.

#algorithms#binary-search
Interactive