How to Understand Basis (Linear Algebra)

Mike Beneschan
6 min readNov 3, 2020

--

Photo by Steve Johnson on Unsplash

When teaching linear algebra, the concept of a basis is often overlooked. My tutoring students could understand linear independence and span, but they saw the basis how you might see a UFO: confusing and foreign. And that’s not good, because the basis acts as a starting point for much of linear algebra.

We always need a starting point, a foundation to build everything else from. Words cannot be written without the foundation of an alphabet. Ancient civilizations believed the universe was formed from 4 classical elements — water, earth, fire, and air (Long ago…). And vector spaces, the natural home of linear algebra, have the basis as their foundation.

I’m going to explain the basis conceptually using an analogy to painting. This analogy was used in two previous articles to explain two other concepts from linear algebra called linear independence/dependence and span. I recommend reading those articles first, because both concepts will come up later.

The Basis of Paint Colors

Instead of doing math, suppose you are a painter, ready to paint a masterpiece on your canvas. First, you need to buy some paint. How many colors should you buy?

Of course, it’s a bad idea to make a painting by driving to Home Depot and buying one can of paint each for all the thousands of colors they have. You do not need thirty different shades of blue, from Azure Blue, to Mountain Blue, all the way down to Victory Blue (idea: create a paint called “Defeat Blue”). You only need to buy blue paint and a few other colors.

If you’re a stingy painter, you might even say you only need to buy 5 colors to make a painting: red, yellow, blue, white, and black. Sure, green would be nice, and pink would be cool, but you don’t need to buy pink and green paint. After all, you can combine red and white paint to make pink, or yellow and blue paint to make green.

Red, yellow, blue, white, and black are the minimum set of colors that you need to make any other color. We could say these 5 colors form a basis for the whole color spectrum.

Since you can make any other color using blends of these five colors, we could say that these five colors span the set of all colors. Additionally, each color in the set is necessary: you need white paint because no amount of yellow, red, black, or blue paint mixed together will ever create white paint. In other words, red, yellow, blue, white, and black are independent of each other.

Let’s call your set of paints your palette. For your palette to form a basis for all colors, two conditions need to be true:

  1. The palette spans the set of all colors.
  2. All colors in the palette are independent of each other.

We just saw that red, yellow, blue, white, and black meet both conditions. By contrast, here are examples of palettes that are not bases:

  • Red, blue, white. This violates condition 1. This set does not span all colors. Many colors like yellow or green are impossible to make with colors from this set.
  • Red, orange, yellow, green, blue, purple, white, black. This violates condition 2. These colors certainly span all colors, but they are not independent. Purple is a combination of red and blue, green a combination of yellow and blue, and so on.

The Basis of a Vector Space

Vector spaces are more abstract than paintings, but they use the basis similarly. A vector space is a set of vectors where you can add vectors together and scale them. For example, the 2-D plane (also known as R²) is a vector space. It is the set of all “2-dimensional” vectors, which can be thought of as vectors with an x-coordinate and a y-coordinate.

Just like how we created a basis for the set of all colors, we can create a set of vectors that form a basis of R². The basis requirements are nearly the same as our basis for colors.

Basis: A set of n vectors, {v₁, v₂,… vₙ}, is a basis of some space S if these two conditions are true:

  1. {v₁, v₂, …vₙ} are linearly independent.
  2. {v₁, v₂,…vₙ} span the set S. In other words, Span{v₁,v₂,…vₙ}=S

For example, take the vectors (0,1) and (1,0), graphed below in green. These vectors are linearly independent, since there is no way to scale (0,1) into (1,0). Additionally, these two vectors span the entire 2-D plane, because you can rewrite any point in 2-D space as a linear combination of (0,1) and (1,0):

(0,1) and (1,0) therefore form a basis of R² (This specific basis of (0,1) and (1,0) is called the standard basis). However, this is not the only basis of R² possible. Take a look at the vectors (1,1) and (-1,1), graphed below. Pink vectors represent a few different linear combinations:

These two vectors are also linearly independent, since you cannot scale one vector into the other. From the pink linear combinations, it is also clear that (1,1) and (-1,1) spans all of R². Therefore, (1,1) and (-1,1) form another basis for R².

This is one spot where vector spaces are very different from the paint analogy. With paint colors, we really only have the basis of yellow, blue, red, black, and white. But in the world of vector spaces, any space has an infinite number of bases to choose from. In general, a basis is the smallest set of vectors possible that can span a space. It is the vector equivalent of being stingy with your paint, and only buying the minimum colors you need.

The basis also helps us figure out the underlying structure of a vector space. For example, we know that any basis of R² will be made of exactly two vectors, like the two bases we found earlier. In general:

  • For some space S, all bases of S have the same number of vectors. This was first proven by Georg Hamel. If a basis for S is made up of 4 vectors, then any basis for S is made up of 4 vectors.
  • A basis for an Rⁿ space is made up of n vectors. Any basis for R³ (3-dimensional space) is made up of 3 vectors. Any basis for R⁵ (5-dimensional space, don’t ask) is made up of 5 vectors.

Why the Basis Matters (Linear Transformations)

On its own, the basis does not have much impact. However, let’s briefly touch on why the basis is so important for linear algebra.

We can take a vector space and transform it, “transform” here meaning stretching, flipping, or rotating the space. When working with linear algebra, transforming a vector space is as common as breathing. Suppose that I want to transform the graph A into graph B:

Each graph has its own basis (the pink and blue vectors). Importantly, both graph A and graph B are just two different ways of representing the exact same space using different bases. It’s like reading the same book but in two different languages, like Spanish and French.

Shifting from graph A to graph B is called a linear transformation of the graph. A linear transformation acts like a translator: It takes every point in graph B and moves it to every corresponding point in graph A. It takes the French word and moves it to Spanish. However, we are now getting into the world of linear transformations, and that can be explained another time.

Conclusion

We now have a deeper understanding of three linear algebra concepts: basis, linear independence/dependence, and span. These concepts are fundamental to linear algebra. Linear independence/dependence tells you which vectors are necessary in a set of vectors. Span tells you all the possible combinations of vectors you can create. And finally, the basis tells you the smallest set of vectors needed to span a vector space, and thus the structure of that space.

Mastering these concepts will give you the foundation you need for a concrete understanding of linear algebra. After all, a house cannot stand on a shaky base, and we cannot understand linear algebra without a basis. Thank you for reading!

--

--

Mike Beneschan

A human, writing (mostly) about math | California | If you want to reach out mikebeneschan@gmail.com | Get the newsletter here: https://bit.ly/3Ahfu98