๐Ÿงฎ Linear Algebra Kingdom ยท Linear Algebra

Span

Everywhere a set of vectors can reach: decide whether a vector lies in a span, recognise a span as the origin, a line, a plane or the whole space, find the value that puts a vector inside one, and say how many vectors it takes to span n dimensions.

In short

  • The span of a set is every linear combination of it, so it always contains the origin and always runs forever in both directions.
  • A span is the origin, a line, a plane or the whole space โ€” and which one it is comes from the number of pivots, never from the number of vectors.
  • Asking whether b is in a span is asking whether one system of equations is consistent; reduce and look for a row saying 0 = a non-zero number.
  • The columns of a matrix span Rm exactly when reduction leaves a pivot in every row, so spanning Rn always needs at least n vectors.

Everywhere the poles can name

Cartwright Vela sets two poles in the ground at Basis Camp and refuses to give directions any other way. Every field on the isle, she says, is "so many of this one and so many of that one" โ€” and if a field cannot be named that way, then as far as her two poles are concerned it does not exist.

That is what a span is. Given a set of vectors, the span of the set is every vector you can build out of them using linear combinations: pick a weight for each vector, add up the results, and whatever comes out is in the span.

Span{u, v} = every vector of the form c1*u + c2*v, for any numbers c1 and c2

Three things follow straight away, and they are worth saying out loud because every question in this craft leans on one of them.

The origin is always in the span. Take every weight to be 0 and the sum is the zero vector. So a span never misses the origin โ€” which is why "2x + 3y - z = 4" can never describe a span, however much it looks like a plane.

A span is closed. Add two things in the span and you are still in the span; scale something in the span and you are still in the span. Nothing you do with combinations can take you outside it.

A span has no edges. The weights are any numbers at all, positive, negative or zero, so a span runs forever in both directions along every one of its vectors. Span{u} is a whole line, not a segment from the origin to u.

The four shapes a span can be

Here is the surprise: a span is never a complicated object. Whatever vectors you start from, in R3 there are exactly four possible answers.

  • Just the origin. Only happens when every vector in the set is the zero vector.
  • A line through the origin. One independent direction. Span{u} is always this, for any non-zero u.
  • A plane through the origin. Two independent directions.
  • The whole of R3. Three independent directions.

The words that matter there are independent directions, and they are not the same thing as the number of vectors. Ten vectors that are all multiples of one another still carry only one direction, and their span is still a line.

So counting is the whole job, and row reduction is how you count. Set the vectors out as the rows of a matrix, reduce it, and count the pivots. That count โ€” the rank โ€” is the number of independent directions, and the shape follows from it:

0 pivots -> the origin 1 pivot -> a line 2 pivots -> a plane 3 pivots -> all of R3

The same table runs in any dimension: k pivots gives a k-dimensional flat piece through the origin, and when k reaches n the span is all of Rn.

A worked feel for it: u = [1, 2, 3] and v = [2, 4, 6] look different, but v = 2u, so reduction leaves one pivot and Span{u, v} is a line. Change v to [2, 4, 7] and reduction leaves two pivots, so the same question now answers "a plane".

Is this particular vector in the span?

"Is b in Span{a1, a2}?" is a question with a completely mechanical answer, and it is the same question as "does x1*a1 + x2*a2 = b have a solution?"

Written out slot by slot, that vector equation is an ordinary system of equations with x1 and x2 as the unknowns, and the way to settle a system is to reduce it. Build the augmented matrix with a1 and a2 as columns and b on the right, and reduce.

consistent -> weights exist -> b IS in the span a row reading 0 = a non-zero number -> no weights exist -> b is NOT in the span

Nothing else in the reduction matters. In particular, whether the weights are unique is a different question altogether โ€” it is about independence, not about membership.

For the span of a single vector there is a shortcut, because Span{u} is just the multiples of u. Divide entry by entry and see whether every slot gives the same number:

u = [4, -2, 1], v = [16, -8, 4]: 16/4 = 4, -8/-2 = 4, 4/1 = 4 -> v = 4u, so yes u = [4, -2, 1], v = [16, -9, 4]: the middle slot gives 4.5, not 4 -> no

The trap is checking one slot and stopping. A slot that agrees proves nothing on its own; only a slot that disagrees settles anything by itself.

Do these vectors span the whole space?

The last kind of question turns the problem round. Instead of one target b, it asks about every b at once: do the columns of A span Rm?

Because "b is in the span" means "Ax = b is solvable", spanning all of Rm means Ax = b is solvable for every b. And that happens exactly when reduction of A leaves a pivot in every row. A row with no pivot becomes a row of zeros, and some choice of b then puts a non-zero number on the right of it, which no x can ever satisfy.

pivot in every row -> the columns span Rm a row with no pivot -> they do not, and the span is a smaller flat piece inside Rm

Notice which way round that is. Spanning is about rows; independence, in the next craft, is about columns. Mixing them up is the single most common slip in this part of the course.

One consequence worth carrying: spanning Rn needs at least n vectors, because n pivots need n columns to sit in. More than n is allowed โ€” the extra ones simply repeat directions already there โ€” but fewer than n can never be enough, however clever the numbers look.

Finally, a plane through the origin can be described two ways, and both are useful. As a span it is "everything you can build from u and v". As an equation it is ax + by + cz = 0, where (a, b, c) is a direction perpendicular to both u and v โ€” found by solving nยทu = 0 and nยทv = 0. The right-hand side is 0 and never anything else, because the origin has to be on it.

Worked examples

Example 1

u = [2, -1, 3] and v = [-6, 3, -9]. What does Span{u, v} look like?

  1. Test whether one is a multiple of the other: divide slot by slot, -6/2 = -3, 3/-1 = -3, -9/3 = -3.
  2. Every slot gives the same number, so v = -3u and v adds no direction the set did not already have.
  3. That leaves one independent direction, so reduction finds one pivot.
  4. One direction in R3 spans a line through the origin โ€” the line along u.

Example 2

a1 = [1, 0, 2], a2 = [0, 1, -1] and b = [3, 2, 4]. Is b in Span{a1, a2}?

  1. Ask instead whether x1*a1 + x2*a2 = b has a solution, one equation per slot.
  2. The first slot gives x1 = 3 and the second gives x2 = 2, so those are the only candidates.
  3. Check them in the third slot: 2*(3) + (-1)*(2) = 4, which is exactly what b has there.
  4. The system is consistent, so b = 3a1 + 2a2 and b is in the span.

Example 3

Do the columns of A = [[1, 2, 3], [2, 4, 6]] span R2?

  1. Reduce A: the second row is twice the first, so subtracting twice the first row leaves [0, 0, 0].
  2. The reduced form has a pivot in the first row and a row of zeros underneath, so there is 1 pivot for 2 rows.
  3. A row without a pivot means some b makes the system inconsistent, so not every b is reachable.
  4. The columns do not span R2; their span is only a line through the origin.

Practice problems, with solutions

Three problems of increasing difficulty, each with the full working. In the game these are generated fresh every time; these three are fixed so this page always shows the same ones.

Problem 1

Difficulty 1 of 5

u = [2, 2] v = [8, 8] Is v in Span{u}?

  1. Yes โ€” v = 4u, so v sits on the line through the origin along u.
  2. Yes โ€” Span{u} is the whole of R2, so every vector belongs to it.
  3. No โ€” the entries of v are not all the same multiple of the entries of u.
  4. No โ€” Span{u} holds only u and the zero vector, and nothing else.

Answer: A. Yes โ€” v = 4u, so v sits on the line through the origin along u.

  1. Slot by slot, v over u gives 8/2, 8/2.
  2. Every slot gives 4, so v = 4u.
  3. One multiplier works throughout, so v is in Span{u}.

Problem 2

Difficulty 3 of 5

u = [5, 0, 1] v = [3, -1, 1] What does Span{u, v} look like?

  1. the whole of R3
  2. just the origin โ€” the single point 0 and nothing else
  3. a line through the origin
  4. a plane through the origin

Answer: D. a plane through the origin

  1. Set the 2 vectors out as rows and reduce.
  2. The reduced form has 2 pivots, so the set carries 2 independent directions.
  3. 2 directions in R3 span a plane through the origin.

Problem 3

Difficulty 4 of 5

a1 = [2, 5, 0] a2 = [-5, -4, 3] b = [-3, 1, 3] Is b in Span{a1, a2}?

  1. No โ€” two vectors can never reach a vector of R3, because R3 needs 3 vectors to be reached.
  2. Yes โ€” b is in the span, and there is more than one pair of weights that reaches it.
  3. No โ€” reducing the augmented matrix leaves a row reading 0 = a non-zero number, which no weights can satisfy.
  4. Yes โ€” the reduced system is consistent, so b is a combination of a1 and a2.

Answer: D. Yes โ€” the reduced system is consistent, so b is a combination of a1 and a2.

  1. Write the question as x1*a1 + x2*a2 = b, with a1 and a2 as the columns of the augmented matrix and b on the right.
  2. The reduction is consistent: b = a1 + a2.
  3. Weights exist, so b is in Span{a1, a2}.

Common mistakes

  • Checking one slot of the ratio v over u, seeing it agree and calling v a multiple โ€” a multiple has to hold in every slot at once.
  • Counting the vectors instead of the pivots, so a set of three vectors with a repeat inside it gets called "all of R^3".
  • Writing the equation of a span as ax + by + cz = d with d not 0, which describes a plane that misses the origin and so cannot be a span.
  • Reading "b is in the span" as "the columns span the space" โ€” one is a question about a single vector, the other about every vector at once.

What you should be able to do

  • Decide whether a vector lies in the span of a given set, and find the value that puts it there.
  • Describe the span of one, two or three vectors as a point, a line, a plane or the whole space.
  • Decide whether the columns of a matrix span the whole space, and how many vectors that needs.
  • Give the equation of the plane a span fills.

Where this fits in the curriculum

Common Core

  • HSN-VM.B.4

    High school โ€” Add and subtract vectors.

    HSN-VM.B.4 is a (+) standard โ€” beyond the college- and career-ready threshold, i.e. precalculus rather than Algebra II.

  • HSN-VM.B.5

    High school โ€” Multiply a vector by a scalar.

    HSN-VM.B.5 is a (+) standard โ€” beyond the college- and career-ready threshold, i.e. precalculus rather than Algebra II. HSN-VM.B.4 and HSN-VM.B.5 cover the two moves a span is built from โ€” adding vectors and scaling one โ€” and nothing further. The span itself, every vector those two moves can reach, is named in no published framework; the Common Core stops at the operations.

Learn these first

This leads on to