The Two Views of a Vector

The single most important object in all of machine learning and quantitative finance.

What’s the single most important object in all of machine learning and quantitative finance? It’s not a neural network or a fancy algorithm. It’s something much simpler: the vector. But what is a vector?

If you ask a physicist, a programmer, and a data scientist, you might get three different answers. The key to mastering linear algebra is understanding that they're all talking about the same powerful idea from different perspectives. Let's break down the two most important views.

View #1: The Physicist's View (The Arrow)

To a physicist, a vector is an arrow floating in space. It's an object defined by two things and two things only:

  • Magnitude (its length)
  • Direction (where it's pointing)

Think of concepts like velocity, force, or acceleration. A wind blowing at 15 mph to the northeast is a vector. It doesn't matter if you're measuring that wind in London or Tokyo; as long as the speed (length) and direction are the same, it's the same vector.

This geometric view is fantastic for building intuition. It lets us visualize concepts. But it has one major drawback: How do you tell a computer about an arrow? Computers don't speak in "arrows"; they speak in numbers. This leads us to the second, more practical view.

View #2: The Data Scientist's View (The List of Numbers)

To a data scientist or a programmer, a vector isn't an arrow; it's an ordered list of numbers. That's it. Seriously.

  • [3,2][3, 2] is a 2-dimensional vector.
  • [1800,3,25][1800, 3, 25] is a 3-dimensional vector.
  • [45.7,’10.5M’,31.2,0.8][45.7, \text{'10.5M'}, 31.2, 0.8] is a 4-dimensional vector.

This view is how we represent data in a computer. Every row in your spreadsheet is a vector.

FeatureValue
House Price ($)450,000
Square Footage2,100
Bedrooms4
Age (years)15

This house is a vector: [450000,2100,4,15][450000, 2100, 4, 15]

The "Aha!" Moment: Connecting the Views

The entire foundation of applied linear algebra rests on one, beautiful idea: these two views are just different languages for the same concept.

We can translate from the "list of numbers" to the "arrow" by creating a coordinate system. To represent the vector [3,2][3, 2], we simply:

  1. Start at the center (the origin).
  2. Move 3 units along the x-axis.
  3. Move 2 units along the y-axis.
  4. Draw an arrow from the origin to that point.

This act of visualizing a list of numbers as a single point (or arrow) in space is the most important skill you will learn.

The Core Idea for Quants & ML

Every single data point can be thought of as a vector in a high-dimensional space.

  • A house described by 10 features is a single point in a 10-dimensional "house-space."
  • A stock described by 50 indicators is a single point in a 50-dimensional "market-space."
  • A user on a streaming service, described by their ratings for 500 movies, is a single point in a 500-dimensional "taste-space."

Why is this so powerful? Because once your data points become vectors, you can start asking geometric questions.

  • "Which houses are similar to this one?" becomes "Which vectors are close to this one in house-space?"
  • "Which stocks are exhibiting the same behavior?" becomes "Which vectors are pointing in the same direction?"

This translation is the key. We take our messy, real-world data (lists of numbers) and place it into a clean, geometric world (vector spaces) where we can use the powerful tools of linear algebra to find patterns.

Summary: Your Two Lenses

Throughout this course, we will constantly switch between these two views.

The Physicist's View (Arrow)

This is your lens for intuition. It helps you understand why an operation works.

The Data Scientist's View (List)

This is your lens for computation. It's what our code will actually be doing.

Mastering the art of switching between these lenses is the first and most crucial step to thinking like a true quant.