The Math Toolkit: Vectors & Matrices
You do not need a math degree to understand AI, but a handful of linear algebra ideas show up constantly — in how data is represented, how a neuron combines its inputs, and how an image is stored. This module covers exactly the ideas you'll need, and no more.
What is a vector?
A vector is just an ordered list of numbers. In AI, a vector is how you represent "one thing" as numbers a computer can work with. A house might be represented as the vector meaning (square feet, bedrooms, bathrooms, age in years). A word can be represented as a vector too (more on that in Module 10). Geometrically, a 2-number vector like is an arrow from the origin to the point (4, 2).
The dot product
The single most important operation in this whole guide is the dot product. Given two vectors of the same length, multiply their matching entries together and add up the results:
Geometrically, the dot product tells you how much two vectors point in the same direction. A large positive dot product means they're aligned; a dot product near zero means they're roughly perpendicular (unrelated); a negative dot product means they point in opposite directions. Try it below.
What is a matrix?
A matrix is a grid of numbers — think of it as a stack of vectors, or a table with rows and columns. Matrices show up in two places you'll care about here: an entire dataset is usually stored as a matrix (one row per example, one column per feature), and a digital image is literally a matrix of brightness values (you'll see this directly in Module 9).
Multiplying a vector by a matrix is, under the hood, just a series of dot products — one between the input vector and each row of the matrix. That single fact is why "matrix multiplication" is the operation GPUs are built to do extremely fast, and why it powers nearly all of modern deep learning.