How To Understand Span (Linear Algebra)

Photo by Lucas Benjamin on Unsplash

Our eyes see color using only three types of cone cells — which take in red, green, and blue light — and yet from those three types we can see millions of colors. Beyond being a nice, efficient biological feature, this illustrates an important concept in linear algebra: the span. To explain span intuitively, I’ll give you an analogy to painting that I’ve used in linear algebra tutoring sessions.

(This is part two of a three-part series explaining linear algebra concepts using the analogy of painting. The first part is on linear dependence/independence, which you can read here. The third, upcoming part is about basis.)

Imagine you are a painter with a blank canvas in front of you. I hand you a paintbrush, and two buckets with red and yellow paint. Sorry, those are the only two colors I could afford to get you. You might wonder, what are all the possible colors you could paint?

Obviously, you can put red and yellow onto the canvas. You can also combine red and yellow in different amounts to create a vast spectrum of orange shades. The exact amounts of red and yellow are up to you of course: it could be equal parts red and yellow, or eight times more yellow than red, or whatever. The full set of all combinations of red and yellow paint (including the colors red and yellow themselves) might be called the span of red and yellow paint.

In linear algebra, we use vectors instead of paint; however, we can mix” vectors just like we mix paint using linear combinations. Vectors can be thought of as coordinates in space, at least for linear algebra, and creating a linear combination of vectors is very simple. Given a set of vectors, like (v₁, v₂, v₃), a linear combination is the vector you make from adding together a multiple of v₁, a multiple of v₂, and a multiple of v₃. The exact multiples can be whatever number we want. The vectors v₁, v₂, and v₃ are like red, yellow and blue paint, and a linear combination is the act of mixing those vectors together to create some new vector.

Here are a few examples of valid linear combinations:

  • v₁ (because this is just 1᛫v₁ + 0᛫v₂ + 0᛫v₃)
  • v₂
  • 3v₁ + (1/2)v₂ + 10v₃
  • v₁ - v₂ - v₃

And here are a few examples of what are not linear combinations:

  • (v₁᛫v₂) + v₃ (must be the sum, not product, of vectors)
  • v₁² + v₃ (cannot take exponents of vectors, can only scale them by some amount)
  • 2v₁ + v₂ + v₃ + 8(only multiples of vectors can be added, not constants)
  • v₁ + v₂ + Victor Hugo (Hugo is a Victor, not a vector)

Each of these linear combinations, on their own, can be thought of as c₁v₁ + c₂v₂ + c₃v₃ where each c is a real number. The set of all of these linear combinations is called the span of (v₁,v₂,v₃) and is sometimes just written as Span(v₁,v₂,v₃).

If I have one single vector in 2-D space (In math terms, ℝ² can be thought of as 2-D space. Likewise, ℝ³ can be thought of 3-D space, and so on), the span would be every multiple of that one vector. Say that v is the vector (1,1). Span(v) is the set of all linear combinations of v, aka the multiples, including (2,2), (3,3), and so on. In this case Span(v), marked in pink, looks like this:

The span looks like an infinite line that runs through v. Every point on the pink line is a valid linear combination of v.

If the span of one vector is a line, what about the span of two vectors? The obvious answer might be a plane, but the answer depends on whether or not the vectors are dependent or independent. If you haven’t read the last article I wrote on dependence/independence, or if you’re hazy on the concept, now might be a good time to read it.

Here are two linearly dependent vectors, the vectors (1,2) and (3,6). Remember, dependent vectors mean that one vector is a linear combination of the other(s). Here, the two vectors are dependent because (3,6) is a multiple of the (1,2) (or vice versa):

Since (3,6) is already a multiple of (1,2), you might notice that any linear combination of these two vectors is just a different multiple of (1,2). For example, adding together (3,6) and (1,2) together makes (4,8) which is just 4 times (1,2). So the complete span, again marked in pink, looks like this:

Again, it’s a straight line. Two vectors that are linearly dependent didn’t change much about the span. But what if we made the vectors independent?

Say that we have two independent vectors, v=(0,1) and w=(1,0). Here is a diagram of v, w, and a few examples of linear combinations of v and w. It should be apparent that these are independent vectors.

But we want to know the span, which is the set of every linear combination of v and w. Here’s something you could try. Pick any point on the 2-D plane, with any (x,y) coordinates. Does it look like a combination of v and w? Try this a few times and you’ll notice that every point on the plane can be written as a combination of v and w. In other words Span(v,w) is equal to all of 2-D space, or ℝ². Again, with the span marked in pink:

In fact, this property is true for any collection of vectors. If you have three dependent vectors (v₁, v₂, v₃) then Span(v₁,v₂,v₃)=Span(v₁,v₂) or possibly even just Span(v₁). On the other hand, if you have three independent vectors, Span(v₁,v₂,v₃)=ℝ³, and if you have n independent vectors, then Span(v₁…vₙ)=ℝⁿ.

If vectors are dependent, the span is the same as if we remove one of the vectors. If vectors are independent, the span changes if you remove a vector. Dependent vectors are like having red, yellow, and orange, whereas independent vectors are like having red and yellow. The span, the total amount of colors we can make, is the same for both.

At its core, the span is a pretty simple object in linear algebra. It is simply the collection of all linear combinations of vectors. However, the span is one of the basic building blocks of linear algebra. Having a deep understanding of simpler concepts like span, or basis, or linear dependence, unlocks much more complicated parts of linear algebra. Without span and basis, understanding “affine transformations” or “orthogonal projections” is much harder. And linear algebra, as a branch of math, is used in everything from machine learning to organic chemistry. Not to mention that understanding these concepts helps you get good marks in a linear algebra course.

Our eyes can get away with only using three different cones for light — red, green, and blue — because the span of these three colors is enough to accompany millions of combinations. Even though there are species of shrimp which have twelve different cones for color (yes, really) it illustrates that even a mere three colors can take us a long way with the number of hues we can span. We can turn three colors into ten million colors.

Hi! I hope you enjoyed reading this article. If you enjoyed, give it some👏👏 and feel free to reach out to me about anything regarding this piece.

Math Tutor | Orange County, CA | If you want to reach out beneschan@gmail.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store