/bio/skills/blog/math

A Nice Warm Cup of Abstract Vector Space

A Nice Warm Cup of Abstract Vector Space

For most of us, our first foray into vector spaces is through an elementary linear algebra course or a vector calculus course. Many of us have encountered this sort of treatment.

"A vector is a directed line segment."

Or:

"A vector is a row/column of numbers.

And nary a mention of vector spaces. Ostensibly, by postponing abstraction, linear algebra might seem practical. Usually, it does not. It feels like a litany of arbitrary rules:

  • "Here's how you multiply a matrix..."
  • "When you multiply vectors, you don't get back a vector. Except when you do. But only in the third dimension."
  • "This Matrix has a triangle. Here's how you can make your own.

The sole "practical" applications seem to be: determinants (which Professor Sheldon Axler doesn't even like) and systems of linear equations. Neither of these are very motivated. Determinants are an odd way to calculate area. And I've never heard of anyone starting a linear algebra class without already knowing how to solve a system of linear equations.

Maybe you get to eigenvalues and eigenvectors, bases, or common subspaces.

Without abstraction, however, we miss the big picture of applied linear algebra. From statistics (see Sam Levey's explanation of degrees of freedom), to biology (the Leslie matrix), or calculus (see watch Grant Sanderson's exlanation of the derivative as a matrix), it can seem like linear algebra has a lot of interesting applications. And while that's true, without abstraction, the narrative thread that brings linear algebra together, the linear transformation, seems bound to the concrete definition of vector.

There is another way. We can start with abstract vector spaces.

Abstraction can be easy*.

Coffee is a vector. Think of coffee abstractly. Is it a liquid in a cup? Yes. Is it a cold drink in a glass? That too. Is it a bean. Of course. It is all that and more. Coffee is a vector. We can add coffee to coffee and still get coffee. There's such thing as no coffee. If we add no coffee to some coffee, we still have some coffee. We can have the opposite of a cup of coffee: decaf. Decaf and coffee can be mixed together to produce no coffee. (Use your imagination and pretend that the caffeine and absence thereof cancel each other out.) We make our coffee more or less coffee like by controlling our brew. And for each person there's a standard brew. What they expect one cup of coffee to be. We can brew combinations of coffee and it's just blended coffee. We can combine brews of coffee and it's still coffee. And (probably by accident), you can brew already brewed coffee and it's still coffee (this is probably not true, but instead of trying this possible abomination, just pretend)

A vector is simply a thing with all these coffee-like qualities:

  • There's a notion of one.
  • There's a notion of 0. It does nothing, when we're adding.
  • There's the notion of an opposite (for adding).
  • Adding a thing and it's opposite should give us nothing.
  • We can scale the thing.
  • There's a notion of 1. This is the "standard" on the scale.
  • Just as we can scale up, we can scale down. We can combine the two to get to our "standard"
  • We can add and scale.
  • We can scale and scale. And whatever type of vector we started with, we'll still have, whether a coffee, a row of numbers, or a polynomial.

K, so the analogy isn't perfect, but it's an analogy. The point is that a vector space describes a bunch of actions on a vector. And the coffee example shows us that it's basically everything we might want to do with our vector before drinking it (which is not part of the rules for vectors).

From here, however (as long as we don't overthink coffee) we can begin to understand that linear transformations just like moving coffee around or putting it in different cups, preserves the coffee. There are transformations that can change the dimension of the coffee (think flat white). Some transformations are can be undone, others can't.

That's how useful the notion of abstract vector spaces is.

It is a metaphor that can be extended to any variety of things, as long as they follow certain rules. And the rules it specifies are so intuitive, they cover the generalities of everything a barista might want to do with coffee.

This is the importance of linearity. With coffee it's so obvious as to be almost banal. But then we think of expectation in statistics or we look back at population dynamics in biology. You order a double espresso, it's not always the same amount, but you expect it to be twice the amount you'd expect in a single shot. Of course, then, expectation is linear, regardless of how the probabilities of coffee work. When you think of non-linear systems like populations or curves in space, you can understand the underlying linear structure: the population change may be linear, or the best approximation of a curve at a specific point can be a line. From coffee to statistics, from biology to calculus, a minimal set of ingredients can describe linearity as a powerful and almost universally applicable abstraction.

Let's drink (a shot of coffee) to that!

*At the expense of contorted analogies.

2026 Stefano De Vuono