← mapVector Spaces

Span & Linear Combinations

⚗ Dr. Möbius, from the lab

I'm going to tell you a secret that linear algebra spends a whole semester pretending is many ideas: there is only one move. Scale some vectors, add the results. That's it. That's the entire goddamn art form. Everything — span, basis, rank, eigenvectors, the works — is just that one move asked in different accents. Today we name it, and then we name everything it can reach.

THE BIG IDEA

A linear combination scales vectors and adds them; the span of a set is all such combinations, and it is always the smallest subspace containing the set.

The only move in the building

Take vectors v1,v2,,vkv_1, v_2, \dots, v_k in a vector space VV and scalars c1,c2,,ckRc_1, c_2, \dots, c_k \in \mathbb{R}. The expression c1v1+c2v2++ckvkc_1 v_1 + c_2 v_2 + \cdots + c_k v_k is a linear combination of the viv_i. Scale each vector, add them all up. The cic_i are the coefficients or weights.

I am not exaggerating when I say this is the only operation in linear algebra. Matrix multiplication is built from it. Solving systems is reverse-engineering it. The whole Subspaces node was secretly about which sets are closed under it (because closure under ++ and scaling together is exactly closure under linear combinations). Burn the phrase into your skull: linear algebra is the study of linear combinations and nothing else. If you think something else is happening, look again — it's a linear combination wearing a hat.

Span: everything you can reach

Given a set S={v1,,vk}S = \{v_1, \dots, v_k\}, the span of SS is the set of all linear combinations you can form from it: span(S)={c1v1++ckvk:c1,,ckR}.\operatorname{span}(S) = \{ c_1 v_1 + \cdots + c_k v_k : c_1, \dots, c_k \in \mathbb{R} \}. It's every destination reachable by scaling and adding. If you hand me three vectors, span\operatorname{span} is the complete map of where those three can take you.

Span is a subspace (and here's the proof)

This is the theorem that makes span worth defining. Reach for the three-condition test from the Subspaces node.

Theorem. For any v1,,vkVv_1, \dots, v_k \in V, span(v1,,vk)\operatorname{span}(v_1, \dots, v_k) is a subspace of VV.

Proof. Let W=span(v1,,vk)W = \operatorname{span}(v_1, \dots, v_k).

  1. Contains 0\mathbf{0}. Take all coefficients zero: 0v1++0vk=00v_1 + \cdots + 0v_k = \mathbf{0} (using 0v=00v = \mathbf{0} from the Vector Spaces node). So 0W\mathbf{0} \in W. ✓
  2. Closed under addition. Take two elements of WW: x=a1v1++akvk,y=b1v1++bkvk.\mathbf{x} = a_1 v_1 + \cdots + a_k v_k, \qquad \mathbf{y} = b_1 v_1 + \cdots + b_k v_k. Add them and group by like vectors (commutativity + the distributive axioms): x+y=(a1+b1)v1++(ak+bk)vk.\mathbf{x} + \mathbf{y} = (a_1 + b_1)v_1 + \cdots + (a_k + b_k)v_k. That's again a linear combination of the viv_i, so x+yW\mathbf{x} + \mathbf{y} \in W. ✓
  3. Closed under scaling. For cRc \in \mathbb{R}: cx=c(a1v1++akvk)=(ca1)v1++(cak)vkW.  c\mathbf{x} = c(a_1 v_1 + \cdots + a_k v_k) = (ca_1)v_1 + \cdots + (ca_k)v_k \in W. \;✓

All three conditions hold, so WW is a subspace. \blacksquare

In fact span(S)\operatorname{span}(S) is the smallest subspace containing SS: any subspace that contains all the viv_i must (being closed under combinations) contain every linear combination of them, hence all of span(S)\operatorname{span}(S). Span is the tightest possible subspace wrapper around your vectors.

The geometry: lines, planes, and "is ww in there?"

Picture it in R3\mathbb{R}^3:

  • Span of one nonzero vector vv: all scalar multiples cvcv — a line through the origin.
  • Span of two non-parallel vectors u,vu, v: a plane through the origin.
  • Span of two parallel vectors: collapses back to a line (the second adds nothing — hold that thought, it's the whole next node).

Drag the two vectors below and the slider weights; the dot is the linear combination c1u+c2vc_1 u + c_2 v. Watch which points it can and can't reach — that reachable set is the span.

vector playground — linear combinations
u = (2, 1)v = (-1, 2)c₁u + c₂v = (1, 3)

Now the question that powers the rest of the course: is a given vector ww in span(v1,,vk)\operatorname{span}(v_1, \dots, v_k)? By definition, that asks: do there exist coefficients c1,,ckc_1, \dots, c_k with c1v1++ckvk=w?c_1 v_1 + \cdots + c_k v_k = w? That is a system of linear equations in the unknowns cic_i. And solving systems is exactly what Gaussian elimination from the Matrices stratum does. So: wspan(v1,,vk)    the system c1v1++ckvk=w has a solution.w \in \operatorname{span}(v_1, \dots, v_k) \iff \text{the system } c_1 v_1 + \cdots + c_k v_k = w \text{ has a solution.} The abstract membership question cashes out as elimination. This is the marriage again: a Sets-flavored "is it in the set?" answered by a Matrices-flavored row reduction.

Column space: the matrix's own span

Here's where it gets gorgeous. Stack vectors v1,,vnv_1, \dots, v_n as the columns of a matrix AA. Then the product AxA\mathbf{x} is, by the definition of matrix–vector multiplication (Matrices stratum), exactly Ax=x1v1+x2v2++xnvnA\mathbf{x} = x_1 v_1 + x_2 v_2 + \cdots + x_n v_n — a linear combination of the columns, weighted by the entries of x\mathbf{x}. So the set of all possible outputs AxA\mathbf{x} is the span of the columns. We name it the column space: Col(A)=span(columns of A).\operatorname{Col}(A) = \operatorname{span}(\text{columns of } A).

And the headline theorem of solvability — and I want you to feel the weight of this: Ax=b has a solution    bCol(A).A\mathbf{x} = \mathbf{b} \text{ has a solution} \iff \mathbf{b} \in \operatorname{Col}(A). Read that in plain English: Ax=bA\mathbf{x} = \mathbf{b} is solvable exactly when b\mathbf{b} can be mixed from the columns of AA. "Solving a system" means "expressing b\mathbf{b} as a mixture of columns." You've been computing spans since the Matrices stratum without knowing the word — and that should feel a little bit like finding out your name in a foreign language.

Spanning sets, and a teaser

A set SS spans VV if span(S)=V\operatorname{span}(S) = V — every vector in VV is reachable. For Rn\mathbb{R}^n, the standard basis e1,,ene_1, \dots, e_n (the columns of the identity matrix) spans, since (x1,,xn)=x1e1++xnen(x_1, \dots, x_n) = x_1 e_1 + \cdots + x_n e_n. You need at least nn vectors to span Rn\mathbb{R}^n.

But here's the rot we'll exterminate next node: some vectors in a spanning set are redundant — they're already in the span of the others, so deleting them changes nothing. Two parallel vectors only span a line; the second is pure deadweight. Detecting and removing that deadweight is the entire job of Linear Independence. File it away — we're going hunting.

🔬 SPECIMENS (worked examples)

Worked example 1 — is this vector in the span?

Is w=(4,5)w = (4, 5) in span((1,1),(2,3))\operatorname{span}\big((1, 1), (2, 3)\big)? If so, give the coefficients.

We need c1,c2c_1, c_2 with c1(1,1)+c2(2,3)=(4,5)c_1(1,1) + c_2(2,3) = (4,5). Componentwise that's the system {c1+2c2=4c1+3c2=5\begin{cases} c_1 + 2c_2 = 4 \\ c_1 + 3c_2 = 5 \end{cases} Subtract the first equation from the second: c2=1c_2 = 1. Back-substitute: c1+2(1)=4c1=2c_1 + 2(1) = 4 \Rightarrow c_1 = 2.

Check: 2(1,1)+1(2,3)=(2,2)+(2,3)=(4,5)2(1,1) + 1(2,3) = (2,2) + (2,3) = (4,5). ✓

So yes, wspan((1,1),(2,3))w \in \operatorname{span}\big((1,1),(2,3)\big) with coefficients c1=2,c2=1c_1 = 2, c_2 = 1. The membership question became a 2×22\times 2 system and Gaussian elimination closed it — exactly the marriage of strata I keep harping on.

Worked example 2 — column space and the brutal truth about solvability

Let A=(1224)A = \begin{pmatrix} 1 & 2 \\ 2 & 4 \end{pmatrix}. Is b=(3,7)\mathbf{b} = (3, 7) in Col(A)\operatorname{Col}(A)? What about b=(3,6)\mathbf{b}' = (3, 6)?

Col(A)=span((1,2),(2,4))\operatorname{Col}(A) = \operatorname{span}\big((1,2), (2,4)\big). But (2,4)=2(1,2)(2,4) = 2(1,2) — the second column is parallel to the first! So the column space is just the line span((1,2))={(t,2t):tR}\operatorname{span}\big((1,2)\big) = \{(t, 2t) : t \in \mathbb{R}\}.

A vector (x,y)(x, y) is in this line exactly when y=2xy = 2x.

For b=(3,7)\mathbf{b} = (3, 7): is 7=2(3)=67 = 2(3) = 6? No. So bCol(A)\mathbf{b} \notin \operatorname{Col}(A), and Ax=(3,7)A\mathbf{x} = (3,7) has no solution.

For b=(3,6)\mathbf{b}' = (3, 6): is 6=2(3)6 = 2(3)? Yes. So bCol(A)\mathbf{b}' \in \operatorname{Col}(A), and Ax=(3,6)A\mathbf{x} = (3,6) is solvable (e.g. x=(3,0)\mathbf{x} = (3, 0), giving 3(1,2)=(3,6)3(1,2) = (3,6)). The redundant second column shrank the reachable set to a line — a preview of why redundancy matters.

Worked example 3 — the parallel-vector trap: two vectors that span exactly nothing new

Do (1,2)(1, 2) and (2,4)(2, 4) span R2\mathbb{R}^2? Most students say yes because "two vectors in R2\mathbb{R}^2." Settle it.

The trap is counting vectors instead of checking reach. (2,4)=2(1,2)(2,4) = 2 \cdot (1,2), so the two are parallel — the second adds nothing new. Their span is span((1,2),(2,4))=span((1,2))={(t,2t)},\operatorname{span}\big((1,2),(2,4)\big) = \operatorname{span}\big((1,2)\big) = \{(t, 2t)\}, which is a single line through the origin, not the whole plane.

Concretely, (1,0)(1, 0) is not reachable: c1(1,2)+c2(2,4)=(c1+2c2)(1,2)c_1(1,2) + c_2(2,4) = (c_1 + 2c_2)(1, 2) always lies on the line y=2xy = 2x, and (1,0)(1,0) has 020 \ne 2. So they do not span R2\mathbb{R}^2. To span R2\mathbb{R}^2 you need two vectors pointing in genuinely different directions. Number of vectors is necessary, not sufficient — direction is what counts, which is precisely the independence question coming next.

☠ KNOWN HAZARDS

  • Confusing "span" the verb with "span" the noun. A set of vectors spans (verb) a space; span(S)\operatorname{span}(S) (noun) is the subspace they reach. "SS spans R3\mathbb{R}^3" means span(S)=R3\operatorname{span}(S) = \mathbb{R}^3. This is pure vocabulary and getting it wrong reads as sloppy.

  • Thinking more vectors always means a bigger span. Adding a vector already in the span changes nothing — it's deadweight, and we will hunt it in the next node. Two parallel vectors span the same line one does. Quantity isn't reach.

  • Forgetting span always contains 0\mathbf{0}. Set all coefficients to zero. Any "span" that supposedly misses the origin is a contradiction — you mis-set up the problem.

  • Reading Ax=bA\mathbf{x}=\mathbf{b} as anything but "mix the columns to hit b\mathbf{b}". That column-mixture picture is the whole meaning of solvability; lose it and the column space stays mysterious forever.

TL;DR

  • A linear combination is c1v1++ckvkc_1 v_1 + \cdots + c_k v_k — scale and add. It's the only operation linear algebra ever performs.

  • span(S)\operatorname{span}(S) is the set of all linear combinations of SS, and it is always a subspace — in fact the smallest subspace containing SS (proved via the three-condition test).

  • Geometrically: one vector spans a line through 0\mathbf{0}, two non-parallel vectors span a plane. "Is wspan()w \in \operatorname{span}(\dots)?"     \iff "does a linear system have a solution?" — Gaussian elimination answers it.

  • The column space Col(A)=span(columns)\operatorname{Col}(A) = \operatorname{span}(\text{columns}), and Ax=bA\mathbf{x}=\mathbf{b} is solvable     bCol(A)\iff \mathbf{b} \in \operatorname{Col}(A) — i.e. b\mathbf{b} is a mixture of the columns.

  • A set spans VV when its span is all of VV. Spanning sets can carry redundant vectors — the cleanup problem of the next node.

unlocks