Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 4

Linear Independence and Dependence of Vectors

Recommended resources

Hello! Welcome to the fourth lesson in our first module.

In our last lesson, we explored the concept of span, which allows us to construct a subspace by taking all possible linear combinations of a given set of vectors. We ended with a question: are all vectors in a spanning set equally important? For example, the span of {[1, 0], [2, 0]} is the x-axis, which is the same as the span of just {[1, 0]}. The vector [2, 0] is redundant.

Today, we will formalize this idea of redundancy and efficiency with the concept of linear independence. This is a cornerstone of linear algebra that describes sets of vectors that contain no "wasted" information.

By the end of this lesson, you will be able to:

  • Understand the geometric and algebraic meaning of linear independence.
  • Formally define linear dependence and independence.
  • Prove the connection between linear dependence and span.
  • Use an algorithmic approach to determine whether a set of vectors is linearly independent.

Geometric Intuition: Redundancy in Vectors

Before diving into formal definitions, let's build a strong visual intuition. A set of vectors is linearly dependent if at least one vector is "redundant"—it doesn't add a new direction and already lies within the span of the other vectors.

  • In , two vectors are linearly dependent if they are collinear (lie on the same line). One is just a scaled version of the other.
  • In , three vectors are linearly dependent if they are coplanar (lie on the same plane). One of them can be written as a linear combination of the other two.

The following video provides an excellent visual demonstration of these ideas.

1.2 Vector Spaces - #02 Vector Basis, Span & Linear Independence (Special)

This video from PacoVideoLectures visually demonstrates linear dependence in 2D and 3D, showing how dependent vectors fail to span a space of the expected dimension because some vectors are redundant.

Please watch from 09:33 to 16:16. The first part (until 10:43) covers the 2D case, the second (until 13:19) shows the analytical proof, and the third (until 16:16) extends the visualization to 3D.

This image provides a static summary of the geometric interpretation of linear dependence and independence.

Geometric Interpretation of Linear Independence and Dependence
In the top row (2D), the vectors in (a) and (b) are linearly dependent because they are collinear. In (c), they are independent. In the bottom row (3D), the vectors in (a) and (b) are linearly dependent because they are coplanar. In (c), they are independent.

The key takeaway is that a set of vectors is linearly dependent if one vector is contained within the span of the others. This makes that vector redundant in terms of the total span of the set.


Formal Definitions of Linear Independence and Dependence

Now let's translate this intuition into a rigorous mathematical definition. The standard way to define linear independence is by considering a linear combination that equals the zero vector.

Consider a set of vectors . We are interested in the vector equation:

Notice there is always one obvious solution: setting all scalars to zero. This is called the trivial solution. The crucial question is whether any other solutions exist.

The following reading formally defines linear independence based on the answer to this question.

[PDF] Linear Algebra - Mathematics for Machine Learning

The textbook Mathematics for Machine Learning provides a concise and formal definition of linear (in)dependence, which is the standard in the field.

Please read section 2.5, 'Linear Independence,' starting from 'Definition 2.11 (Linear Combination)' up to (but not including) 'Example 2.13'. Focus on 'Definition 2.12 (Linear (In)dependence)'.

To summarize the formal definitions:

  • A set of vectors is linearly independent if the only solution to the equation is the trivial solution, where .

  • The set is linearly dependent if there exists a non-trivial solution, meaning at least one scalar is non-zero. Such a non-trivial solution is sometimes called a linear dependence relation.


Connecting the Definitions: A Proof

We now have two ways of thinking about linear dependence:

  1. Geometric Intuition: At least one vector is in the span of the others.
  2. Formal Definition: There's a non-trivial linear combination that equals the zero vector.

For a proof-based understanding, it is essential to show that these two ideas are equivalent.

Theorem: A set of vectors (with ) is linearly dependent if and only if at least one of the vectors in is a linear combination of the others.

The following resource provides a clear proof of this theorem. Given your interest in proofs, I encourage you to work through it carefully.

Linear Independence - Computer Science

This resource from a computer science text clearly lays out and proves the theorem connecting our two definitions of linear dependence.

Read the section 'Another Interpretation of Linear Dependence,' including the theorem and its two-part proof.

Let's quickly outline the logic of the proof:

  • "If" part: Assume one vector (say ) is a linear combination of the others. We can rearrange the equation to show a non-trivial linear combination that equals zero, proving dependence.
  • "Only if" part: Assume the set is linearly dependent. This means a non-trivial combination equals zero. We can pick a term with a non-zero coefficient and solve for that vector in terms of the others.

This equivalence is powerful. It solidifies our intuition and gives us flexibility when constructing proofs.


An Algorithm for Testing Linear Independence

The formal definition provides a direct computational method to test for linear independence. The problem of finding whether a non-trivial solution exists for is equivalent to solving a homogeneous system of linear equations.

Given a set of vectors in , we can construct a matrix where these vectors are the columns: . The vector equation becomes:

The set of vectors is linearly independent if and only if this system has only the trivial solution .

This transforms the abstract question of independence into a concrete algorithmic problem.

[PDF] Linear Algebra - Mathematics for Machine Learning

The Mathematics for Machine Learning text describes this practical method, connecting linear independence to pivot columns found through Gaussian elimination.

Revisit section 2.5 and read the part beginning 'A practical way of checking whether vectors...are linearly independent is to use Gaussian elimination'. Pay close attention to the role of pivot and non-pivot columns.

The algorithm is as follows:

  1. Construct a matrix whose columns are the vectors in the set.
  2. Use Gaussian elimination to reduce to its row echelon form.
  3. Examine the pivot positions.
    • If every column has a pivot, there are no free variables. The only solution to is the trivial one (). The vectors are linearly independent.
    • If there is at least one non-pivot column, there is at least one free variable. This guarantees the existence of non-trivial solutions. The vectors are linearly dependent.

Let's see this in action with a worked example.

Linear Independence - Computer Science

This CS-oriented resource provides a clear, step-by-step example of testing a set of vectors for linear dependence by row-reducing an augmented matrix.

Read the section 'Testing if a Set of Vectors is Linearly (In)dependent'. Follow the example of row-reducing the augmented matrix and concluding that the set is linearly dependent because a free variable exists.


Two Useful Theorems

Finally, there are two straightforward but powerful theorems that can often serve as shortcuts to determine linear dependence without any computation.

Linear Independence - Computer Science

The same CS resource concludes with two important theorems. Their proofs are direct consequences of the concepts we've just discussed.

Read the two theorems presented near the end of the page, starting with 'If a set contains more vectors than there are entries in each vector...'. The proofs are short and insightful.

  1. Theorem: A set in that contains the zero vector is linearly dependent.

    • Proof Idea: If , then we can form the non-trivial combination .
  2. Theorem: If a set of vectors in contains more vectors than the dimension of the space (i.e., ), then the set is linearly dependent.

    • Proof Idea: The matrix will be . If , there are more columns (variables) than rows (equations). This guarantees there must be at least one free variable, which implies a non-trivial solution to . For example, any three vectors in must be linearly dependent.

Conclusion

In this lesson, we formalized the crucial concept of linear independence. This idea of a "minimal" or "non-redundant" set of vectors is fundamental to everything that follows.

Key Takeaways:

  • Geometric View: Linearly dependent vectors are redundant. One lies in the span of the others (e.g., they are collinear or coplanar).
  • Formal Definition: A set of vectors is linearly independent if the only linear combination that sums to the zero vector is the trivial one (all coefficients are zero).
  • Equivalence: These two notions are provably equivalent.
  • Computational Test: To test a set of vectors for linear independence, form a matrix with them as columns and row-reduce. The set is independent if and only if every column is a pivot column.
  • Key Theorems: Any set containing the zero vector is dependent. Any set of vectors in with is dependent.

Preview of the next lesson:
We have now studied two essential properties of a set of vectors:

  1. Does it span the space? (Topic 3)
  2. Is it linearly independent? (Topic 4)

When a set of vectors satisfies both of these properties, it is special. Such a set is called a basis for the vector space. A basis is an efficient spanning set—it's just large enough to span the entire space without any redundant vectors. We will explore this powerful concept in our next lesson.