Linear Combinations and Span

In linear algebra, vectors are more than just arrows; they are fundamental building blocks. Just as we combine numbers with arithmetic operations, we can combine vectors using scalar multiplication and vector addition. This process, known as forming a linear combination, allows us to generate new vectors from a given set. Understanding how to combine vectors and what region of space they can collectively "reach" is crucial for grasping concepts like basis vectors, dimensionality, and even how features interact in machine learning models.

What is a Linear Combination?

A linear combination of a set of vectors is a new vector formed by multiplying each vector by a scalar (a real number) and then adding the results. Think of it as mixing ingredients: each vector is an ingredient, and its scalar multiplier is the quantity. By adjusting these scalar quantities, we can create an infinite variety of new vectors. This operation is foundational because it describes how vectors can be expressed in terms of others, revealing underlying relationships within a vector space.

pythonConstructing a Linear Combination in 2D
📐 Linear Combination Formula

For a set of vectors v1,v2,,vk\mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_k and scalars c1,c2,,ckc_1, c_2, \dots, c_k, a linear combination is expressed as:

c1v1+c2v2++ckvkc_1\mathbf{v}_1 + c_2\mathbf{v}_2 + \dots + c_k\mathbf{v}_k

Visualizing Linear Combinations in 2D

In a 2D plane, scalar multiplication stretches or shrinks a vector, potentially reversing its direction if the scalar is negative. Vector addition then places the tail of the second scaled vector at the head of the first, with the resultant vector extending from the origin to the head of the final vector. This geometric interpretation helps us see how different choices of scalars c1c_1 and c2c_2 allow us to "reach" various points in the plane. The resultant vector is simply the coordinates of that final point.

Geometric Interpretation of a Linear Combination
This plot shows two base vectors, v1 and v2, their scaled versions (c1v1 and c2v2), and the resultant vector from their head-to-tail addition. The resultant vector (0.5, 3.5) is the linear combination.
Loading chart...
Key Insight: The resultant vector of a linear combination is found by scaling each vector and then adding them head-to-tail from the origin.
Check Your Understanding
What happens to a linear combination if all scalar coefficients are zero?

Linear Combinations with More Vectors

The concept of linear combinations extends naturally to any number of vectors and any dimension. For example, in 3D space, we can combine three 3D vectors. If these vectors are linearly independent (meaning none can be formed as a linear combination of the others), they can form any point in that 3D space. This ability to construct any vector from a set of base vectors is fundamental to understanding coordinate systems and basis vectors.

pythonLinear Combination in 3D with Standard Basis Vectors

The Concept of Span

The span of a set of vectors is the collection of all possible vectors that can be formed by taking linear combinations of those vectors. It represents the entire geometric space or subspace that the given vectors can "reach" or "generate." If you imagine a set of vectors as a set of tools, their span is everything you can build with those tools. Understanding span is critical for defining vector spaces and determining the dimensionality of data, which directly impacts how efficiently we can represent and process information.

💡 Span Defines a Subspace

The span of any non-empty set of vectors in a vector space V\mathbf{V} is always a subspace of V\mathbf{V}. This means it includes the zero vector, is closed under vector addition, and is closed under scalar multiplication.

Span of a Single Vector

If you have only one non-zero vector, say v\mathbf{v}, its span is simply all possible scalar multiples of v\mathbf{v}. Geometrically, this forms a line passing through the origin and extending infinitely in both directions along the path of v\mathbf{v}. Any point on this line can be reached by choosing an appropriate scalar. For example, if v=[1,1]\mathbf{v} = [1, 1], its span includes [2,2][2, 2], [3,3][-3, -3], and [0.5,0.5][0.5, 0.5]—all points on the line y=xy=x.

Span of a Single Vector
This plot shows a single vector v and several of its scalar multiples, all lying on the same line through the origin. This line represents the span of v.
Loading chart...
Key Insight: The span of a single non-zero vector is a line passing through the origin.

Span of Two Non-Collinear Vectors

When you have two vectors that are not collinear (meaning one is not a scalar multiple of the other), their span expands beyond a line. In 2D space, two non-collinear vectors can form any point in the entire 2D plane. In 3D space, two non-collinear vectors will span a plane that passes through the origin. This is because their independent directions allow them to "stretch" and "reach" across a two-dimensional surface.

Determining the Geometric Span
Loading diagram...
This diagram illustrates how the collinearity of vectors determines the geometric shape of their span.
Check Your Understanding
What is the span of two non-collinear vectors in 3D space?

Span of Collinear Vectors

If you have a set of vectors where all vectors are collinear (i.e., they all lie on the same line through the origin), adding more vectors to the set will not increase their span. Even if you have ten collinear vectors, their combined linear combinations will still only form a line. This is because each additional vector is essentially redundant; it doesn't introduce a new direction that allows you to reach points off the existing line. This concept is closely related to linear dependence.

pythonSpan of Collinear Vectors
⚠️ Redundant Vectors

If a vector in a set can be expressed as a linear combination of the other vectors in that set, it is linearly dependent. Such a vector does not increase the span of the set; it is redundant in terms of defining the space.

Span and Dimensionality

The concept of span is intrinsically linked to the dimension of a vector space. The dimension of a vector space is the minimum number of linearly independent vectors required to span that space. These vectors form a basis for the space. For instance, to span a 2D plane, you need at least two non-collinear vectors. To span 3D space, you need at least three non-coplanar vectors. In data science, understanding the span of your feature vectors helps identify the true dimensionality of your data, which is crucial for techniques like Principal Component Analysis (PCA) that aim to reduce dimensionality while preserving the data's essential "reach."

Try It Yourself
Using the v1 and v2 from the 2D linear combination example (v1 = [1, 2], v2 = [3, 1]), find scalar coefficients c1 and c2 that result in the target vector target_v = [5, 5]. Can you reach it?
python
Key Takeaways
  • A linear combination is a new vector formed by scaling and adding existing vectors (c1v1++ckvkc_1\mathbf{v}_1 + \dots + c_k\mathbf{v}_k).

  • Scalar coefficients determine the magnitude and direction contribution of each vector in a linear combination.

  • The span of a set of vectors is the collection of all possible linear combinations you can form from them.

  • The span of a single non-zero vector is a line through the origin.

  • Two non-collinear vectors span a plane (in 2D or higher dimensions).

  • Collinear vectors do not increase the dimensionality of the span; their span remains a line.

  • Span is directly related to the dimension of a vector space, where a basis is the minimum set of vectors required to span that space.

← All lessons in Linear Algebra: Vectors

Ready to keep this from fading?

Bitelrn turns lessons like this into a full course — quizzes, a knowledge map, and spaced review.

Get started free