Find The Product Of The Following Two Matrices
You're staring at two grids of numbers. Your textbook says "find the product." Your brain says "wait, which way do the rows and columns go again?
Yeah. Been there.
Matrix multiplication is one of those things that looks mechanical on paper but feels completely arbitrary the first few times you try it by hand. The order matters. On the flip side, the rules are specific. One wrong alignment and the whole thing falls apart.
But here's the thing — once it clicks, it stops being a memorized procedure and starts being a tool you can actually use. Whether you're transforming 3D graphics, solving systems of equations, or just trying to pass linear algebra, this skill pays off.
Let's walk through it properly. No rushed formulas. No "just do this." Actual understanding.
What Is Matrix Multiplication
At its core, matrix multiplication is a way of combining two matrices to produce a third one. But it's not element-wise multiplication. That's a different operation entirely (called the Hadamard product, if you're curious). That's the whole idea.
Matrix multiplication is about composition*. Each entry in the result comes from a dot product — a row from the first matrix paired with a column from the second.
The Size Rule
This is the first gatekeeper. You can only multiply two matrices if the number of columns in the first matrix equals the number of rows in the second.
If matrix A is m × n* and matrix B is n × p*, the product AB exists and will be m × p*.
The inner dimensions (n and n) must match. The outer dimensions (m and p) become the size of your answer.
Write it out once: (m × n) × (n × p) → (m × p). Still, the n's "cancel" in a notational sense. This pattern saves you from attempting impossible multiplications.
What the Result Actually Represents
Each entry cᵢⱼ in the product matrix C = AB is computed as:
cᵢⱼ = aᵢ₁b₁ⱼ + aᵢ₂b₂ⱼ + ... + aᵢₙbₙⱼ
That's the dot product of row i from A with column j from B.
So the entry in row 2, column 3 of the result? Now, it comes from row 2 of the first matrix and column 3 of the second. Every single time.
Why It Matters
You might wonder why we multiply matrices this specific way. Why not just multiply corresponding entries like addition?
Because matrix multiplication corresponds to function composition*.
Linear Transformations
Every matrix represents a linear transformation. A 2×2 matrix transforms the 2D plane. A 3×3 matrix transforms 3D space.
When you multiply two matrices, you're composing their transformations. Apply B first, then A. The product AB represents "do B, then do A.
So yes, order deserves the attention it gets. Rotating then scaling is not the same as scaling then rotating. But the matrices don't commute. AB ≠ BA in general.
Real-World Impact
In computer graphics, every 3D model you see in a game goes through a chain of matrix multiplications — model matrix, view matrix, projection matrix. Each vertex gets transformed by the combined product.
In machine learning, neural network layers are essentially matrix multiplications. The weights are matrices. The inputs are vectors (or matrices for batches). Forward propagation is a sequence of matrix products.
In economics, input-output models use matrix multiplication to trace how changes in one sector ripple through others.
This isn't abstract algebra for its own sake. It's the computational backbone of modern applied math.
How to Multiply Matrices Step by Step
Let's do this concretely. I'll walk through a full example, then break down the pattern.
A Complete Worked Example
Multiply:
A = [1 2] [3 4]
B = [5 6] [7 8]
Both are 2×2. Inner dimensions match (2 and 2). Result will be 2×2.
Entry (1,1): Row 1 of A • Column 1 of B = (1)(5) + (2)(7) = 5 + 14 = 19
Entry (1,2): Row 1 of A • Column 2 of B = (1)(6) + (2)(8) = 6 + 16 = 22
Entry (2,1): Row 2 of A • Column 1 of B = (3)(5) + (4)(7) = 15 + 28 = 43
Entry (2,2): Row 2 of A • Column 2 of B = (3)(6) + (4)(8) = 18 + 32 = 50
Result: [19 22] [43 50]
The Finger Method (For Hand Calculation)
When you're doing this by hand on paper, use your fingers. Seriously.
Place your left index finger on the row of A you're working with. Plus, place your right index finger on the column of B. Move them toward each other, multiplying pairs and adding as you go.
For more on this topic, read our article on what is 8 hours from now or check out car loan calculator with extra payments.
Left finger moves right across the row. Right finger moves down the column. They meet in the middle conceptually — each pair multiplied, all summed.
This physical motion builds the muscle memory for "row × column."
Non-Square Matrices
The same rule applies. Let's try a 2×3 times a 3×2.
A = [1 2 3] (2×3) [4 5 6]
B = [7 8] (3×2) [9 10] [11 12]
Inner dimensions: 3 and 3 ✓. Result: 2×2.
Row 1 of A • Column 1 of B: (1)(7) + (2)(9) + (3)(11) = 7 + 18 + 33 = 58
Row 1 of A • Column 2 of B: (1)(8) + (2)(10) + (3)(12) = 8 + 20 + 36 = 64
Row 2 of A • Column 1 of B: (4)(7) + (5)(9) + (6)(11) = 28 + 45 + 66 = 139
Row 2 of A • Column 2 of B: (4)(8) + (5)(10) + (6)(12) = 32 + 50 + 72 = 154
Result: [58 64] [139 154]
Notice how the row count of A (2) and column count of B (2) determine the output shape. The shared dimension (3) disappears — it's the "contraction" dimension.
Multiplying a Matrix by a Vector
A vector is just a matrix with one column (column vector) or one row (row vector).
Matrix × column vector: each entry of the result is a row of the matrix dotted with the vector. Output is a column vector.
Row vector × matrix: each entry is the vector dotted with a column of the matrix. Output is a row vector.
This comes up constantly in practice. The matrix-vector
product is how linear transformations act on vectors — rotating, scaling, projecting. Every graphics engine, every physics simulator, every neural network forward pass relies on this operation millions of times per second.
The General Pattern
For matrices A (m×n) and B (n×p):
- Result C is (m×p)
- Each entry C[i,j] = (row i of A) • (column j of B)
- The dot product sums over the shared dimension n
Symbolically: C[i,j] = Σₖ A[i,k] · B[k,j]
It's why the inner dimensions must match. You can't dot a row of length 3 with a column of length 2.
Key Properties to Remember
Not commutative: AB ≠ BA in general. Sometimes it's not even possible — a 2×3 times a 3×2 gives a 2×2, but reversing the order gives a 3×3.
Associative: (AB)C = A(BC). This lets you chain multiplications and even precompute parts.
Distributive: A(B + C) = AB + AC.
Identity matrix: AI = IA = A. The identity matrix has 1s on the diagonal and 0s elsewhere.
Why This Matters Now More Than Ever
Matrix multiplication isn't just a classroom exercise. It's the engine behind:
- Computer graphics: Transforming 3D scenes into 2D images
- Machine learning: Forward and backward propagation through neural networks
- Data science: Principal component analysis, recommendations, optimization
- Engineering: Solving systems of linear equations, structural analysis
- Economics: Input-output models, portfolio optimization
- Physics: Quantum mechanics, relativity, computational fluid dynamics
Every time you load a webpage with personalized content, stream a video, or use GPS navigation, matrix multiplication is working behind the scenes. Modern GPUs exist largely because they can perform billions of these operations in parallel.
The "row times column" rule isn't arbitrary. It's the mathematical expression of composing linear transformations — taking a vector, applying one transformation, then another. That's exactly what happens when light bounces through a 3D scene, when data flows through layers of a neural network, or when economic forces interact across sectors.
Understanding matrix multiplication deeply — not just memorizing the procedure — gives you a lens for understanding how complex systems compose and interact. It's one of those rare mathematical skills that becomes more valuable the more you use it.
So practice the finger method. Plus, work through examples until the pattern feels natural. Because whether you're debugging a graphics shader, tuning a machine learning model, or analyzing market dynamics, you'll be reaching for this tool again and again.
Latest Posts
Freshly Written
-
Find The Product Of The Following Two Matrices
Aug 02, 2026
-
How Do I Find Out My Lean Body Mass
Aug 02, 2026
-
What Is 1 5 1 5
Aug 02, 2026
-
Conversion Chart From Metric To Standard
Aug 02, 2026
-
Car Payment Estimator With Trade In
Aug 02, 2026
Related Posts
Keep the Momentum
-
How Many Days Until August 4
Aug 01, 2026
-
How Many Days Until February 14
Aug 01, 2026
-
How Many Days Until August 8th
Aug 01, 2026
-
How Many Days Till June 7
Aug 01, 2026
-
What Time Will It Be In 9 Hours
Aug 01, 2026