LINEAR ALGEBRA • SYSTEMS OF LINEAR EQUATIONS & MATRICES

Matrix-Vector Products

Learn how multiplying a matrix by a vector transforms data and solves systems of equations in one elegant operation.

Historical Context & Motivation

For centuries, mathematicians and scientists struggled with systems of equations — groups of equations that share the same unknowns. Solving two equations with two unknowns is manageable, but what about ten equations with ten unknowns? Or a thousand? The matrix-vector product was developed as a compact, powerful way to represent and solve these massive systems all at once.

~200 BCE
Ancient Chinese Systems
The Chinese mathematical text The Nine Chapters on the Mathematical Art solved systems of equations using rectangular arrays of numbers — early tables that resembled matrices.
1850
Sylvester Coins 'Matrix'
James Joseph Sylvester introduced the word matrix (Latin for 'womb') to describe a rectangular array of numbers that could generate determinants and solutions.
1858
Cayley Formalizes Matrix Algebra
Arthur Cayley published rules for adding, multiplying, and inverting matrices. He showed how a matrix times a vector produces a new vector — the matrix-vector product.
1940s–1960s
Computers Embrace Matrices
Early computers used matrix-vector products to solve engineering and physics problems. This operation became a building block for computer graphics, data science, and artificial intelligence.

So here's the big question: how do you take a grid of numbers (a matrix) and combine it with a column of numbers (a vector) to get a meaningful result? That is exactly what the matrix-vector product answers.

Core Principles & Definitions

Before you can multiply a matrix by a vector, you need to understand the key vocabulary. A matrix is a rectangular array of numbers arranged in rows and columns. A vector is a single column (or row) of numbers. When we multiply a matrix by a vector, each row of the matrix 'interacts' with the vector to produce one number in the result.

1

Matrix Dimensions

A matrix with m rows and n columns is called an m × n matrix. Always state rows first, then columns.
2

Vector as a Column

In a matrix-vector product, the vector is written as a column — an n × 1 matrix. The number of entries in the vector must match the number of columns in the matrix.
3

Dot Product Row by Row

Each entry in the result comes from a dot product: multiply matching entries of a row and the vector, then add them up.
4

Result Is a Vector

Multiplying an m × n matrix by an n × 1 vector always gives an m × 1 vector. The inner dimensions must match; the outer dimensions shape the answer.
KEY TAKEAWAY
Think of the matrix as a recipe book and the vector as your list of ingredient amounts. Each row of the matrix is a different recipe that tells you how much of each ingredient to use. The matrix-vector product gives you the total for every recipe at once — like a chef calculating all the meal totals from one shopping list.

Visual Explanation

The diagram below shows exactly what happens when a 2 × 3 matrix multiplies a 3 × 1 vector. Each row of the matrix pairs with the vector through a dot product to produce one entry in the result vector.

The matrix A has 2 rows and 3 columns. The vector x has 3 entries. Since the 3 columns of A match the 3 entries of x, the product is defined and produces a 2 × 1 result vector b. Each colored row shows how its dot product with x generates one entry of b.

Notice the pattern: the first row of the matrix pairs with the vector to create the first entry of the result (12), and the second row creates the second entry (14). Each pairing uses the dot product: multiply matching positions, then add.

Mathematical Framework

Let's write the matrix-vector product using formal notation. If A is an m × n matrix and x is an n × 1 column vector, then the product Ax is an m × 1 column vector whose entries are computed using dot products.

GENERAL ENTRY FORMULA
bᵢ = aᵢ₁x₁ + aᵢ₂x₂ + … + aᵢₙxₙ
Here, bᵢ is the i-th entry of the result vector; aᵢⱼ is the entry in row i, column j of A; and xⱼ is the j-th entry of the vector x.
SUMMATION NOTATION
bᵢ = Σⱼ₌₁ⁿ aᵢⱼ xⱼ for i = 1, 2, …, m
This compact form says: for each row i, multiply every entry in that row by the corresponding entry of x, then sum all the products.
DIMENSION RULE
(m × n) · (n × 1) = (m × 1)
The inner dimensions (both n) must be equal for the product to exist. The outer dimensions (m and 1) give you the size of the result.
💡 Linear Combination View
There's a second way to see Ax. Instead of taking dot products row by row, you can think of the result as a linear combination of the columns of A, where the entries of x are the weights. For example, if x = [1, 4, 2], then Ax = 1·(column 1) + 4·(column 2) + 2·(column 3). Both views always give the same answer.

Row View vs. Column View

One of the most powerful ideas in linear algebra is that a matrix-vector product can be understood in two completely equivalent ways. The row view computes each entry of the result using a dot product. The column view assembles the result by scaling and adding the columns of the matrix. The diagram below shows both perspectives side by side using the same numbers.

The left panel shows the row view, where each entry of b comes from a dot product. The right panel shows the column view, where the result is built by scaling each column of A by the corresponding entry of x and then adding. Both yield b = [12, 14].

Why learn two viewpoints? The row view is great for calculations — you go row by row and crank out answers. The column view is great for understanding — it shows that a matrix-vector product creates a new vector by blending the columns of the matrix in proportions given by the vector. This column perspective becomes essential when you study transformations, span, and linear independence later on.

Worked Example

Let's work through a full matrix-vector product step by step. Suppose a small business tracks the prices of three items (a shirt, a hat, and a pair of shoes) across two stores using a matrix, and a customer buys a certain number of each item.

Finding Total Cost at Each Store
1
Step 1 — Identify the Matrix and VectorThe price matrix P is a 2 × 3 matrix where each row is a store and each column is an item. Store 1 charges $15 for a shirt, $10 for a hat, and $50 for shoes. Store 2 charges $18, $8, and $45. The quantity vector q = [2, 3, 1] represents 2 shirts, 3 hats, and 1 pair of shoes.
P is 2 × 3; q is 3 × 1. The product Pq will be a 2 × 1 vector (one total per store).
2
Step 2 — Check DimensionsP has 3 columns and q has 3 entries. Since the number of columns in P matches the number of rows in q, the product is defined.
(2 × 3) · (3 × 1) → inner dimensions match (3 = 3) → result is 2 × 1. ✓
3
Step 3 — Compute Row 1 Dot Product (Store 1 Total)Take row 1 of P: [15, 10, 50]. Multiply each entry by the corresponding entry of q: (15 × 2) + (10 × 3) + (50 × 1) = 30 + 30 + 50.
Store 1 total = $110
4
Step 4 — Compute Row 2 Dot Product (Store 2 Total)Take row 2 of P: [18, 8, 45]. Multiply each entry by the corresponding entry of q: (18 × 2) + (8 × 3) + (45 × 1) = 36 + 24 + 45.
Store 2 total = $105
5
Step 5 — Write the Result VectorThe result vector b = [110, 105] tells us the total cost at each store. The customer would save $5 by shopping at Store 2.
Pq = [110, 105]ᵀ

Key Properties & Common Pitfalls

The matrix-vector product obeys some important algebraic rules, but there are also traps that students fall into. The table below summarizes the main properties alongside common mistakes to avoid.

Properties and common pitfalls of matrix-vector products
Property / RuleWhat It MeansWatch Out For
DistributiveA(x + y) = Ax + Ay. You can add vectors first or multiply first — same result.This only works with vector addition, not mixing different matrices.
Scalar factoringA(cx) = c(Ax). You can pull a constant out of the product.The scalar c must be a single number, not another matrix.
Not commutativeAx ≠ xA in general. The order matters — you cannot swap the matrix and the vector.xA often doesn't even make sense dimensionally (a column times a matrix is undefined).
Dimension requirementNumber of columns in A must equal number of entries in x.If the dimensions don't match, the product is undefined — you cannot force it.
Identity matrixIx = x. The identity matrix (1s on the diagonal, 0s elsewhere) leaves any vector unchanged.The identity must be the right size — an n × n identity works with an n × 1 vector.
KEY TAKEAWAY
Matrix-vector multiplication is like a one-way street: the matrix must come first, the vector second, and their inner dimensions must agree. Unlike regular number multiplication (where 3 × 5 = 5 × 3), you cannot reverse the order with matrices and vectors. Always check dimensions before you start computing.

Connection to Systems of Equations & Beyond

One of the most exciting facts about matrix-vector products is that they give us a compact way to write an entire system of linear equations. Instead of writing out every equation separately, you pack the coefficients into a matrix, the unknowns into a vector, and set the product equal to a result vector.

Comparing traditional systems with matrix-vector notation
Traditional FormMatrix-Vector Form
2x + y = 5 and 3x − 4y = 2 (two separate equations)Ax = b where A = [[2, 1], [3, −4]], x = [x, y], b = [5, 2]
Need to solve each equation by substitution or eliminationCan use matrix methods: row reduction, inverses, or computer algorithms
Hard to handle when there are many equations and unknownsScales easily — computers solve millions of equations using the same Ax = b framework

As you move deeper into linear algebra, you'll discover that matrix-vector products also describe linear transformations — operations that stretch, rotate, reflect, or shear shapes in space. Every time a video game rotates a 3D character or a phone applies a photo filter, a matrix-vector product is doing the heavy lifting behind the scenes.

Practice Problems

PROBLEM 1CONCEPTUAL
A matrix A is 4 × 3 and a vector x is 3 × 1. What are the dimensions of the product Ax? Explain why the product is defined.
PROBLEM 2BASIC CALCULATION
Compute the product Ax where A = [[3, 2], [1, 5]] and x = [4, 1].
PROBLEM 3INTERMEDIATE
Let A = [[1, 0, −2], [3, 1, 4], [0, 2, 1]] and x = [2, −1, 3]. Compute Ax.
PROBLEM 4APPLIED
A nutrition matrix N has rows for calories, protein (g), and fat (g), and columns for eggs, toast, and juice. N = [[90, 70, 110], [6, 2, 1], [7, 1, 0]]. A student eats 2 eggs, 3 slices of toast, and 1 glass of juice. Set up and compute the matrix-vector product to find total calories, protein, and fat.
PROBLEM 5CRITICAL THINKING
Consider the system of equations: 2x + 3y = 11 and 4x − y = 9. Rewrite this system in the form Ax = b using a matrix-vector product. Then verify that x = [2, y = [... wait, that x = 2, y = 7/3... Actually, verify that x = [2, 7/3] is NOT a solution by substituting into Ax and checking whether it equals b.

Summary

A matrix-vector product multiplies an m × n matrix by an n × 1 vector to produce an m × 1 result vector. Each entry of the result comes from a dot product between one row of the matrix and the entire vector. The inner dimensions must match — that is, the number of columns of the matrix must equal the number of entries in the vector.

You can also view the product as a linear combination of the columns of the matrix, weighted by the entries of the vector. This operation is distributive and allows scalar factoring, but it is not commutative. Matrix-vector products let you write entire systems of linear equations in the compact form Ax = b, making them the gateway to powerful solution methods and linear transformations.

Varsity Tutors • Linear Algebra • Matrix-Vector Products