Index Ai Academy
Phase 2 · Math, when you need itLinear algebra

Vectors

About 20 minLooking ahead: some prerequisites aren't done yet

Why this matters

A computer can't look at a customer, a word or a photo. It can only do sums. So before any AI model can work with something, that thing has to become a list of numbers. That list is called a vector. A customer becomes [orders, average spend, days since last visit]. A word becomes a list of a few thousand numbers that capture its meaning. Once you can picture these lists as arrows, the big ideas later in the course (similarity search, neural networks, attention) stop being mysterious. They are all things you do to arrows.

  • See a vector three ways: a list of numbers, a point, and an arrow
  • Read vector notation: bold letters, components, dimension
  • Turn records like customers or campaigns into feature vectors with a fixed order
  • Explain why every input to a model ends up as a vector

Start with a map

Imagine giving directions in a city laid out on a grid: "3 blocks east, 1 block north." Those two numbers, in that order, pin down exactly one place. Swap them ("1 east, 3 north") and you end up somewhere else.

That pair of numbers is a vector. A vector is just a list of numbers where the order matters. [3, 1] and [1, 3] are different vectors, the same way the two sets of directions lead to different corners.

You can picture the same vector in three ways:

  1. A list of numbers, like [3, 1]. This is how code stores it.
  2. A point: walk 3 across and 1 up, and that spot is the vector.
  3. An arrow from the starting corner [0, 0] to that point. An arrow has a direction (which way it points) and a length (how far it goes). Those two things are what make vectors useful for comparing things.