Skip to main content

Welcome to a Grasp lesson

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

Lesson 6

Dimension of Vector Spaces

Recommended resources

Hello! Welcome to the final lesson of our first module on Vector Spaces and Subspaces.

In our previous lesson, we established the crucial concept of a basis: a linearly independent set of vectors that spans a given space. We observed that for any given space, like or the space of quadratic polynomials , every basis we could construct seemed to have the same number of vectors (3 in these cases).

Today, we will prove that this observation is a fundamental theorem of linear algebra. The fact that all bases for a vector space have the same size allows us to formally define one of the most important properties of a vector space: its dimension. Dimension captures the intuitive notion of "degrees of freedom" within a space.

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

  • Define the dimension of a vector space and its subspaces.
  • Understand the proof that dimension is a well-defined concept.
  • Compute the dimension of various vector spaces, including the column space and null space of a matrix.
  • Understand and apply the Rank-Nullity Theorem.

1. Dimension is Well-Defined

Our first task is to prove the cornerstone theorem that makes the definition of dimension possible.

Theorem: If a vector space has a basis with vectors, then every basis for must also have exactly vectors.

Because you have an interest in rigorous proofs, we'll dive into the complete argument for this theorem. The core idea is a proof by contradiction, using an elegant technique often called the "Replacement Lemma" or "Steinitz Exchange Lemma."

The following video provides a clear, step-by-step walkthrough of this proof.

Proof: Any subspace basis has same number of elements | Linear Algebra | Khan Academy

Watch this video from Khan Academy to see the proof that any two bases for a given subspace must have the same number of elements. The logic involves starting with two bases of different sizes and showing that this assumption leads to a contradiction.

Watch from the beginning to 20:30. Follow the argument as the presenter assumes a spanning set B with 'm' elements and a basis A with 'n' elements, where m < n. The key is the iterative process of replacing vectors in B with vectors from A while maintaining the spanning property, which ultimately contradicts the linear independence of A.

The proof you just watched is fundamental. It assures us that dimension is an intrinsic, unambiguous property of the vector space itself, not an artifact of a particular basis we happen to choose.


2. Defining Dimension

With that proof in hand, we can now give a formal definition of dimension.

Lecture Notes 1: Vector spaces

These lecture notes from NYU provide a concise, formal definition of dimension and demonstrate the dimension of the familiar space R^n.

Read 'Definition 1.8 (Dimension)' and 'Lemma 1.9 (Dimension of R^n)'. This will formalize the concept we've just proven to be well-defined.

As the notes state, the dimension of a vector space , denoted , is the number of vectors in any of its bases.

Basis and Dimension Definitions with Venn Diagram
A basis is a set of vectors that is both linearly independent and spans the space V. The dimension of V is the size of that set.

Examples of Dimension:

  • : The standard basis contains vectors.
  • : The space of polynomials of degree at most has a standard basis , which contains vectors.
  • Dimension of a plane: A plane through the origin in is a two-dimensional subspace. Any two non-collinear vectors that lie in the plane will form a basis for it.
  • Dimension of a line: A line through the origin is a one-dimensional subspace. Any single non-zero vector on that line forms a basis.
  • The zero space: The vector space containing only the zero vector, , has a basis consisting of the empty set . Its dimension is 0.

To find the dimension of any subspace, the strategy is always the same: find a basis for the subspace and count the number of vectors in it.


3. The Dimensions of Fundamental Subspaces: Rank and Nullity

Two of the most important subspaces you'll encounter are associated with matrices. Given your computer science background, you can think of an matrix as representing a function that transforms vectors from an -dimensional space () to an -dimensional space (). The dimensions of the subspaces related to this transformation tell us a great deal about its behavior.

Let's define these subspaces and their dimensions.

Vector spaces induced by matrices: column, row, and null spaces

This article provides clear definitions and excellent illustrations for the dimensions of the core subspaces associated with a matrix: the column space and the null space.

Read the sections 'Rank: the intrinsic dimensionality of the row and column space' and 'Nullity: the intrinsic dimensionality of the null space'. Focus on the definitions of rank and nullity as the dimensions of their respective spaces.

From the reading, we have two key definitions:

  1. Column Space & Rank: The column space of a matrix , denoted , is the span of its column vectors. Its dimension is called the rank of .

    The rank tells you the dimension of the output image of the transformation.

  2. Null Space & Nullity: The null space of a matrix , denoted , is the set of all vectors such that . Its dimension is called the nullity of .

    The nullity tells you the dimension of the input space that gets "squashed" to the zero vector.

There is a profound and elegant relationship between these two values, captured by the Rank-Nullity Theorem.

The Rank-Nullity Theorem: For any matrix ,

where is the number of columns of .

This theorem states that the dimension of the input space () is partitioned between the dimension of the subspace that gets mapped to zero (the nullity) and the dimension of the subspace that gets mapped non-trivially into the output space (the rank).

The following video provides an excellent statement of the theorem and a complete, rigorous proof.

Oxford Linear Algebra: Rank Nullity Theorem

This video from the Oxford linear algebra series formally states the Rank-Nullity theorem and then walks through a detailed proof. The proof itself is a beautiful application of the concepts of basis and basis extension.

Please watch from 11:14 to the end (28:40). First, focus on the statement of the theorem and the intuition behind it. Then, follow the proof carefully. The strategy is to start with a basis for the kernel (null space), extend it to a basis for the entire domain space, and then show that the image of the added basis vectors forms a basis for the image space.

For an alternative, text-based proof that you can work through at your own pace, the article from mbernste.github.io also provides a very clear proof in its appendix.

Vector spaces induced by matrices: column, row, and null spaces

As a supplement, this section of the article you read earlier provides a clear, text-based proof of the Rank-Nullity Theorem with helpful schematic diagrams.

This is optional. Read the section 'Proof:' under 'Theorem 3 (rank-nullity theorem)' in the Appendix.


Conclusion

This lesson marks the culmination of our first module. We solidified the concept of dimension by proving that it is an intrinsic, well-defined property of any vector space. This allows us to quantify the "size" or "complexity" of these abstract structures.

Key Takeaways:

  • All bases for a given vector space have the same number of elements. This crucial theorem makes the definition of dimension possible.
  • The dimension of a vector space is the number of vectors in any of its bases.
  • To compute the dimension of a subspace, you must find a basis for it and count the vectors.
  • The rank of a matrix is the dimension of its column space.
  • The nullity of a matrix is the dimension of its null space.
  • The Rank-Nullity Theorem provides a fundamental link: for an matrix , .

Preview of the next module:
We have now built the foundational theory of vector spaces. In the next module, "Linear Transformations and Matrices," we will dive deeper into the functions that operate on these spaces. The Rank-Nullity Theorem you learned today is the perfect bridge, as it connects the properties of a matrix to the dimensions of the spaces it acts upon. We will explore matrix operations, how to represent any linear transformation with a matrix, and further explore the deep connection between the properties of a transformation and its matrix representation.