Lecture 6: Vectors: More Than Just Arrows, They’re AI’s Building Blocks

Series: The Sequentia Lectures: Unlocking the Math of AI
Part 2: The AI Toolkit: Linear Algebra
Lecture 6: Vectors: More Than Just Arrows, They’re AI’s Building Blocks

Welcome to Part 2 of the Sequentia Lectures! In Part 1, we built a strong conceptual foundation, understanding AI models as recipes, data as numbers, and learning as a puzzle of finding a hidden function. Now, it’s time to open our mathematical toolkit. And the first, most essential tool we’ll pull out is the vector.

You might remember vectors from physics or high school math class as arrows with a specific direction and magnitude. While that’s one interpretation, in the world of AI, it’s more useful to think of a vector in its purest form: an ordered list of numbers.

That’s it. A vector is simply a list of numbers in a specific order. But this simple structure is the fundamental “noun” of the AI universe—it’s the building block used to represent everything.

From Data to Vectors

In Lecture 2, we discussed how AI turns our world into numbers. We now have the formal name for those numerical representations: vectors.

  • A User’s Movie Ratings: Imagine you’ve rated three movies (on a scale of 1-5): The MatrixInception, and Toy Story. Your “taste profile” can be represented as a vector:
    [5, 5, 3]
    This is a 3-dimensional vector because it has three numbers. Each number (or “element”) corresponds to a specific feature (a specific movie).
  • A House’s Features: A house for sale could be described by its square footage, number of bedrooms, and age in years. It can be represented as a vector:
    [1500, 3, 25]
  • An Image’s Pixels: A tiny 2×2 grayscale image, where each pixel has a brightness value from 0 to 255, can be “flattened” into a vector by listing its pixel values in a consistent order (e.g., row by row):
    • Image Grid: [255, 100]
      [50, 0]
    • Vector Representation: [255, 100, 50, 0]
      This is a 4-dimensional vector. A real-world image might be a vector with millions of dimensions!
  • A Word’s Meaning: As we touched upon, in modern AI, a word like “king” is not a single number but a vector of hundreds of dimensions (e.g., [0.98, -0.12, 0.45, …] ) that captures its meaning in relation to all other words.

A vector is how AI holds a single, complete “idea” or “data point” in a structured, mathematical form.

Vectors as Points in the Data Landscape

This is where our analogy from Lecture 3, “Data as a Landscape,” comes to life.

If a vector is just a list of numbers, what does it look like? Geometrically, a vector is a single point in space.

  • A 2-dimensional vector like [3, 4] is a single point on a 2D graph: 3 units along the x-axis and 4 units along the y-axis.
  • A 3-dimensional vector like [1500, 3, 25] is a single point in a 3D space.
  • A 300-dimensional word vector is a single point in an unimaginable 300-dimensional space.

Every piece of data—every user profile, every image, every sentence—becomes a unique point in our high-dimensional data landscape. The vector is the mathematical address of that point.

Why This is So Powerful

By representing everything as vectors, we unlock the ability to use the tools of geometry and linear algebra to manipulate and compare data.

  • Measuring Similarity: We can calculate the “distance” between two vectors. If the vectors for two users’ movie ratings are very “close” in the data landscape, it means their tastes are similar, and we can recommend movies from one user to the other.
  • Finding Patterns: We can look for directions or pathways in this space. For example, we might find a “royalty” vector that points from “man” to “king” and also from “woman” to “queen.”
  • Transformations: We can apply mathematical operations (which we’ll cover in future lectures) to move, rotate, and stretch these vectors, which is the basis of how neural networks process information.

The vector is the atom of the AI world. It’s the simple, elegant structure that allows us to take messy, real-world concepts and place them into a mathematical landscape where they can be organized, compared, and transformed.

In our next lecture, we’ll look at the “verb” of the AI world: how we can combine and manipulate these vectors using basic operations like addition and scalar multiplication.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top