Skip to content

Linear combinations and span

Stretch two arrows and add them to see every place they can reach, and spot when a second arrow adds nothing new.

Helps to know firstVectors

Helps to know first
This topic

First, the picture

You may travel along two arrows, any amount, forwards or back. Watch where you can get to: the dots fill the plane.

When two arrows lose a dimension

Every dot is c v + d w, for weights c and d between −3 and 3.

Two arrows, v = (2, 1) and w = (1, 2). Each dot will be one trip: c lengths of v, then d of w, with c and d between −3 and 3.

the dots fill
the whole plane
0.00 / 8.80 s
Describe this picture

A square grid with two arrows from the origin, v=(2,1)\mathbf{v}=(2,1) and w=(1,2)\mathbf{w}=(1,2). Over 6 s, dots land one after another at c v+d wc\,\mathbf{v}+d\,\mathbf{w} for many pairs of weights cc and dd between −3-3 and 3, until they cover the grid. The pairs come from a fixed sequence, so the same moment always shows the same dots. A readout says what the dots fill: “the whole plane” or “a line”. One control, once the clip has finished: drag the tip of w\mathbf{w}, or move it with the arrow keys, in steps of half a unit. When w\mathbf{w} lies on the line of v\mathbf{v}, the cloud collapses onto that line and the readout says “a line”.

Travelling with two arrows

Here is a game. You stand at the origin and hold two arrows, v=(2,1)\mathbf{v}=(2,1) and w=(1,2)\mathbf{w}=(1,2). You may walk along v\mathbf{v} as far as you like, forwards or backwards, and then along w\mathbf{w} as far as you like. Where can you end up?

Walk 2 lengths of v\mathbf{v} and 1 length of w\mathbf{w}, and you arrive at

2 v+1 w=(4,2)+(1,2)=(5,3).2\,\mathbf{v}+1\,\mathbf{w}=(4,2)+(1,2)=(5,3).

Walk half of v\mathbf{v} backwards and 3 of w\mathbf{w}: −12v+3 w=(−1,−0.5)+(3,6)=(2,5.5)-\tfrac12\mathbf{v}+3\,\mathbf{w}=(-1,-0.5)+(3,6)=(2,5.5). Each choice of two amounts lands you on one point, and each dot in the picture at the top of the page is one such choice.

Every trip has the same shape: scale each arrow by a number, then add. The result

c v+d wc\,\mathbf{v}+d\,\mathbf{w}

is a linear combination of v\mathbf{v} and w\mathbf{w}. The two numbers cc and dd are its weights. “Linear” means only these two things happen: scaling and adding. Nothing is squared and nothing is multiplied by another arrow.

The span: every place you can reach

Watch the clip again. The dots spread out in every direction and keep filling the gaps. Given enough trips, you can reach any point of the plane with these two arrows.

The set of all the places you can reach is the span of the arrows, written

span{v,w}={ c v+d w },\mathrm{span}\{\mathbf{v},\mathbf{w}\}=\{\,c\,\mathbf{v}+d\,\mathbf{w}\,\},

where cc and dd run over all numbers.

For v=(2,1)\mathbf{v}=(2,1) and w=(1,2)\mathbf{w}=(1,2) the span is the whole plane, R2\mathbb{R}^2.

Fewer arrows reach less. With one arrow v\mathbf{v} you can only walk along it, so its span is the line through the origin in the direction of v\mathbf{v}. The zero vector is a stranger case: every multiple of 0\mathbf{0} is 0\mathbf{0}, so its span is a single point, the origin. Every span contains the origin, because you can always choose all the weights to be 0.

When an arrow adds nothing

Now drag the tip of w\mathbf{w} onto the line of v\mathbf{v} and watch the cloud. The dots stop filling the plane and fall onto one line, and the readout changes to “a line”.

Here is why. Put w\mathbf{w} at (4,2)(4,2), which is 2v2\mathbf{v}. Then every trip is

c (2,1)+d (4,2)=(2c+4d,  c+2d)=(c+2d) (2,1),\begin{aligned} c\,(2,1)+d\,(4,2)&=(2c+4d,\;c+2d)\\ &=(c+2d)\,(2,1), \end{aligned}

a multiple of (2,1)(2,1). Walking along w\mathbf{w} only moves you along the line you could already reach with v\mathbf{v}. The second arrow adds nothing new, and two arrows span only a line.

So the count of arrows is not what matters. What matters is whether each new arrow points somewhere the others can’t reach. Two arrows that are not on one line span the plane; two arrows on one line span only that line.

Three arrows in space

In space, points have three components. One arrow spans a line, and two arrows not on one line span a flat plane through the origin. A third arrow fills all of space, but only if it points out of that plane.

Three arrows in space

Each dot is a combination of the three arrows. Where can they reach?

Three axes of space, x_1, x_2 and x_3, and the floor, where x_3 = 0.

third arrow
(1, 1, 0)
the dots fill
–
0.00 / 18.30 s
Describe this picture

A slowly turning view of 3-D space: three axes, a square of the floor where the third component is 0, and three arrows that grow from the origin one after another, (1,0,0)(1,0,0), (0,1,0)(0,1,0) and (1,1,0)(1,1,0). Dots then land at combinations of the three arrows, and every one lands on the floor. Then the third arrow lifts up to (1,1,1)(1,1,1), a dotted box appears around the axes, and dots at the new combinations fill the box, above and below the floor. A readout names the third arrow, and a second says what the dots fill: “the floor, a plane” or “all of space”. There is no control.

Watch the dots before and after the swap. The arrow (1,1,0)(1,1,0) is (1,0,0)+(0,1,0)(1,0,0)+(0,1,0), so it lies in the floor already, and three arrows paint only the floor. The arrow (1,1,1)(1,1,1) points up out of the floor, and with it the dots reach every height.

Reaching a given point

Often the question comes the other way round: here is a target, can I reach it, and with which weights? Take the target b=(5,4)\mathbf{b}=(5,4) and the arrows (2,1)(2,1) and (1,2)(1,2). I need weights cc and dd with

c (2,1)+d (1,2)=(5,4).c\,(2,1)+d\,(1,2)=(5,4).

Comparing the two components gives two equations, one per component:

2c+d=5,c+2d=4.\begin{aligned} 2c+d&=5,\\ c+2d&=4. \end{aligned}

The worked example below solves them. If the equations have a solution, the target is in the span; if they have none, it is not. In A matrix moves the plane the two arrows become the columns of a table of numbers, and this same question gets its own short notation.

In signal processing · signals from impulses

A signal of three samples, x[0]=2x[0]=2, x[1]=−1x[1]=-1, x[2]=3x[2]=3, is the linear combination x[n]=2 δ[n]−δ[n−1]+3 δ[n−2]x[n]=2\,\delta[n]-\delta[n-1]+3\,\delta[n-2] of three shifted impulses. As a vector it is (2,−1,3)(2,-1,3), counted from 1: x1=x[0]x_1=x[0]. Writing every input this way is how The impulse response, in the signal processing course, describes every linear time-invariant system.

Worked example

1. Reaching (5,4)(5,4) with (2,1)(2,1) and (1,2)(1,2). From 2c+d=52c+d=5, write d=5−2cd=5-2c. Put that into c+2d=4c+2d=4:

c+2(5−2c)=4c+10−4c=4−3c=−6c=2.\begin{aligned} c+2(5-2c)&=4\\ c+10-4c&=4\\ -3c&=-6\\ c&=2. \end{aligned}

Then d=5−2⋅2=1d=5-2\cdot2=1. Check: 2(2,1)+1(1,2)=(4,2)+(1,2)=(5,4)2(2,1)+1(1,2)=(4,2)+(1,2)=(5,4). The target is in the span.

2. The same target with (2,1)(2,1) and (4,2)(4,2). Every combination is a multiple of (2,1)(2,1), so its second component is half its first. For (5,4)(5,4), half of 5 is 2.5, not 4. No weights work: (5,4)(5,4) is not in the span of (2,1)(2,1) and (4,2)(4,2).

3. Three arrows in space. With three arrows I need three weights; I’ll call them aa, bb and cc. Reach (2,3,5)(2,3,5) with (1,0,0)(1,0,0), (0,1,0)(0,1,0) and (1,1,1)(1,1,1):

a (1,0,0)+b (0,1,0)+c (1,1,1)=(a+c,  b+c,  c)=(2,3,5).\begin{aligned} &a\,(1,0,0)+b\,(0,1,0)+c\,(1,1,1)\\ &\quad=(a+c,\;b+c,\;c)=(2,3,5). \end{aligned}

The last component gives c=5c=5 at once. Then a+5=2a+5=2 gives a=−3a=-3, and b+5=3b+5=3 gives b=−2b=-2. Check: (−3,0,0)+(0,−2,0)+(5,5,5)=(2,3,5)(-3,0,0)+(0,-2,0)+(5,5,5)=(2,3,5).

Predict before you drag: if w=3v\mathbf{w}=3\mathbf{v}, what does the cloud look like? A line, the line of v\mathbf{v}.

Where you’ll meet this

Colour on a screen. Every pixel mixes red, green and blue light. The colour you see is a linear combination of three fixed colours, with the three brightnesses as weights. The span of those three is every colour the screen can show.

Chords and superposition. A chord is a mix of notes sounding together. Its waveform is the sum of the notes’ waveforms, each scaled by how loudly it is played: a linear combination of signals.

Equalisers. An audio equaliser splits sound into bands, scales each band by a gain and adds them back. The output is a linear combination of the band signals, with the slider settings as weights, as in Audio equalisers and biquads.

Reference card

QuantityFormulaNotes
Linear combinationc v+d wc\,\mathbf{v}+d\,\mathbf{w}scale each arrow, then add; cc, dd are the weights
Spanspan{v,w}\mathrm{span}\{\mathbf{v},\mathbf{w}\}every combination: all places you can reach
One arrowa line through the originthe zero vector alone spans just the origin
Two arrows in the planethe whole plane, or a linea line when one arrow is a multiple of the other
Three arrows in spaceall of space, a plane, a line, or the originall of space only if no arrow lies in the span of the others
Is b\mathbf{b} reachable?solve c v+d w=bc\,\mathbf{v}+d\,\mathbf{w}=\mathbf{b}one equation per component

Keep reading with a free account.

By creating an account you accept the terms of use.

Sign in

Already have an account? Use the service you signed up with.

Or keep reading: get new lessons by email

Are you 13 or over?

Accounts and email updates are for people aged 13 or over. We keep only your answer, never your date of birth.

End of the lesson

Where to go next.

Phasorium

Account

Sign inKeep your place on any device

Subjects

Site

Look