සංගතිකSangathika

SAM · සංගතික · Linear algebra · page 2

Span

The span of some arrows is every point you can reach by adding and scaling them.

Page 1 ended with a question. Take two arrows and allow any amount of each, forwards or backwards. Which points of the plane can you reach? Here are the two arrows: v = (3, 4), the arrow of the 3, 4, 5 triangle, and w = (−1, 1), the second ingredient from Plate 1.7. Every point you land on leaves a dot.

Start with w held at zero and use v alone. Guess the shape the dots will make before you move the slider. Then release w and guess again.

Before you start: page 1, vectors: adding arrows tip to tail, scaling them, and building an arrow as a recipe of two ingredients.

Plate 2.1 · Paint the span

Plate 2.1: an amount of v, then an amount of w, tip to tail. The slate arrow is the result, and every result leaves a dot.
  1. 01
  2. 02
  3. 03
  4. 04
  5. 05
  6. 06
  7. 07
  8. 08
  9. 09
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20

Warm-up · from page 1, vectors

Two questions before you start

WARM-UP 1 OF 2

What is (3, 4) + (−1, 1)?

WARM-UP 2 OF 2

Which arrow is −2(−1, 1)?

Layer 1 · Principle

What two arrows can reach

With w held at zero, every dot in Plate 2.1 falls on one straight line through the origin. That is all one arrow can do: scaling never knocks an arrow off its own line. Release w and the dots leave the line. Press "Paint for me" and they cover the whole picture. No point of the plane is out of reach.

The set of every point you can reach this way is the span of the arrows, written span{v, w}. Books also call it the linear span, or the set of all linear combinations. A linear combination is the name page 1 gave to a recipe such as 2v − 3w.

The span is not the arrows

The commonest mistake is to think the span is the two arrows themselves, or the narrow wedge between them. The arrows are only the ingredients. The span is everything the ingredients can make.

The ingredients

Two tins on a shelf

A paint shop keeps one tin of blue and one tin of yellow. That is two colours, standing on a shelf.

The span

Every colour on the mixing card

Every green the shop can mix from those two tins, in any amounts. Far more than two colours, and almost none of them is on the shelf.

The paint shop breaks down at one point, and the break matters. Nobody can pour a negative amount of paint, so mixed colours always sit between the two tins. Arrows have no such limit. A negative amount of w is w reversed, so a recipe can walk backwards along either arrow, and reach points that are not between them at all.

Plate 2.2 · Reach (−2, −5)?

PREDICT FIRST

The ring sits at (−2, −5), below and behind both arrows. Can some recipe av + bw land on it?

Set the two amounts so that the slate arrow ends on the ring. When you find one recipe, choose another ring. Each one has a recipe, and some need a negative amount.

Recipe
Lands on
Rings reached
0 of 4

Every ring has a recipe, and none of the four needs more than a few whole steps. The ring at (−2, −5) walks backwards along both arrows. The ring at (5, 2) goes forwards along v and backwards along w. A point does not have to lie between the arrows to be in their span.

Layer 2 · Statement

Span, written down

span{v, w} = { av + bw : a, b any numbers }

Read the curly brackets as "the set of all", and the colon as "where". So the span of v and w is the set of all points av + bw, where a and b can be any numbers at all: positive, negative, zero or fractions. The same definition works for one arrow, or for three or more: one amount for each arrow.

Two facts follow at once. First, the origin is in every span, because the recipe with every amount zero lands there. Second, the span of one arrow that is not zero is the whole line through it, in both directions, and not just the arrow. That line is what Plate 2.1 drew while w was held at zero.

The arrows you start withTheir spanExample
Only the zero arrowA single point: the originspan{(0, 0)}
Arrows that all lie on one line through the origin, not all zeroThat whole linespan{v}
Two arrows that point along different linesThe whole planespan{v, w}

The same idea, as code. This leaf's library, sam.js, gains one function on this page, combine, built from page 1's add and scale. Every point of the span is one call of it:

combine(1, vec(3, 4), -2, vec(-1, 1))     // [5, 2]: forwards along v, backwards along w
combine(-1, vec(3, 4), -1, vec(-1, 1))    // [-2, -5]: backwards along both
combine(2, vec(3, 4), 4, vec(-1.5, -2))   // [0, 0]: two arrows that cancel out

The last line uses a new partner, p = (−1.5, −2). Keep it in mind while you try the next plate.

Two arrows do not always fill the plane

Swap w for that new partner, p = (−1.5, −2). It is a real arrow, and it is not zero. The ring is back at (−2, −5).

Predict first: with v and p, will "Paint for me" fill the plane and reach the ring?

No. Paint and see: every dot lands on one line, and the ring stays 1.4 units away from it. Two arrows went in, and only a line came out. Before you read on, look hard at the direction p points. The next lesson is built on what you see.

Plate 2.3 · Parallel partner

Recipe
Lands on
Gap to the ring
Closest so far

Layer 3 · Application

Where span shows up: what your moves can reach

Span is the plain answer to a practical question: given the moves you are allowed, where can you get to? Two street plans show the two answers you met in Plates 2.2 and 2.3.

Two directions

A town with two kinds of street

Picture a town whose streets run in just two directions, like v and w. A driver may go forwards or backwards along any street, as far as she likes. She can reach every corner of the town: the span of the two street directions is the whole plane.

One direction

The coast road

Galle Road runs along the coast. Drive it forwards or backwards as far as you like, and you are still on Galle Road. A second road that runs the same way as the first adds nothing new: the span is still one line.

The same question appears wherever something moves by combining a few fixed moves. A crane that runs on two rails, a robot arm with two sliding joints, and a game character that can only step along two directions each reach exactly the span of their moves. An engineer who wants a machine to reach every point of a flat table needs two moves that point along different lines. A second motor that pushes along the same line as the first is wasted money.

In three dimensions the same question has a new answer. Two arrows that point along different lines span a flat sheet through the origin, like a sheet of paper held at an angle in a room, and not the whole of space. Page 4, basis and coordinates, lifts the picture into three dimensions.

Layer 4 · Specifics

Is a point in the span? Solve for the recipe

The sliders find recipes by trial. Algebra finds them directly. For a point (x, y) to be in the span of v = (3, 4) and w = (−1, 1), there must be amounts a and b with a(3, 4) + b(−1, 1) = (x, y). Compare the two components and you have two equations.

  1. One equation per component. The east parts must agree, and so must the north parts:

    3a − b = x    and    4a + b = y
  2. Add the two equations. The b terms cancel:

    7a = x + y,   so   a = (x + y) ÷ 7
  3. Put a back. The second equation gives b = y − 4a, which simplifies to

    b = (3y − 4x) ÷ 7

Worked example · the ring at (−2, −5)

a = (−2 − 5) ÷ 7 = −1 and b = (3 × (−5) − 4 × (−2)) ÷ 7 = (−15 + 8) ÷ 7 = −1.

Check: −1(3, 4) − 1(−1, 1) = (−3 + 1, −4 − 1) = (−2, −5). The recipe is −v − w, the one you found in Plate 2.2.

For the ring at (0, 7): a = 7 ÷ 7 = 1 and b = 21 ÷ 7 = 3. Check: (3, 4) + 3(−1, 1) = (0, 7).

The two formulas give an answer for every point (x, y), whatever its values. That is the algebra's way of saying the span is the whole plane. The answers need not be whole numbers: the point (1, 2) needs a = 3/7 and b = 2/7.

Notice the 7 that every recipe divides by. It comes from v and w alone: 3 × 1 − (−1) × 4 = 7. Page 9, the determinant, shows what that 7 measures in the picture.

Now try the same steps with v and the partner p = (−1.5, −2). The equations are 3a − 1.5b = x and 4a − 2b = y. Multiply the first by 4/3 and it becomes 4a − 2b = 4x/3. Its left side is exactly the left side of the second equation, so a recipe exists only when y = 4x/3: only for points on the line through v. For the ring at (−2, −5), 4x/3 = −8/3, which is not −5. The equations contradict each other, and no recipe exists. The number that was 7 for v and w is 3 × (−2) − (−1.5) × 4 = 0 here: there is nothing to divide by.

Layer 5 · Exploration

Point, line or plane

Now you choose the arrows. Drag the tips of v and w anywhere. The shading shows their span, and the faint slanted grid shows the whole-number recipes. Try to make the span a line, and then a single point. How many different shapes can the span of two arrows in the plane take?

Plate 2.4 · Point, line or plane

Keyboard: arrow keys move the tip of w, Shift + arrow keys move the tip of v. Tips snap to half steps.

  • v
  • w
  • the span
v
w
Span

The span of some arrows is everything their recipes can reach. In the plane it is always one of three shapes: the origin alone, a line through the origin, or the whole plane.

Retrieval · Check yourself

Check your understanding: six questions, one per idea

QUESTION 1 OF 6

What is the span of v = (3, 4) and w = (−1, 1)?

QUESTION 2 OF 6

What is the span of the single arrow (2, 1)?

QUESTION 3 OF 6

Which point is in the span of every set of arrows, whatever they are?

QUESTION 4 OF 6

What is the span of (2, 1) and (−4, −2)?

QUESTION 5 OF 6

Which recipe of v = (3, 4) and w = (−1, 1) lands on (4, 3)?

QUESTION 6 OF 6

A learner says (1, 2) is not in the span of v and w, because no recipe with whole-number amounts lands on it. Is the learner right?

Challenges · Seed and Branch

Two challenges

Each challenge declares its level. Commit an answer before the solution opens. Hints open one at a time.

Seed

Two recipes, one point

Needs: this page (recipes, and Plate 2.3).

Take v = (3, 4) and the partner p = (−1.5, −2) from Plate 2.3. The recipe 2v + 0p lands on (6, 8). Find a different recipe for the same point that uses no v at all: 0v + bp. What is b? Then think about why two recipes are possible here, when v and w give only one recipe for each point.

Hint 1

You need b(−1.5, −2) = (6, 8). One component is enough to find b; the other checks it.

Hint 2

The east components say −1.5 × b = 6.

Hint 3

Compare p with v. What number times (3, 4) gives (−1.5, −2)?

Hints used: 0 of 3

Branch

Forwards only

Needs: this page (span) and page 1 (direction as an angle).

Allow only amounts that are zero or positive: a ≥ 0 and b ≥ 0, with v = (3, 4) and w = (−1, 1). The points you can reach no longer fill the plane. Describe the region they fill, and give the angle at its corner, in degrees, to one decimal place.

Hint 1

Start with b = 0. Where can a ≥ 0 take you? Then do the same with a = 0.

Hint 2

Those two half lines are the edges of the region. A recipe with both amounts positive adds a bit of each edge, tip to tail, so it lands between them.

Hint 3

Measure both edges from east. The angle of v is the angle whose tangent is 4/3. The arrow w = (−1, 1) points exactly north-west.

Hints used: 0 of 3

Next · page 3, linear independence

Two arrows went into Plate 2.3 and only a line came out. The next lesson asks when an arrow adds something new to a span, and when it is already reachable from the others.

Why did the trail in Plate 2.3 refuse to leave the line?

Page 3, linear independence, is the next lesson to be written.

For the teacher: how this page is sequenced

The page answers the exit question of page 1 and uses page 1's own objects: v = (3, 4) from the 3, 4, 5 triangle, and w = (−1, 1), the second ingredient of Plate 1.7. No new arrow is needed to make the span idea land, and the learner meets two familiar arrows with a new question.

  1. Need before name, act before read. Plate 2.1 opens with the sliders. With w held at zero the learner sees one arrow paint a line; releasing w fills the plane. The word "span" arrives only after the dots have shown what it means.
  2. Misconception first. The span is not the arrows, and not the wedge between them. The paint analogy is chosen because it works for the first half and breaks at the second: paint has no negative amounts. The page names the break before Plate 2.2, the plate the misconception would sabotage.
  3. Predict before reveal. Plate 2.2 asks for a committed yes or no about a point behind both arrows before the hunt. Plate 2.3 asks for a second prediction, about a partner that turns out to be useless.
  4. See, then name on the next page. Plate 2.3 shows a pair of arrows whose span is only a line, and the in-code block shows 2v + 4p = (0, 0). The page deliberately does not use the words "parallel" or "dependent". Page 3 names the idea and asks for a test that does not mention parallel lines.
  5. Specifics as a solution of two equations. Layer 4 solves for the recipe by elimination, without matrices, and leaves two seeds: the number 7 that every recipe divides by (page 9, the determinant) and the equations that contradict each other when the span is a line (page 10, systems).
  6. Exploration. Plate 2.4 lets the learner build all three shapes of span: point, line and plane.
  7. Misconceptions targeted by the check. Q1: the span is the arrows or the wedge. Q2: one arrow spans only itself or a half line. Q3: a span need not pass through the origin. Q4: two arrows always fill the plane. Q5: recipes must use positive amounts. Q6: recipes must use whole numbers.
  8. Challenges. Seed 2.1 is hard because the page's formulas give one recipe for each point, and the challenge asks for a second recipe; the learner has to notice that p is a multiple of v and trade one for the other. Branch 2.2 is hard because it removes negative amounts, the very thing the page relied on, and asks the learner to describe the region that is left and measure it with an angle from page 1.
  9. Plate purposes. Plate 2.1: one arrow paints a line, two arrows paint the plane. Plate 2.2: points behind or beside both arrows are reachable, because amounts can be negative. Plate 2.3: two arrows can still span only a line. Plate 2.4: the span of two arrows in the plane is a point, a line or the plane, and nothing else.
  10. Choices recorded. The predict point is (−2, −5), behind both arrows. With w = (−1, 1), the point (−2, 5) would need 3/7 of v, which no slider hunt can find, and a point behind both arrows attacks the wedge misconception directly.