Welcome to our third lesson. In the previous two lessons, we focused on the properties of individual vectors, exploring the dot product as a measure of similarity and norms as measures of magnitude. Now, we will shift our attention from single vectors to sets of vectors.
Today's lesson addresses a fundamental question: when is a set of vectors truly "efficient" in the information it contains, and when is it redundant? We will formalize this by defining linear independence. This concept is not just an abstract piece of theory; it's the foundation for understanding the "intrinsic dimensionality" of data, a crucial idea in machine learning and mechanistic interpretability. For instance, when analyzing the activations of a neural network layer, knowing the dimensionality of the activation space tells you how complex the representations are.
To properly define independence, we first need to understand how vectors combine.
Linear Combinations and Span: The Building Blocks
The two fundamental operations we have are scaling a vector and adding vectors together. When we do both—scale several vectors and add them up—we create a linear combination. For a set of vectors , a linear combination takes the form:
where are scalars. The set of all possible vectors you can create by varying these scalars is called the span of the vectors.
The 3Blue1Brown YouTube channel provides one of the best visual intuitions for these concepts.
Linear combinations, span, and basis vectors | Chapter 2, Essence of linear algebra
This video, "Linear combinations, span, and basis vectors," will give you a powerful mental model for what it means to combine and span vectors.
Watch the segment from the beginning until the concept of span. Focus on how linear combinations allow you to "reach" new vectors and how the span represents the entire set of reachable points, which could be a line, a plane, or all of space.
As the video illustrated, the span of a set of vectors is the space they can "generate". If you have two vectors in 3D space that don't point along the same line, their span is a plane cutting through the origin. If you add a third vector that lies on that plane, you haven't gained anything; you're still confined to the same plane. But if that third vector points off the plane, you can now reach any point in 3D space. This idea of redundancy is the key to understanding linear dependence.
Defining Linear Independence
We can now define linear independence in two ways: one intuitive and one formal.
1. The Intuitive Definition: Redundancy and Span
A set of vectors is linearly dependent if at least one vector is redundant, meaning it's already in the span of the others. You could remove it without shrinking the span.
Conversely, a set of vectors is linearly independent if every vector is essential. Each one adds a new direction or dimension to the span that wasn't accessible before.
Linear combinations, span, and basis vectors | Chapter 2, Essence of linear algebra
Let's continue with the 3Blue1Brown video to formalize this intuition.
Watch the next segment, from linear dependence and independence. This part crystallizes the link between redundant vectors and linear dependence.
This intuitive definition is powerful but not always easy to test directly. How can we check if one vector is a combination of the others in a systematic way? This leads us to the formal, algebraic definition.
2. The Formal Definition: The Zero Vector Test
Let's rephrase the idea of dependence. If a vector is a linear combination of others in the set , we can write:
By simply rearranging this equation, we get:
This is a linear combination of all the vectors that equals the zero vector, where at least one coefficient (the in front of ) is not zero. This gives us a universal test.
A set of vectors is linearly independent if and only if the only way to make their linear combination equal to the zero vector is by using all zero coefficients (the "trivial solution").
If there's any other solution where at least one is non-zero, the set is linearly dependent.
The following article provides a rigorous statement of this principle.
This article by Matthew N. Bernstein formalizes the definitions we've just discussed.
Please read the section "Linear dependence and independence". Pay close attention to Theorem 1 and its Corollary, as they present the formal test we will use. You can skip the proof in the Appendix for now, but know that it's there if you're interested in the rigorous derivation.
The image below gives a simple 2D visualization of this principle.

On the left, two vectors are linearly independent; only the trivial combination results in the zero vector. On the right, two vectors are linearly dependent (collinear); a non-trivial combination, such as , can produce the zero vector.
How to Check for Linear Independence
This formal definition provides a direct computational method. The vector equation is simply a system of linear equations.
Given a set of vectors in , , we can perform the following steps:
- Create a matrix where the columns are your vectors: .
- The vector equation becomes the matrix equation , where is the column vector of unknown coefficients .
- Solve this system for . The key question is whether only the trivial solution exists.
- From your knowledge of systems of equations, you know that this homogeneous system has only the trivial solution if and only if the matrix , when row-reduced, has a pivot position in every column. If there is any column without a pivot (which corresponds to a free variable), then non-trivial solutions exist, and the vectors are linearly dependent.
This method transforms the abstract question of linear independence into a concrete algorithmic procedure.
This textbook section from Georgia Tech's ILA provides a clear recipe and connects linear independence to the matrix concepts of pivots and free variables.
First, read the main definition and the "Recipe" in the first section. This will solidify the matrix method. Then, jump to the section "Linear Dependence and Free Variables" and read the first theorem. This directly connects the existence of free variables (columns without pivots) to redundancy in the set of vectors, which should feel very intuitive given your CS background.
Practice Problem
Let's apply this. Determine if the following set of vectors in is linearly independent.
Your task:
- Set up the matrix .
- Set up the equation .
- Without doing a full row-reduction, can you spot a relationship between the vectors? (Hint: Look at the columns).
- What does this relationship tell you about the solution for ? Are the vectors linearly independent or dependent?
Solution:
- The matrix is .
- The equation is .
- By inspection, we can see that the third column is the sum of the first two columns: .
- This means . This corresponds to a non-trivial solution where . Since a non-trivial solution exists, the set of vectors is linearly dependent. The vector is redundant.
Key Properties and Rules of Thumb
Finally, here are a few useful properties that can serve as shortcuts:
- A set of two vectors is linearly dependent if and only if they are collinear (one is a scalar multiple of the other).
- Any set of vectors containing the zero vector is automatically linearly dependent. (Why? If , then is a non-trivial solution.)
- If you have more vectors than dimensions (e.g., 3 vectors in , or 4 in ), the set is always linearly dependent. A "wide" matrix (more columns than rows) cannot have a pivot in every column, guaranteeing the existence of free variables.
Conclusion
In this lesson, we established the crucial concept of linear independence as a measure of non-redundancy in a set of vectors.
Here are the main takeaways:
- Intuitive Meaning: A set of vectors is linearly independent if each vector adds a new dimension to the span. It's dependent if at least one vector is redundant (i.e., lies in the span of the others).
- Formal Test: A set is linearly independent if the equation is only true when all .
- Computational Method: To test a set of vectors, form a matrix with the vectors as columns and row-reduce it. The vectors are linearly independent if and only if every column has a pivot.
We briefly introduced the idea of span today to define independence. In our next lesson, we will explore span in its own right, examining the geometry of the subspaces that vectors can generate. Afterward, we will combine the concepts of span and linear independence to define a basis—the most efficient possible set of building blocks for a vector space.