MATH-125 · Lesson 2 of 12 · 32 min

Linear combinations, span and independence

Lesson 1 treated vectors one or two at a time: adding them, scaling them, measuring the angle between them. Linear algebra becomes powerful when we ask what can be built from a collection of vectors. Which forces can three cables supply to hold a load in place? Which colours can a screen produce from red, green and blue light? Which mixtures of three alloys give a required composition? Which positions can a robot arm reach by combining joint motions? Each question asks about linear combinations, sums of scaled vectors. This lesson introduces linear combinations and the span of a set of vectors, the set of everything they can build, and the concept of linear independence, which tells us when a set of vectors has no redundancy. These ideas run through the rest of the course: solving linear systems (Lesson 3), understanding matrices (Lessons 4 and 7), and choosing good coordinates (Lessons 9 and 10).

Linear combinations

A linear combination of vectors \(\mathbf{v}_1, \mathbf{v}_2, \ldots, \mathbf{v}_k\) is any vector of the form:

\[c_1\mathbf{v}_1 + c_2\mathbf{v}_2 + \cdots + c_k\mathbf{v}_k\]

where the scalars \(c_1, \ldots, c_k\) are called the weights or coefficients. Geometrically, a linear combination of two vectors is reached by travelling some distance along the first and then some distance along the second, as when a ship sails partly north and partly east, or when two cables together pull a load in a direction neither pulls alone.

Many engineering questions take the form: can a given vector \(\mathbf{b}\) be written as a linear combination of given vectors, and if so, with which weights? Writing out the components turns this into a system of linear equations.

Worked problem

Mixing alloys

Three alloys contain copper, zinc and tin in the proportions (by mass) \(\mathbf{a}_1 = (0.70, 0.30, 0)\), \(\mathbf{a}_2 = (0.60, 0.20, 0.20)\) and \(\mathbf{a}_3 = (0.90, 0, 0.10)\). Can they be mixed to give 100 kg of a bronze containing 76 kg copper, 18 kg zinc and 6 kg tin?

Show solution
  1. We need masses \(x_1, x_2, x_3\) with \(x_1\mathbf{a}_1 + x_2\mathbf{a}_2 + x_3\mathbf{a}_3 = (76, 18, 6)\).
  2. Components: \(0.7x_1 + 0.6x_2 + 0.9x_3 = 76\); \(0.3x_1 + 0.2x_2 = 18\); \(0.2x_2 + 0.1x_3 = 6\).
  3. From the second, \(x_1 = 60 - \tfrac{2}{3}x_2\); from the third, \(x_3 = 60 - 2x_2\). Substituting in the first: \(42 - 0.467x_2 + 0.6x_2 + 54 - 1.8x_2 = 76\), so \(1.667x_2 = 20\) and \(x_2 = 12\).
  4. Then \(x_1 = 52\) and \(x_3 = 36\). Check: total mass \(52 + 12 + 36 = 100\) kg.

Answer: Mix 52 kg of the first alloy, 12 kg of the second and 36 kg of the third. All three weights are positive, as they must be for a physical mixture; a negative weight would mean the target cannot be made.

Span

The span of a set of vectors is the set of all their linear combinations, written \(\operatorname{span}\{\mathbf{v}_1, \ldots, \mathbf{v}_k\}\). It is everything that can be built from the set.

  • The span of a single non-zero vector in \(\mathbb{R}^3\) is a line through the origin in its direction.
  • The span of two non-parallel vectors in \(\mathbb{R}^3\) is a plane through the origin containing both.
  • The span of three vectors in \(\mathbb{R}^3\) that do not lie in a common plane is all of \(\mathbb{R}^3\).

Spans always pass through the origin, since choosing all weights zero gives the zero vector. A set of vectors spans \(\mathbb{R}^n\) if every vector in \(\mathbb{R}^n\) is a linear combination of them. For example, the standard unit vectors \(\mathbf{i}, \mathbf{j}, \mathbf{k}\) span \(\mathbb{R}^3\), since \((a, b, c) = a\mathbf{i} + b\mathbf{j} + c\mathbf{k}\).

Three-dimensional sketch of the span of two vectors. Two arrows u and v start at the origin and point in different directions. A shaded parallelogram-shaped patch of the plane they span is drawn through the origin, extending in all directions. A third vector w lying in the plane is shown as a combination of u and v, and a fourth vector b sticking out of the plane is marked as not in the span.
Two non-parallel vectors span a plane; vectors off the plane cannot be built from them.

Worked problem

Is a vector in the span?

Is \(\mathbf{b} = (1, 4, 7)\) in the span of \(\mathbf{u} = (1, 2, 3)\) and \(\mathbf{v} = (0, 1, 2)\)? Is \(\mathbf{c} = (1, 4, 8)\)?

Show solution
  1. Seek \(x\mathbf{u} + y\mathbf{v} = \mathbf{b}\): \(x = 1\); \(2x + y = 4\) gives \(y = 2\); check the third component: \(3x + 2y = 7\). It works.
  2. For \(\mathbf{c}\): the first two components give the same \(x = 1\), \(y = 2\), but then \(3x + 2y = 7 \ne 8\).

Answer: b = u + 2v is in the span; c is not, because it lies off the plane spanned by u and v. Three equations in two unknowns usually have no solution, unless the target happens to lie in the plane.

Linear independence

Sometimes a set of vectors contains redundancy: one of them can be built from the others, and removing it does not change the span. For example, \((1, 0)\), \((0, 1)\) and \((2, 3)\) span \(\mathbb{R}^2\), but so do the first two alone, since \((2, 3) = 2(1, 0) + 3(0, 1)\).

Vectors \(\mathbf{v}_1, \ldots, \mathbf{v}_k\) are linearly independent if the only way to combine them to give the zero vector is with all weights zero:

\[c_1\mathbf{v}_1 + c_2\mathbf{v}_2 + \cdots + c_k\mathbf{v}_k = \mathbf{0} \quad \text{only when} \quad c_1 = c_2 = \cdots = c_k = 0\]

Otherwise they are linearly dependent, and at least one of them is a linear combination of the others. Some quick tests:

  • Two vectors are dependent exactly when one is a multiple of the other (they are parallel).
  • Any set containing the zero vector is dependent.
  • Any set of more than \(n\) vectors in \(\mathbb{R}^n\) is dependent: in the plane, three vectors can never be independent.
  • Three vectors in \(\mathbb{R}^3\) are independent exactly when the scalar triple product from Lesson 1, which is the determinant of the matrix with the vectors as columns (Lesson 6), is not zero, meaning they do not lie in a common plane.

Worked problem

Testing independence

Are \(\mathbf{v}_1 = (1, 2, 0)\), \(\mathbf{v}_2 = (0, 1, 1)\) and \(\mathbf{v}_3 = (2, 5, 1)\) linearly independent?

Show solution
  1. Solve \(c_1\mathbf{v}_1 + c_2\mathbf{v}_2 + c_3\mathbf{v}_3 = \mathbf{0}\): components give \(c_1 + 2c_3 = 0\), \(2c_1 + c_2 + 5c_3 = 0\), \(c_2 + c_3 = 0\).
  2. From the first and third: \(c_1 = -2c_3\), \(c_2 = -c_3\). The second: \(-4c_3 - c_3 + 5c_3 = 0\), true for every \(c_3\).
  3. Choosing \(c_3 = 1\) gives \(-2\mathbf{v}_1 - \mathbf{v}_2 + \mathbf{v}_3 = \mathbf{0}\), so \(\mathbf{v}_3 = 2\mathbf{v}_1 + \mathbf{v}_2\).

Answer: They are dependent: v₃ = 2v₁ + v₂, so all three lie in one plane and their span is only that plane, not all of ℝ³.

Bases and coordinates

A basis for a space is a set of vectors that is linearly independent and spans the space: enough vectors to build everything, and no more. Every basis of \(\mathbb{R}^n\) has exactly \(n\) vectors, and \(n\) is called the dimension. Given a basis, every vector can be written as a linear combination of the basis vectors in exactly one way; the weights are the coordinates of the vector in that basis.

The standard basis is the most familiar, but other bases are often more convenient. On an inclined plane, it is easier to use one basis vector along the slope and one perpendicular to it. For a crystal, the natural basis follows the lattice. For a vibrating structure, the most useful basis consists of its natural mode shapes, which Lesson 9 finds as eigenvectors. Changing basis does not change a vector; it changes only the numbers used to describe it.

Worked problem

Coordinates on an incline

On a ramp inclined at 30°, use the basis \(\mathbf{e}_1 = (\cos 30°, \sin 30°)\) along the slope and \(\mathbf{e}_2 = (-\sin 30°, \cos 30°)\) perpendicular to it. Find the coordinates of a weight \(\mathbf{W} = (0, -500)\) N in this basis.

Show solution
  1. Because \(\mathbf{e}_1\) and \(\mathbf{e}_2\) are perpendicular unit vectors, the coordinates are dot products (Lesson 1): \(\mathbf{W}\cdot\mathbf{e}_1 = -500 \times 0.5 = -250\) N.
  2. \(\mathbf{W}\cdot\mathbf{e}_2 = -500 \times 0.866 = -433\) N.

Answer: W = −250e₁ − 433e₂: a component of 250 N pulling down the slope and 433 N pressing into it. With a perpendicular unit basis (an orthonormal basis), coordinates are simply dot products, which is one reason such bases are so valued (Lesson 10).

Engineering examples

Statics: can the cables hold the load?

A load held by several cables is in equilibrium when the cable tensions, each a positive multiple of a unit vector along its cable, sum to balance the weight. The question "can these cables support this load?" is a span question with an extra condition: the weights (tensions) must be non-negative, since cables can pull but not push. Two cables in a vertical plane can support a load hanging between them, but two cables in three-dimensional space span only a plane, so a sideways force would swing the load: at least three non-coplanar cables are needed for full three-dimensional support.

Worked problem

Two cables

A 1,000 N sign hangs from two cables with unit direction vectors \(\mathbf{u}_1 = (-0.6, 0.8)\) and \(\mathbf{u}_2 = (0.8, 0.6)\). Find the tensions.

Show solution
  1. Equilibrium: \(T_1\mathbf{u}_1 + T_2\mathbf{u}_2 = (0, 1000)\).
  2. Components: \(-0.6T_1 + 0.8T_2 = 0\) and \(0.8T_1 + 0.6T_2 = 1000\).
  3. From the first, \(T_1 = \tfrac{4}{3}T_2\); then \(\tfrac{16}{15}T_2 + 0.6T_2 = 1000\), so \(T_2 = 600\) N and \(T_1 = 800\) N.

Answer: Tensions of 800 N and 600 N, both positive, so the cables can hold the sign. The two unit vectors happen to be perpendicular, so the tensions are also the dot products of the required force with each direction.

Colour mixing

A display creates colours by adding red, green and blue light in varying intensities. Each colour the eye perceives can be represented, approximately, as a vector of three numbers, and the colours a display can show are the linear combinations of its three primaries with weights between 0 and full intensity. The primaries are linearly independent, so they span a three-dimensional space of colours, but because weights cannot be negative, the reachable colours fill only a region (the display's gamut), and some very saturated colours lie outside it.

Redundant measurements

In surveying, a position can be fixed from two independent distance measurements in the plane, but surveyors take more measurements than strictly necessary. The extra measurements are dependent on the others in an ideal world, but real measurements contain errors, so they disagree slightly. Redundancy allows errors to be detected and averaged out by least squares, the subject of Lesson 10.

Common mistakes

  • MistakeAssuming three vectors in ℝ³ always span ℝ³.

    InsteadThey span ℝ³ only if they are independent (not coplanar).

  • MistakeConcluding independence because no vector is a multiple of another.

    InsteadWith three or more vectors, one may be a combination of two others; test with the definition or a determinant.

  • MistakeForgetting that every span contains the origin.

    InsteadA plane not through the origin is not a span.

  • MistakeAccepting negative weights in physical mixtures or cable tensions.

    InsteadCheck that the weights satisfy the physical constraints.

  • MistakeThinking a change of basis changes the vector.

    InsteadOnly the coordinates change; the vector itself is the same.

Summary and key terms

  • A linear combination is a sum of scaled vectors; finding weights leads to a linear system.
  • The span of a set is all its linear combinations: a line, a plane or a whole space through the origin.
  • Vectors are linearly independent if only all-zero weights give the zero vector.
  • More than n vectors in ℝⁿ are always dependent; three vectors in ℝ³ are independent if their triple product is non-zero.
  • A basis is an independent spanning set; every basis of ℝⁿ has n vectors.
  • Coordinates in an orthonormal basis are dot products.
  • Span and independence answer engineering questions about support, mixing, colour and redundancy.
Linear combination
A sum of vectors each multiplied by a scalar.
Weights
The scalars in a linear combination.
Span
The set of all linear combinations of a set of vectors.
Linearly independent
No vector in the set is a combination of the others.
Linearly dependent
Some non-trivial combination of the vectors is zero.
Basis
A linearly independent set that spans a space.
Dimension
The number of vectors in any basis of a space.
Coordinates
The weights expressing a vector in a given basis.
Orthonormal basis
A basis of mutually perpendicular unit vectors.
Gamut
The range of colours reachable with non-negative primary intensities.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Write \((7, 2)\) as a combination of \((1, 1)\) and \((1, -1)\).

    Show answer

    4.5(1, 1) + 2.5(1, −1).

  2. Describe the span of \((2, 4, 6)\).

    Show answer

    The line through the origin in direction (1, 2, 3).

  3. Is \((3, 1, 2)\) in the span of \((1, 0, 1)\) and \((1, 1, 0)\)?

    Show answer

    Yes: 2(1, 0, 1) + (1, 1, 0) = (3, 1, 2).

  4. Are \((1, 2)\) and \((-3, -6)\) independent?

    Show answer

    No, the second is −3 times the first.

  5. Can four vectors in ℝ³ be independent?

    Show answer

    No; more than three vectors in ℝ³ are always dependent.

  6. Are \((1, 0, 0)\), \((1, 1, 0)\), \((1, 1, 1)\) independent?

    Show answer

    Yes; the triple product is 1.

  7. Find c so that \((1, 2, c)\) is in the span of \((1, 0, 1)\) and \((0, 1, 1)\).

    Show answer

    c = 3.

  8. What is the dimension of the plane spanned by two non-parallel vectors?

    Show answer

    2.

  9. Coordinates of \((3, 4)\) in the basis \(\tfrac{1}{\sqrt{2}}(1, 1)\), \(\tfrac{1}{\sqrt{2}}(-1, 1)\)?

    Show answer

    7/√2 and 1/√2.

  10. Why does a load need at least three non-coplanar cables for 3D support?

    Show answer

    Two cable directions span only a plane, so forces out of that plane cannot be balanced.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz