Linear Combinations, Span, and Basis

Based on the lesson by Grant Sanderson (3Blue1Brown)

"Mathematics requires a small dose, not of genius, but of an imaginative freedom which, in a larger dose, would be insanity."
— Angus K. Rodgers

I couldn't agree more, Angus.

Recap of vector coordinates as pairs of numbers

Vectors described by coordinate pairs

Now it's possible that vector coordinates were already familiar to you, but there's another interesting way to think about them. When you have a pair of numbers meant to describe a vector, like $(3, -2)$, you can think of each coordinate as a scalar.

Vector coordinates interpreted as scalars

Each coordinate is a scalar that stretches or squishes

In the $xy$-coordinate system, there are two special vectors. The one pointing to the right with length $1$, commonly called "i-hat" $\hat{\imath}$, or "the unit vector in the $x$-direction." The other one is pointing straight up with length $1$, commonly called "j-hat" $\hat{\jmath}$, or "the unit vector in the $y$-direction."

Unit vectors i-hat and j-hat

The unit vectors $\hat{\imath}$ and $\hat{\jmath}$

Now, think of the $x$-coordinate as a scalar that scales $\hat{\imath}$, stretching it by a factor of $3$, and the $y$-coordinate as a scalar that scales $\hat{\jmath}$, flipping it and stretching it by a factor of $2$. In this sense, the vector that these coordinates describe is the sum of two scaled vectors.

Vector as sum of scaled unit vectors

The vector $(3, -2)$ as $3\hat{\imath} + (-2)\hat{\jmath}$

Those two vectors $\hat{\imath}$ and $\hat{\jmath}$ have a special name: together they are called the basis of the coordinate system. What this means is that when you think about coordinates as scalars, the basis vectors are what those scalars actually scale.

Coordinates as scalars of basis vectors

Coordinates are scalars applied to the basis vectors

There's also a more technical definition of basis, but we'll get to that later. Framing our familiar coordinate system in terms of these two special basis vectors raises an interesting and subtle point: we could choose a different pair of basis vectors and get a perfectly reasonable new coordinate system.

Choosing Different Basis Vectors

For example, take some vector pointing up and to the right, along with a vector pointing down and to the right.

Two non-standard basis vectors

A different pair of basis vectors

Now think about all the different vectors you can make by picking two scalars, scaling each basis vector, and adding them up. How many could you create?

Span example with different basis, first combination

One linear combination of the new basis

Span example with different basis, second combination

Another linear combination of the new basis

It turns out you can make every possible two-dimensional vector this way, and it's a good puzzle to think about why. A different pair of basis vectors still gives you a valid way to go back and forth between numbers and vectors, but the mapping changes. The same vector in space gets different coordinates depending on which basis you use:

$$\begin{bmatrix}-0.8\\1.3\end{bmatrix} \neq \begin{bmatrix}3.1\\-2.9\end{bmatrix}$$
Same vector, different coordinates under different bases

The same vector gets different coordinates under a different basis

The takeaway: coordinates are only meaningful relative to a particular basis. Change the basis, change the numbers.

Linear Combinations

Any time you're scaling two vectors and adding them like this, it's called a linear combination of those two vectors.

Linear combination with description

A linear combination: scale then add

Why "linear"? When you multiply every real number by a vector, the result is a line through the origin. Each vector defines its own line.

Scalar multiplication produces lines through the origin

Each vector defines a line through the origin

A linear combination of two vectors is just a way of combining these two lines. For most pairs of vectors, if you let both scalars extend indefinitely, you can reach every point on the plane.

Scalars ranging freely span the full plane

Letting both scalars run freely reaches every point on the plane

However, if your two original vectors happen to line up, the lines produced by the scalar multiplication will be the same line, so adding them together can't yield a vector outside of that line.

Collinear vectors only span a line

Collinear vectors are stuck on the same line

There's a third possibility too: both your vectors could be the $\mathbf{0}$ vector, in which case you'll just be stuck at the origin.

Span

The set of all possible vectors you can reach with linear combinations of a given pair of vectors is called the span of those two vectors. The span of most pairs of 2D vectors is all of 2D space. When they line up, the span collapses to a single line.

$$\text{span}(\vec{\mathbf{v}}, \vec{\mathbf{w}}) = \{a\vec{\mathbf{v}} + b\vec{\mathbf{w}} \mid a,b \in \mathbb{R}\}$$
Span of a linear combination

The span is all vectors reachable by linear combinations

Vectors vs Points

When you're thinking about a single vector, it's best to think of it as an arrow, but what about multiple vectors? When you're dealing with a whole collection of vectors (say, every vector whose tip sits on a line), it's easier to just think about their endpoints.

A vector as an arrow

A single vector as an arrow

Vectors as points on a line

A collection of vectors represented as points on a line

All 2D vectors as points filling the plane

All 2D vectors conceptualized as points filling the plane

Span in 3D

The idea of span gets more interesting if we start thinking about vectors in three-dimensional space. For example, if you take two vectors in 3D that are not pointing in the same direction, what does it mean to take their span?

Two vectors in 3D space

Two vectors in three-dimensional space

Same idea as before: scale each one, add them, and see what you can reach.

Linear combination in 3D

A linear combination of two 3D vectors

Imagine turning two knobs, one for each scalar. As you adjust them, the tip of the resulting vector traces out a flat sheet through the origin. That sheet is the span of the two vectors.

Span of two 3D vectors forms a plane

The span of two non-collinear 3D vectors is a plane through the origin

Adding a Third Vector

What happens if we throw in a third vector? Same deal: three scalars, three vectors, one sum:

$$a\vec{\mathbf{v}} + b\vec{\mathbf{w}} + c\vec{\mathbf{u}}$$
Linear combination of three vectors

The linear combination of $\vec{\mathbf{v}}$, $\vec{\mathbf{w}}$, and $\vec{\mathbf{u}}$

Two things can happen when we add a third vector:

Case 1: If the third vector already sits on the span of the first two, the span doesn't change. You're trapped on that same flat sheet, with no new reach.

Third vector lies in span of first two

Third vector already in the span, no new reach

Case 2: If the third vector is not in the span of the first two, it points in a genuinely new direction — and now you can reach every vector in 3D space. Scaling it sweeps that flat sheet through all of space.

Third vector is not in span, unlocking full 3D

A third independent vector unlocks all of 3D space

Linear Dependence and Independence

When a vector is already in the span of the others (whether it's a third vector sitting on a plane or two vectors along the same line), it's redundant. Whenever you can remove a vector without shrinking the span, the set is linearly dependent.

Linearly dependent vectors in 2D

Linearly dependent: one vector is redundant

Put differently: one of the vectors can be written as a linear combination of the others.

Linearly dependent vectors in 3D

A dependent vector lies in the span of the others

On the other hand, if each vector truly does add another dimension to the span, they are said to be linearly independent.

Linearly independent vectors in 3D

Each independent vector adds a new dimension to the span

Summary