Unit 1, lesson 2

Linear Combinations and Span

Linear combinations and their coefficients, the span of a list of generating vectors, how to decide whether a vector lies in a span, and why a redundant generator adds nothing new to the span.

  • Video 2
  • Vectors and Linear Combinations

Suppose you may move only along two fixed vectors, p=(1,0)\mathbf{p} = (1, 0) and q=(1,1)\mathbf{q} = (1, 1), using any real amount of each. Here and below a tuple stands for a column vector. Can you reach (3,2)(3, 2)? Yes, because p+2q=(3,2)\mathbf{p} + 2\mathbf{q} = (3, 2), but the more useful question is which targets can be reached at all, and how to prove an answer either way. This lesson names the combinations you can form, describes the set of everything they reach, and gives a reliable test for whether a given target belongs to it.

Key terms

Linear combination

Definition Let v1,…,vk\mathbf{v}_1, \dots, \mathbf{v}_k be vectors in Rn\mathbb{R}^n and let a1,…,aka_1, \dots, a_k be real numbers. The vector

a1v1+a2v2+⋯+akvka_1\mathbf{v}_1 + a_2\mathbf{v}_2 + \cdots + a_k\mathbf{v}_k

is a linear combination of v1,…,vk\mathbf{v}_1, \dots, \mathbf{v}_k, and the numbers a1,…,aka_1, \dots, a_k are its coefficients. Each coefficient aja_j multiplies the whole vector vj\mathbf{v}_j. Coefficients may be any real numbers, including zero, negative numbers and fractions. All the vectors must lie in the same Rn\mathbb{R}^n, so that the sum is defined.

In plain words Take some amount of each given vector and add the results. The coefficients are the amounts.

Example Let u=(2,1)\mathbf{u} = (2, 1) and v=(1,3)\mathbf{v} = (1, 3). For coefficients aa and bb,

au+bv=[2a+ba+3b].a\mathbf{u} + b\mathbf{v} = \begin{bmatrix} 2a + b \\ a + 3b \end{bmatrix}.

The coefficients a=1a = 1 and b=2b = 2 give u+2v=(4,7)\mathbf{u} + 2\mathbf{v} = (4, 7), and a=1a = 1 and b=−1b = -1 give u−v=(1,−2)\mathbf{u} - \mathbf{v} = (1, -2). Keep the two descriptions of the first result apart. The coefficients 11 and 22 say how much of each vector was used, while 44 and 77 are the entries of the result.

Span

Definition The span of vectors v1,…,vk\mathbf{v}_1, \dots, \mathbf{v}_k in Rn\mathbb{R}^n is the set of all their linear combinations,

span⁡{v1,…,vk}={ a1v1+⋯+akvk∣a1,…,ak∈R }.\begin{aligned} &\operatorname{span}\{\mathbf{v}_1, \dots, \mathbf{v}_k\} \\[0.4em] &\quad = \{\, a_1\mathbf{v}_1 + \cdots + a_k\mathbf{v}_k \mid \\[0.4em] &\qquad\quad a_1, \dots, a_k \in \mathbb{R} \,\}. \end{aligned}

It is a subset of Rn\mathbb{R}^n. It always contains 0\mathbf{0}, by taking every coefficient equal to 00, and it contains each vj\mathbf{v}_j, by taking aj=1a_j = 1 and the other coefficients 00. The span of one nonzero vector is the line through the origin in its direction. If every vj\mathbf{v}_j is the zero vector, the span is {0}\{\mathbf{0}\}, a set with one element.

In plain words The span is everything you can reach with the given vectors using any real amounts. Because the amounts can be negative or very large, the span contains the whole line through the origin along each nonzero given vector, not only the arrow out to its tip.

Example The span of the single vector (1,2)(1, 2) is the set of all vectors t(1,2)=(t,2t)t(1, 2) = (t, 2t) with tt real, the line y=2xy = 2x through the origin. It contains −3(1,2)=(−3,−6)-3(1, 2) = (-3, -6) and 5(1,2)=(5,10)5(1, 2) = (5, 10), neither of which lies on the segment from the origin to (1,2)(1, 2). It does not contain (1,1)(1, 1). The first entry would force t=1t = 1, and then the second entry is 22, not 11.

Generating vectors

Definition If S=span⁡{v1,…,vk}S = \operatorname{span}\{\mathbf{v}_1, \dots, \mathbf{v}_k\}, we say that v1,…,vk\mathbf{v}_1, \dots, \mathbf{v}_k span SS, or generate SS, and we call them generating vectors, or generators, of SS. To prove that given vectors span a set SS, show two inclusions. First, every linear combination of the vectors lies in SS. Second, every vector of SS is a linear combination of them, which is shown by giving coefficients that work for an arbitrary vector of SS.

In plain words Generators are the building blocks, and the span is everything built from them. To show that some vectors reach exactly a given set, check that nothing outside the set is reached and that nothing inside it is missed.

Example Let c1=(1,0,1)\mathbf{c}_1 = (1, 0, 1) and c2=(0,1,1)\mathbf{c}_2 = (0, 1, 1), and let SS be the plane z=x+yz = x + y in R3\mathbb{R}^3. Every combination

ac1+bc2=[aba+b]a\mathbf{c}_1 + b\mathbf{c}_2 = \begin{bmatrix} a \\ b \\ a + b \end{bmatrix}

has third entry equal to the sum of the first two, so it lies in SS. Conversely, a vector in SS has the form (x,y,x+y)(x, y, x + y), and it equals xc1+yc2x\mathbf{c}_1 + y\mathbf{c}_2. So c1\mathbf{c}_1 and c2\mathbf{c}_2 span the plane SS, which is only part of R3\mathbb{R}^3. In the same way p=(1,0)\mathbf{p} = (1, 0) and q=(1,1)\mathbf{q} = (1, 1) span all of R2\mathbb{R}^2, because every (x,y)(x, y) equals (x−y)p+yq(x - y)\mathbf{p} + y\mathbf{q}.

Membership in a span

Definition A vector b\mathbf{b} in Rn\mathbb{R}^n belongs to span⁡{v1,…,vk}\operatorname{span}\{\mathbf{v}_1, \dots, \mathbf{v}_k\} exactly when there are real numbers x1,…,xkx_1, \dots, x_k with

x1v1+⋯+xkvk=b.x_1\mathbf{v}_1 + \cdots + x_k\mathbf{v}_k = \mathbf{b}.

Comparing entries turns this vector equation into nn linear equations in the kk unknown coefficients, and b\mathbf{b} is in the span exactly when these equations have a solution. A yes answer is settled by giving coefficients and checking every entry. A no answer needs a reason why no coefficients at all can work, for example equations that contradict each other.

In plain words To show that a target is reachable, give the recipe and check it. To show that it is not, prove that every recipe fails, not only the ones you tried.

Example With c1=(1,0,1)\mathbf{c}_1 = (1, 0, 1) and c2=(0,1,1)\mathbf{c}_2 = (0, 1, 1), the equation ac1+bc2=(3,−2,1)a\mathbf{c}_1 + b\mathbf{c}_2 = (3, -2, 1) says a=3a = 3, b=−2b = -2 and a+b=1a + b = 1. The first two equations fix the coefficients and the third holds, so (3,−2,1)=3c1−2c2(3, -2, 1) = 3\mathbf{c}_1 - 2\mathbf{c}_2 is in the span. For the target (3,−2,4)(3, -2, 4) the first two equations again force a=3a = 3 and b=−2b = -2, but then a+b=1≠4a + b = 1 \ne 4. No coefficients work, so (3,−2,4)(3, -2, 4) is not in the span. If the generator e3=(0,0,1)\mathbf{e}_3 = (0, 0, 1) is added with a coefficient cc, the third equation becomes a+b+c=4a + b + c = 4, and c=3c = 3 gives

3c1−2c2+3e3=[3−24].3\mathbf{c}_1 - 2\mathbf{c}_2 + 3\mathbf{e}_3 = \begin{bmatrix} 3 \\ -2 \\ 4 \end{bmatrix}.

With all three generators every (x,y,z)(x, y, z) is reached, by a=xa = x, b=yb = y and c=z−x−yc = z - x - y, so they span R3\mathbb{R}^3.

Redundant generator

Definition In a list v1,…,vk\mathbf{v}_1, \dots, \mathbf{v}_k of at least two vectors, a vector vj\mathbf{v}_j is a redundant generator if it is a linear combination of the other vectors in the list. Removing a redundant generator does not change the span. In any combination of the full list, replace vj\mathbf{v}_j by its expression in the others and collect terms. The result is a combination of the shorter list. Conversely, a combination of the shorter list is a combination of the full list with coefficient 00 on vj\mathbf{v}_j. The zero vector in such a list is always redundant, since it equals 00 times any other vector of the list. When a list contains a redundant generator, every vector of its span can be written with more than one choice of coefficients.

In plain words A redundant generator adds a new arrow but no new reach. Everything it could contribute can already be built from the others.

Example Add c3=c1+c2=(1,1,2)\mathbf{c}_3 = \mathbf{c}_1 + \mathbf{c}_2 = (1, 1, 2) to the generators of the plane z=x+yz = x + y. It points in a new direction, yet

ac1+bc2+dc3=(a+d)c1+(b+d)c2,\begin{aligned} &a\mathbf{c}_1 + b\mathbf{c}_2 + d\mathbf{c}_3 \\[0.4em] &\quad = (a + d)\mathbf{c}_1 + (b + d)\mathbf{c}_2, \end{aligned}

so the span is still the same plane. Three vectors in R3\mathbb{R}^3, none a multiple of another, can therefore fail to span R3\mathbb{R}^3. A sharper case uses only the two generators c1\mathbf{c}_1 and 2c12\mathbf{c}_1. Then ac1+b(2c1)=(a+2b)c1a\mathbf{c}_1 + b(2\mathbf{c}_1) = (a + 2b)\mathbf{c}_1, so the span is only the line through the origin in the direction of c1\mathbf{c}_1. The choices a=3,b=0a = 3, b = 0 and a=1,b=1a = 1, b = 1 both give 3c1=(3,0,3)3\mathbf{c}_1 = (3, 0, 3), and the target (3,0,2)(3, 0, 2) is out of reach, because every multiple of c1\mathbf{c}_1 has equal first and third entries.

Check yourself

  1. Write (3,4)(3, 4) as a linear combination of (1,2)(1, 2) and (0,1)(0, 1).
Show the answer

We need a(1,2)+b(0,1)=(a,2a+b)a(1, 2) + b(0, 1) = (a, 2a + b) to equal (3,4)(3, 4). The first entry gives a=3a = 3, and then 6+b=46 + b = 4 gives b=−2b = -2. As a check,

3[12]−2[01]=[36]+[0−2]=[34].3\begin{bmatrix} 1 \\ 2 \end{bmatrix} - 2\begin{bmatrix} 0 \\ 1 \end{bmatrix} = \begin{bmatrix} 3 \\ 6 \end{bmatrix} + \begin{bmatrix} 0 \\ -2 \end{bmatrix} = \begin{bmatrix} 3 \\ 4 \end{bmatrix}.
  1. Is (4,−1,2)(4, -1, 2) in the span of c1=(1,0,1)\mathbf{c}_1 = (1, 0, 1) and c2=(0,1,1)\mathbf{c}_2 = (0, 1, 1)? If not, which coefficient on e3=(0,0,1)\mathbf{e}_3 = (0, 0, 1) reaches it once e3\mathbf{e}_3 is added as a third generator?
Show the answer

Every combination ac1+bc2a\mathbf{c}_1 + b\mathbf{c}_2 equals (a,b,a+b)(a, b, a + b). The first two entries force a=4a = 4 and b=−1b = -1, and then the third entry is 33, not 22. So (4,−1,2)(4, -1, 2) is not in the span. Checking only the first two entries would wrongly suggest that it is. Once e3\mathbf{e}_3 is added with a coefficient cc, every combination equals (a,b,a+b+c)(a, b, a + b + c). The first two entries still force a=4a = 4 and b=−1b = -1, so the third entry is 3+c3 + c, and it equals 22 only for c=−1c = -1. Indeed 4c1−c2−e3=(4,−1,2)4\mathbf{c}_1 - \mathbf{c}_2 - \mathbf{e}_3 = (4, -1, 2).

  1. The vectors (1,1,0)(1, 1, 0), (0,1,1)(0, 1, 1) and (1,2,1)(1, 2, 1) lie in R3\mathbb{R}^3, and none of them is a multiple of another. Do they span R3\mathbb{R}^3?
Show the answer

No. The third vector is the sum of the first two, so it is a redundant generator, and the span equals the span of (1,1,0)(1, 1, 0) and (0,1,1)(0, 1, 1). Those combinations are

a[110]+b[011]=[aa+bb],a\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} + b\begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix} = \begin{bmatrix} a \\ a + b \\ b \end{bmatrix},

so the span is the plane y=x+zy = x + z. For example, (1,0,0)(1, 0, 0) is not in it. Its first and third entries would force a=1a = 1 and b=0b = 0, and then the middle entry would be 11, not 00.

How this lesson connects