A basis is a set of building blocks with no waste. Every vector is built from it in exactly one way, and every basis of a space has the same size, its dimension.
Taught in 375/376Beyond the courseApostol 1.7 to 1.10Spagnolie, Lectures 2 and 3MATH 375 HW2
Chapter 2.1 said what a vector space is. This chapter asks how to describe one economically. The answer is to pick a few vectors so that every vector in the space is built from them, and none of them is wasted. That set is a basis. The number of vectors in it is the dimension, which measures how big the space really is.
Before you start
2.1: vector space, subspace and the subspace test. For one proof below you also need induction: prove a statement for 1, then show that if it holds for k−1 it holds for k. Here are three quick checks on 2.1.
Quick checkWhich of these is a subspace of R3?
The set x=2y contains O, and sums and multiples of its points still satisfy x=2y. The first set misses O, since 0+0+0=1. The third contains O and is closed under addition, but scaling (0,0,1) by −1 gives (0,0,−1), which has z<0.Review: the subspace test
Quick checkIn a vector space, what is 0x for a vector x?
Scaling a vector gives a vector, so 0x is a vector, and 'Scaling by zero' shows it is O. The number 0 is a scalar, a different kind of object. This is why every combination with all coefficients 0 lands on O.Review: scaling by zero
Quick checkIs the set of polynomials of degree exactly 2 closed under addition?
The top terms can cancel, which drops the degree. Being closed means that EVERY sum of two members stays in the set, so one failing pair is enough to say no. (Degree AT MOST 2 is closed, which is why P2 is a space.)Review: closed under
The picture
Two arrows in space. Slide a and b: the point au+bv moves, but it never leaves the blue plane. That plane is everything two arrows can build. Now pick “v is a multiple of u”. The plane collapses to a line, because the second arrow adds no new direction.
Questions this chapter answers: which vectors can a set build (the span)? When is a vector in the set wasted (dependence)? What is the smallest set that builds everything (a basis)? And how many vectors does that take (the dimension)?
Definitions and theorems
Building vectors: span
Definition T
Linear combination
Given vectors x1,…,xk in V and scalars c1,…,ck, the vector
c1x1+c2x2+⋯+ckxk=i=1∑kcixi
is a linear combination of x1,…,xk. The ci are its coefficients. It lies in V by the closure axioms.
In one lineA sum of scalar multiples, c1x1+c2x2+⋯+ckxk.
Why it existsIt is everything you can build from given vectors using only the two vector-space operations.
Definition T
Span
The span of a set S={x1,…,xk} is the set of all linear combinations of its elements:
L(S)={i=1∑kcixi:c1,…,ck∈R}.
Apostol writes L(S), “the linear span”. Many books write span(S). If L(S)=V, we say SspansV.
In one lineThe set of all linear combinations of the given vectors: everything they can build.
Why it existsIt is the smallest subspace containing the vectors, so it answers 'what can these vectors reach?'
Spagnolie’s gloss: the span is “the space that can be reached by S”. In R3 with x1=(1,0,0) and x2=(1,1,0):
c1x1+c2x2=(c1+c2,c2,0).
Every vector with third entry 0 is reached: to get (p,q,0), take c2=q and c1=p−q. So L(S) is the xy-plane. For example, (0,2,0)=−2x1+2x2.
Your answerWith x1=(1,0,0) and x2=(1,1,0) as above, (5,3,0)=c1x1+c2x2. What is c1?
The second entry is c2. Then the first entry is c1+c2=5.
The rule from the text: to reach (p,q,0) take c2=q and c1=p−q. Here p=5 and q=3, so c2=3 and c1=5−3=2. Check: 2(1,0,0)+3(1,1,0)=(5,3,0).
Quick checkWhat is the span of the single vector (1,2,3) in R3?
The span is every linear combination, and with one vector a combination is a multiple c(1,2,3) for any real c. It includes O (take c=0) and −(1,2,3), so it is more than the one vector. One vector cannot reach a whole 3-dimensional space.
Worked example
Is (3,5,7) in the span of (1,1,1) and (0,1,2)? Is (3,5,8)?
Solution.
Ask the question as an equation. Is there a pair c1,c2 with c1(1,1,1)+c2(0,1,2)=(3,5,7)? ‘In the span’ means ‘is some linear combination’, so we look for the coefficients.
Compare entries.c1=3, then c1+c2=5, then c1+2c2=7. One vector equation in R3 is three ordinary equations.
Solve with the first two.c1=3 and c2=5−3=2. Two equations fix the two unknowns.
Test the third equation.c1+2c2=3+4=7. It holds. Three equations, two unknowns: the leftover equation is a check that can fail.
Repeat for (3,5,8). The first two entries still give c1=3, c2=2, but now the third needs c1+2c2=8, and 3+4=7=8. The only candidate coefficients fail the third entry, so no combination works.
Answer.(3,5,7)=3(1,1,1)+2(0,1,2) is in the span. (3,5,8) is not: the span of two independent vectors is a plane in R3, and this point lies off it.
Theorem TApostol 1.6
The span is a subspace
For any finite set S={x1,…,xk} in a vector space V, the span L(S) is a subspace of V.
In one lineFor any finite set S in V, the span L(S) is a subspace of V.
Why it is trueA sum of two combinations is a combination (add coefficients); a multiple of a combination is a combination (multiply coefficients).
ProofSpagnolie Lecture 2
The idea: Use the subspace test. Combinations of the same vectors add by adding their coefficients, and scale by scaling their coefficients.
O=0x1+⋯+0xk∈L(S).
Choosing every coefficient to be 0 gives the zero vector, by 'Scaling by zero' from 2.1.
Let v=∑cixi and w=∑bixi be in L(S).
Two arbitrary elements of L(S). Each is SOME combination, so each has its own coefficients.
v+w=∑(ci+bi)xi, a combination, so v+w∈L(S).
Axioms 3 and 4 let us regroup the terms; axiom 9 combines cixi+bixi into (ci+bi)xi.
av=∑(aci)xi∈L(S).
Axiom 8 distributes a over the sum; axiom 7 turns a(cixi) into (aci)xi.
L(S) is a subspace of V.
All three parts of the subspace test hold.
Wasted vectors: dependence
Spagnolie’s motivation: “It is very useful to describe a space using only a few building blocks. But redundancy is not great.” Take x1=(1,0), x2=(1,1), x3=(−1,3) in R2. Then x3=−4x1+3x2. The third vector is wasted, because anything built with it could be built without it. Moving everything to one side gives
−4x1+3x2−1x3=O,
a combination equal to zero with coefficients that are not all zero. This form is the definition, because it does not single out which vector is the wasted one.
Taking every coefficient 0 always gives O, for any vectors at all, so that tells us nothing. Dependence asks whether there is a second way to get O.
Definition T
Linearly dependent
A set {x1,…,xk} is linearly dependent if there are scalars c1,…,ck, not all zero, with
c1x1+⋯+ckxk=O.
In one lineSome combination of the vectors equals zero without all coefficients being zero; equivalently, one of them is a combination of the others.
Why it existsIt detects waste: a dependent set has a vector that adds nothing to the span.
Definition T
Linearly independent
A set {x1,…,xk} is linearly independent if it is not dependent. That is, the equation
c1x1+⋯+ckxk=O
has only the solution c1=c2=⋯=ck=0.
In one lineThe only combination of the vectors equal to zero is the one with every coefficient zero.
Why it existsIndependent vectors carry no waste, so each vector they build is built in only one way.
Why· Why the two forms say the same thing
Suppose c1x1+⋯+ckxk=O with some cj=0. Move the other terms across and divide by cj:
xj=−cj1i=j∑cixi.
So xj is a combination of the others. Conversely, if xj=∑i=jdixi, then ∑i=jdixi−1⋅xj=O, and the coefficient −1 is not zero. Dependence means some vector is a combination of the rest.
Quick checkThree vectors satisfy x1−2x2+x3=O. Are they dependent or independent?
Dependent means SOME combination with coefficients not all zero equals O, and here we are handed one. The first option mixes up 'not a multiple of another' with independence: three vectors can be dependent with no two on a line. The third option is wrong because the all-zero combination gives O for any vectors at all, so it proves nothing.
Your answerFor which value of t are the vectors (1,2) and (3,t) dependent?
(3,t) must be 3 times (1,2).
Two vectors in the plane are dependent exactly when one is a multiple of the other. (3,t)=3(1,2)=(3,6) forces t=6. For any other t, the only solution of c1(1,2)+c2(3,t)=O is c1=c2=0.
Quick ways to be dependent, from Lecture 3:
one vector is a multiple of another;
the zero vector is in the set, since 1⋅O=O uses a non-zero coefficient;
too many vectors. Three vectors in the plane are always dependent, and the theorem below proves it.
Worked example
Are (1,1,0), (0,1,1) and (1,0,1) independent in R3?
Solution.
Write the equation that defines independence.c1(1,1,0)+c2(0,1,1)+c3(1,0,1)=(0,0,0). The set is independent exactly when the only solution is c1=c2=c3=0.
Compare entries. The first entries give c1+c3=0, the second give c1+c2=0, and the third give c2+c3=0. One vector equation in R3 is three ordinary equations, one per entry.
Solve. The first equation gives c3=−c1 and the second gives c2=−c1. Put both into the third: −c1−c1=0, so c1=0. Then c2=0 and c3=0. Substituting leaves one equation in one unknown, which has only one solution.
Read the result. The all-zero solution is the only one. That is the definition of independent.
Answer. Independent. In the step-through above a free unknown appeared, and that is what a dependence looks like. Here no unknown stayed free.
Worked example
Prove: if u and v are independent, then u+v and u−v are independent.
Solution. The plan: take any combination of u+v and u−v that equals O, rewrite it as a combination of u and v, and use the independence of u and v.
Start with a combination equal to zero.a(u+v)+b(u−v)=O. To show a set is independent, take an arbitrary combination equal to O and show every coefficient is 0. We name the coefficients a and b and assume nothing else about them.
Regroup by u and v.(a+b)u+(a−b)v=O. Axioms 8 and 9 multiply out the brackets, and axioms 3 and 4 let us collect the u terms and the v terms.
Use the hypothesis.a+b=0 and a−b=0. u and v are independent, so a combination of them equal to O must have both coefficients 0.
Solve the two equations. Adding them gives 2a=0, so a=0. Then b=0. Two equations in two unknowns.
Answer. The only combination of u+v and u−v that equals O has a=b=0, so they are independent. The same pattern proves most statements about independence: name a combination equal to O, rewrite it, and read off the coefficients.
The key theorem: too many vectors are always dependent
This theorem is what makes “dimension” make sense. The course stated it and left the proof to Apostol. We prove it in full here, because the proof is the same elimination you just did in the step-through. We will call it the k+1 theorem.
Theorem TApostol Thm 1.5
More vectors than a spanning set means dependent
Let x1,…,xk be any vectors and L=L({x1,…,xk}). Then every set of k+1 vectors in L is linearly dependent.
In one lineIf k vectors span a space, then any k+1 vectors in that space are linearly dependent.
Why it is trueEliminate one building block at a time. Each round uses up one of the k+1 vectors and one building block, and the vectors outlast the blocks.
Two small points. The case k=0 is trivial: the span of no vectors is {O}, so a single vector in it is O, and 1⋅O=O is a dependence. And we treat a ‘set’ of vectors as a list, so a list with a repeated vector counts as dependent (1⋅y−1⋅y=O).
Why· The picture behind the proof
Take k=2. The two arrows u and v in the picture below are the building blocks, and their span is the blue plane. Now pick any three vectors y1,y2,y3 in that plane. The theorem says they are dependent, and the picture shows why. Each yi is a mix of “some u” and “some v”, so a vector in the plane is described by two numbers, and three vectors carry three pairs of numbers.
The proof removes one building block at a time. Subtract the right multiple of y1 from y2 and from y3 so that their u-parts cancel. The two new vectors z2 and z3 then have no u in them, so both lie along v alone. Switch the picture to “v is a multiple of u” and you see that case: the plane has collapsed to a line, and two vectors on one line are dependent (the base case of the proof). Undoing the subtraction turns that dependence of z2,z3 into a dependence of y1,y2,y3.
ProofApostol 1.7
The idea: Induction on k. Write each of the k+1 vectors as a combination of x₁,…,x_k. Use y₁ to cancel the x₁-part from all the others (exactly like eliminating c₁ in the step-through). The k leftover vectors live in the span of only k−1 building blocks, so the induction hypothesis says they are dependent. Rewrite that dependence among the leftovers as a dependence among the original y's.
Claim: for every k≥1, any k+1 vectors in the span of k vectors are dependent.
Induction on k. The base case k=1 is checked first.CS 240 induction: prove it for the first value, then prove 'true for k−1 implies true for k'.
Let y1=ax1 and y2=bx1.
Base case, k=1. Everything in L({x1}) is a multiple of x1.
If a=0: 1y1+0y2=O. If a=0: by1−ay2=abx1−abx1=O. Either way {y1,y2} is dependent.
If a=0, then y1=O, and 1⋅y1+0⋅y2=O has a non-zero coefficient. If a=0, the combination below has the coefficient −a=0.
Assume the claim holds for k−1. Let y1,…,yk+1 be in L({x1,…,xk}).
Inductive step. The hypothesis is the claim for k−1 building blocks; we prove it for k.
Write yi=ai1x1+ai2x2+⋯+aikxk for i=1,…,k+1. The number aij is the amount of xj in yi.
Each yi is in the span, so it is SOME combination of the x's.In the picture (k=2): yi is an arrow in the blue plane, and ai1, ai2 say how far it goes along u and along v.
If every ai1=0, then y1,…,yk lie in L({x2,…,xk}). The hypothesis (the claim with k−1 in place of k) says any k vectors in the span of k−1 vectors are dependent. So y1,…,yk are dependent, and the whole set is too: add 0⋅yk+1.
Case 1: no yi uses x1 at all. Then they live in a span of k−1 vectors, and we can use the hypothesis directly.
Otherwise, renumber so that a11=0.
Case 2: some yi uses x1. Renumber the y's so that it is y1.Renumbering does not change whether a set is dependent.
For i=2,…,k+1, let zi=yi−a11ai1y1. The x1-coefficient of zi is ai1−a11ai1a11=0.
Subtract the right multiple of y1 from each other yi to cancel its x1-part. This is elimination: the same move as subtracting a multiple of equation 1.In the picture: each zi has lost its u-part, so it lies along v alone. The plane has been cut down to the line case.
By the hypothesis, z2,…,zk+1 are dependent: ∑i=2k+1cizi=O with some ci=0.
So the k vectors z2,…,zk+1 lie in the span of the k−1 vectors x2,…,xk. That is exactly the induction hypothesis, with k−1 in place of k.
O=i=2∑k+1cizi=i=2∑k+1ci(yi−a11ai1y1).
Substitute the definition of each zi.
O=i=2∑k+1ciyi−(i=2∑k+1a11ciai1)y1.
Multiply out and collect the y1 terms into one coefficient.
So {y1,…,yk+1} is dependent. By induction, the claim holds for every k.
This is a combination of y1,…,yk+1 equal to O, and some ci with i≥2 is non-zero, so not all coefficients are zero.
Same idea elsewhere· Where the idea came from
Each round of the proof spends one building block (x1) and one vector (y1). After k rounds no building blocks are left, but one vector is still left over. A vector built from no building blocks can only be O, and that forces a dependence. In matrix language (chapter 2.6): a system of equations with more unknowns than equations always has a non-zero solution.
Quick checkWhich statement does the k+1 theorem guarantee?
R3 is spanned by 3 vectors, so any 3+1=4 vectors in it are dependent. The theorem only forces dependence when there are MORE vectors than the spanning set. Three vectors in R3 may be dependent or independent (it depends on the vectors), and two vectors may be independent, as (1,0,0) and (0,1,0) are.
Worked example
Are (2,1), (0,3) and (5,−4) independent in R2? If not, find a dependence.
Solution.
Count first. There are three vectors in R2, which is spanned by two vectors, (1,0) and (0,1). The k+1 theorem with k=2 says any 3 vectors there are dependent, so the answer is known before any algebra.
Set up the equation to find the dependence.c1(2,1)+c2(0,3)+c3(5,−4)=(0,0) gives 2c1+5c3=0 and c1+3c2−4c3=0. The theorem says a non-zero solution exists. Solving shows what it is.
Choose the free unknown. There are two equations and three unknowns, so c3 can be chosen. Take c3=6. The first equation gives c1=−25c3, and c3=6 clears the fraction.
Solve for the rest.c1=−15. The second equation gives 3c2=−c1+4c3=15+24=39, so c2=13. Back-substitution, as in the step-through above.
Check by multiplying out.−15(2,1)+13(0,3)+6(5,−4)=(−30+0+30,−15+39−24)=(0,0). The coefficients −15,13,6 are not all zero, so this is a genuine dependence.
Answer. Dependent. Equivalently (5,−4)=25(2,1)−613(0,3): the third vector is wasted.
No waste and nothing missing: basis and dimension
Where this came from· Where basis and dimension came from
Hermann Grassmann, a school teacher in Stettin, published his Ausdehnungslehre (theory of extension) in 1844. He wanted an algebra for geometric objects that works in any number n of dimensions, not only the 2 and 3 of everyday pictures. For that he needed a way to say “how many independent directions”, which is the idea of independence and dimension used in this chapter. Few mathematicians read the book at the time, partly because it was so abstract. Giuseppe Peano restated its ideas with axioms in 1888, close to the ten axioms of 2.1. The k+1 theorem is today called the Steinitz exchange lemma, after Ernst Steinitz, who proved it in the early 1910s.
Definition T
Basis
A finite set B={e1,…,en} in V is a basis of V if it is linearly independent and spans V.
In one lineAn independent set that spans the whole space: enough vectors to build everything, and none wasted.
Why it existsIt lets you describe every vector by a list of numbers, its coordinates, in exactly one way.
Spagnolie: “There is never a unique basis for a space!” For the polynomials P2 of degree at most 2, both {1,t,t2} (the standard basis) and {1,t+2,t2−t} work. To see that the second spans, write t=(t+2)−2⋅1 and t2=(t2−t)+t. It is independent too: if c0+c1(t+2)+c2(t2−t)=0, the t2 coefficient gives c2=0, then the t coefficient gives c1=0, then c0=0.
Quick checkThe set {(1,0),(0,1),(1,1)} spans R2. Is it a basis of R2?
A basis needs BOTH spanning and independence. This set spans, but the third vector is a combination of the first two, so one vector is wasted. Remove (1,1) and what is left is the standard basis.
Theorem TApostol Thm 1.6
All bases have the same size
If a vector space V has a basis of n elements, then every basis of V has exactly n elements.
In one lineIf V has a basis with n elements, every basis of V has n elements.
Why it is trueEach basis spans, and the other basis is independent. By the k+1 theorem an independent set cannot outnumber a spanning set, so each basis is at most as big as the other.
ProofApostol 1.8
The idea: Compare two bases using the theorem above, in both directions.
Let B be a basis with n elements and B′ a basis with m elements.
Two bases, sizes n and m.
Every element of B′ lies in V=L(B). If m>n, some n+1 elements of B′ would be dependent, which is impossible since B′ is independent. So m≤n.
B spans V. If m≥n+1, then any n+1 elements of B′ are n+1 vectors in the span of the n vectors of B, so by the k+1 theorem they are dependent. But a subset of an independent set is independent (proved in the problems below).
Likewise n≤m. So m=n.
The same argument with the roles of B and B′ swapped.
Definition T
Dimension
If V has a basis with n elements, V has dimensionn, written dimV=n. The space {O} has dimension 0. Its basis is the empty set: the empty set is independent (there is no combination to check), and by convention its span is {O}. If V has no finite basis, then V is infinite-dimensional.
In one lineThe number of vectors in any basis. It is the number of independent directions, the number of coordinates you need.
Why it existsThe theorem above makes it well defined: it does not depend on which basis you pick.
Examples from Lecture 3:
dimR3=3, with standard basis (1,0,0),(0,1,0),(0,0,1). In general dimRn=n.
dimP4=5, with basis 1,t,t2,t3,t4. Watch the count: degree at most 4 means five coefficients.
The line {(x,y):x+y=0} has basis {(1,−1)}, so its dimension is 1.
All polynomials, with no limit on the degree, form an infinite-dimensional space. If some k polynomials spanned them, any k+1 polynomials would be dependent by the k+1 theorem. But 1,t,…,tk are k+1 independent polynomials.
Worked example
Find a basis and the dimension of W={(x,y,z,w)∈R4:x+y=0 and z=2w}.
Solution.
Solve the conditions for some coordinates. The conditions give y=−x and z=2w. That leaves x and w free to choose. Each independent condition fixes one coordinate in terms of the others. The coordinates still free tell you the dimension.
Write a general element of W.(x,−x,2w,w)=x(1,−1,0,0)+w(0,0,2,1). Pull out the free numbers x and w as coefficients.
Spanning. Every element of W is a combination of (1,−1,0,0) and (0,0,2,1). Both vectors are in W: 1+(−1)=0, and 0+0=0 with 2=2⋅1. The two vectors must lie in W, or their span could be bigger than W.
Independence. If a(1,−1,0,0)+b(0,0,2,1)=O, the first entry gives a=0 and the fourth gives b=0. Compare entries, as in the independence checks above.
Count. The basis has 2 vectors. Dimension is the size of any basis.
Answer. A basis is {(1,−1,0,0),(0,0,2,1)}, and dimW=2. Two independent conditions removed two dimensions from dimR4=4. A repeated condition removes nothing: x+y=0 together with 2x+2y=0 is only one condition.
Your answerWhat is the dimension of {(x1,…,x5)∈R5:x1+x2+x3=0 and x4=x5}?
Count the free coordinates after solving the conditions.
Two independent conditions, so 5−2=3. Concretely, x3=−x1−x2 and x5=x4, leaving x1,x2,x4 free, and the basis (1,0,−1,0,0), (0,1,−1,0,0), (0,0,0,1,1).
Your answerWhat is the dimension of the space of symmetric 3×3 matrices (those with Aij=Aji)?
Which entries can you choose freely? The rest are forced by symmetry.
A symmetric matrix is fixed by its 3 diagonal entries and the 3 entries above the diagonal (A12,A13,A23); the entries below are copies. That is 3+3=6 free numbers, and the six matrices with a single such entry (and its mirror) form a basis.
Theorem TApostol Thm 1.7
Extending to a basis
Let dimV=n. Then:
(a) every independent set in V is part of some basis of V;
(b) every set of n independent vectors in V is a basis.
In one lineIn an n-dimensional space, any independent set can be extended to a basis, and any n independent vectors already form a basis.
Why it is trueKeep adding a vector outside the current span; this keeps independence and must stop after n steps.
ProofApostol 1.8
The idea: First a lemma: adding a vector from OUTSIDE the span keeps a set independent. Then add such vectors one at a time. The process must stop, because there can never be more than n independent vectors.
Lemma. If S={x1,…,xk} is independent and y∈/L(S), then S∪{y} (the set S with y added) is independent.
We prove this lemma first, then use it.
Suppose cy+∑cixi=O.
To show a set is independent, take any combination of it equal to O and show every coefficient is 0.
Then c=0, since otherwise y=−c1∑cixi∈L(S).
If c=0, solve for y. That makes y a combination of the xi, so y∈L(S), contradicting the choice of y.
So ∑cixi=O, which forces every ci=0. Hence S∪{y} is independent.
With c=0, what is left is a combination of the independent xi equal to zero.
Starting from an independent S: while L(S)=V, add a vector outside L(S). By the lemma, S stays independent.
Part (a). If S already spans, it is a basis. If not, some y is outside its span; add it.
An independent set in V has at most n elements, so the process stops after at most n additions. It stops only when L(S)=V. Then S is independent and spans: a basis containing the original set.
By the k+1 theorem, with the n basis vectors as the spanning set, any n+1 vectors of V are dependent.
If S has n independent vectors, the basis from (a) contains S and has exactly n elements, so it is S itself.
Part (b). Extend the n independent vectors to a basis by part (a). Every basis has n elements, so nothing was added.
Proof workshopGive the reason for each line of the lemma: adding a vector outside the span keeps independence
Each line of the proof is shown in order. Choose the reason that justifies it, then press Check.
Let S={x1,…,xk} be independent and y∈/L(S). Suppose cy+∑cixi=O.
If c=0, then y=−c1∑cixi.
Then y∈L(S), which contradicts the choice of y. So c=0.
Now ∑cixi=O.
Every ci=0, so S∪{y} is independent.
Quick checkYou have 3 independent vectors in R4. Which statement is guaranteed?
A basis of R4 has 4 vectors, so 3 are not enough to span. But part (a) says any independent set extends to a basis, and here it takes exactly one more vector, chosen outside their span. 'n independent vectors form a basis' needs n=4 of them.
Worked example
Extend the independent set {(1,1,0),(0,1,1)} to a basis of R3.
Solution.
Count what is missing.dimR3=3 and we have 2 vectors, so we need to add exactly 1. Every basis of R3 has 3 vectors.
Describe the span we already have.a(1,1,0)+b(0,1,1)=(a,a+b,b). To add a vector OUTSIDE the span, we must know what the span is.
Try a candidate. Is (1,0,0) of the form (a,a+b,b)? That needs a=1, b=0 and a+b=0, but a+b=1. Not possible, so (1,0,0) is outside the span. Standard basis vectors are the quickest candidates to test. If one is inside the span, try the next.
Add it. The set {(1,1,0),(0,1,1),(1,0,0)} is independent by the lemma. Adding a vector outside the span keeps independence.
Finish. Three independent vectors in the 3-dimensional R3 form a basis. Part (b) of ‘Extending to a basis’.
Answer.{(1,1,0),(0,1,1),(1,0,0)} is a basis. Many other choices work: any vector off the plane {(a,a+b,b)} would do.
Coordinates
Theorem TApostol 1.9
Unique coordinates
Let {e1,…,en} be a basis of V. Every x∈V can be written as x=∑i=1nciei for exactly one choice of scalars c1,…,cn.
In one lineIf e1,…,en is a basis, each vector is ∑ciei for exactly one list (c1,…,cn).
Why it is trueSpanning gives at least one way; independence gives at most one, since two ways would subtract to a non-zero combination equal to zero.
Why· The picture behind the proof
In the Basis2D picture above, the dashed route to the point x is “go c1 steps along b1, then c2 steps along b2”. Each grid point has exactly one such route. Now drag b1 and b2 onto one line. The grid collapses, most points cannot be reached at all, and the points on the line can be reached in many ways. That is the proof in a picture. Two different routes to the same point would give a closed loop that moves along b1 and b2 and ends where it started. Such a loop with non-zero steps is a dependence of b1 and b2, and it exists only when they lie on one line.
ProofApostol 1.9
The idea: Existence comes from spanning. For uniqueness, take two representations and subtract them.
Some representation x=∑ciei exists.
The basis spans V.In the picture: every point of the plane has a route along b1 then b2.
Suppose also x=∑diei.
Suppose there is a second one.
O=x−x=∑(ci−di)ei.
Subtract the two expressions for the same vector x, and collect terms with axiom 9.In the picture: this is the closed loop from the box above, with steps ci−di along the bi.
ci−di=0 for every i, so the two representations are the same.
The basis is independent, so every coefficient of a combination equal to O is zero.In the picture: independent arrows give no closed loop with non-zero steps.
Proof workshopRebuild the proof that coordinates are unique
Tap the lines in the order a proof would write them. Each line can only use what is already above it.
Existence comes from spanning.
To prove 'exactly one', assume there is a second list and show it equals the first.
You need a first representation before you can compare it with a second.
Subtract the two expressions for the same vector and collect terms using axiom 9.
Subtraction needs both representations to be on the page.
A combination of independent vectors equal to O has every coefficient zero.
This reads off coefficients from the combination that equals O, so that combination has to exist first.
Rearrange; this is the uniqueness we wanted.
Conclude only after showing every difference is zero.
Quick checkWhy can a vector have only ONE list of coordinates in a basis?
Spanning only guarantees that at least one list exists. Uniqueness comes from independence: if ∑ciei=∑diei, then ∑(ci−di)ei=O, and independence forces every ci=di. A dependent spanning set, such as (1,0),(0,1),(1,1), gives many lists for one vector: (1,1) is (1,1,0) and also (0,0,1).
Definition T
Coordinates
A set has no order, but a list of coordinates does, so we fix which basis vector is first, second, and so on. That choice is an ordered basis. Given an ordered basis (e1,…,en) of V, the numbers c1,…,cn with x=∑ciei are the coordinates (Apostol: components) of x in that basis.
In one lineThe unique numbers (c1,…,cn) with x=∑ciei for a chosen, ordered basis.
Why it existsThey turn any n-dimensional space into Rn, so everything can be computed with lists of numbers.
Coordinates are why Rn matters so much. Once you choose a basis, a polynomial in P2 becomes a list of 3 numbers, and a 2 by 2 matrix becomes a list of 4. Any n-dimensional space then behaves exactly like Rn. Chapter 2.4 makes this precise: it calls such spaces isomorphic.
Worked example
Find the coordinates of x=(7,4) in the ordered basis b1=(1,2), b2=(3,1) of R2. Then find the coordinates of p=4+3t+2t2 in the ordered basis (1,t+2,t2−t) of P2.
Solution, part 1 (vectors in R2).
Check that it is a basis.b2 is not a multiple of b1, so the two are independent. Two independent vectors in the 2-dimensional R2 form a basis, by part (b) of ‘Extending to a basis’. Without a basis, coordinates may not exist or may not be unique.
Write the defining equation.c1(1,2)+c2(3,1)=(7,4), so c1+3c2=7 and 2c1+c2=4. The coordinates are the numbers that build x from the basis.
Solve. The first equation gives c1=7−3c2. Put that into the second: 14−6c2+c2=4, so c2=2 and c1=1. Substitution, as in the independence checks.
Check.1(1,2)+2(3,1)=(1+6,2+2)=(7,4). Multiplying out confirms the numbers.
Answer. The coordinates are (1,2). In the standard basis the same vector has coordinates (7,4). The list of numbers changes with the basis, and the vector does not.
Solution, part 2 (polynomials).
Write the defining equation.p=c0⋅1+c1(t+2)+c2(t2−t). Same idea as part 1, with polynomials as the vectors.
Expand and collect powers of t. The right side is c2t2+(c1−c2)t+(c0+2c1). Two polynomials are equal exactly when their coefficients match, because 1,t,t2 are independent.
Match coefficients, from the top.t2 gives c2=2. Then t gives c1−2=3, so c1=5. Then the constant term gives c0+10=4, so c0=−6. The top equation has one unknown, and each next equation has one new unknown.
Check.−6+5(t+2)+2(t2−t)=−6+5t+10+2t2−2t=4+3t+2t2. It returns p.
Answer. The coordinates are (−6,5,2). In the standard basis 1,t,t2 they are (4,3,2).
Your answerWrite (10,5)=c1(1,2)+c2(3,1) in the basis b1=(1,2), b2=(3,1). What is c2?
Solve the two entry equations, as in the example above.
The entries give c1+3c2=10 and 2c1+c2=5. From the first, c1=10−3c2. Then 20−6c2+c2=5, so c2=3 and c1=1. Check: 1(1,2)+3(3,1)=(10,5).
Examples and non-examples
Polynomials 1,t,…,tn are independent. This is Spagnolie’s Lecture 3 proof. Suppose F(t)=c0+c1t+⋯+cntn is the zero function. Since F is zero for every t, so are all its derivatives. Then F(0)=c0=0. Differentiate: F′(0)=c1=0. Differentiating j times and setting t=0 gives j!cj=0. So every cj=0.
cos2t, sin2t and 1 are dependent, because 1⋅cos2t+1⋅sin2t−1⋅1=0 for every t. A dependence among functions must hold at every t, and this one does.
eat and teat are independent (Apostol 1.10 #23(b)). If c0eat+c1teat=0 for all t, divide by eat, which is never 0: c0+c1t=0 for all t. A polynomial that is zero everywhere has zero coefficients, so c0=c1=0.
Worked example
Show that sint and cost are independent. Then show that 1, t and e2t are independent.
For functions, "F=0" means F(t)=0 for EVERY t. That lets us pick values of t, or differentiate, to get equations for the coefficients.
Solution, part 1 (evaluate at chosen points).
Set up. Suppose c1sint+c2cost=0 for every t. Independence means this forces c1=c2=0.
Put t=0.c1⋅0+c2⋅1=0, so c2=0. sin0=0 and cos0=1, so one point kills one unknown.
Put t=π/2.c1⋅1+c2⋅0=0, so c1=0. sin(π/2)=1 and cos(π/2)=0. The equation holds at every t, so it holds at this one.
Solution, part 2 (differentiate).
Set up. Suppose F(t)=c0+c1t+c2e2t=0 for every t. Same idea.
Differentiate twice.F′(t)=c1+2c2e2t=0 and F′′(t)=4c2e2t=0. The zero function has zero derivatives. Each derivative removes a term: the constant first, then t.
Solve from the bottom.4c2e2t=0 and e2t=0, so c2=0. Then F′ gives c1=0, and F gives c0=0. Each equation has only one new unknown, so we can climb back up.
Answer. Both sets are independent. Evaluating at points works when a few values of t give a solvable system. Differentiating works when each derivative removes a term.
Worked example MATH 375 HW2, Apostol 1.10 #14
Let S={f∈Pn:f(0)+f′(0)=0}. Find a basis of S and its dimension.
Solution.
Write a general f.f=c0+c1t+⋯+cntn, so f(0)=c0 and f′(0)=c1. The condition is about f and f′ at 0, and only the constant and linear coefficients show up there.
Translate the condition.c0+c1=0, so c1=−c0. The condition is one linear equation on the n+1 coefficients.
Substitute and factor.f=c0(1−t)+c2t2+⋯+cntn. So {1−t,t2,…,tn} spans S. Every element of S has this form, and each of these polynomials satisfies the condition itself.
Check independence. If a(1−t)+b2t2+⋯+bntn=0, the constant term gives a=0, and then each bj=0. Only 1−t has a constant term, and t2,…,tn are independent.
Count. The basis has 1+(n−1)=n vectors. Dimension is the size of any basis.
Answer.dimS=n. One linear condition on n+1 coefficients removed exactly one dimension.
Where it is used
Used inside maths· Inside maths: solution spaces of differential equations
The solutions of y′′+y=0 form a vector space of dimension 2, with basis {cost,sint}. Chapter 7.2 proves that an order-n linear homogeneous equation always has an n-dimensional solution space. So you never need more than n “basic” solutions, and you need all n of them. That is why MATH 376 looked for exactly two solutions of a second-order equation.
Used in the real world· Signals: JPEG is a change of basis
A JPEG cuts an image into 8 by 8 blocks. Each block is a vector in R64: 64 brightness values. In the standard basis, its coordinates are those 64 pixel values. JPEG switches to a different basis of R64, made of 64 cosine patterns running from smooth to finely striped (the discrete cosine transform). In the new basis, most coordinates of a typical photo block are tiny, because photos are mostly smooth. JPEG stores the few large coordinates and throws the tiny ones away. The change of basis itself saves nothing. It is what makes the saving possible: after it, rounding off the tiny coordinates and storing the few large ones compactly is what shrinks a 20 MB photo to about 2 MB.
Used in the real world· AI: dimension of a representation
A language model such as BERT-base turns each token into a vector in R768. “768-dimensional” is this chapter’s dimension: 768 coordinates in the standard basis. LoRA, a popular way to fine-tune such models, learns a change ΔW to each weight matrix that has low rank (for example rank 8). For a 768 by 768 matrix that means about 12,000 trainable numbers instead of about 590,000, roughly 48 times fewer. Chapter 3.4 explains rank and why low rank works.
Traps
Watch out· Independence belongs to the whole set
Independence is a property of a whole set, not of the vectors one at a time. Vectors that look fine individually can still be dependent together. (1,2,3), (4,5,6) and (7,8,9) are each non-zero, and no two lie on one line, yet the three are dependent, as the step-through above showed.
Watch out· Count the coefficients
dimPn=n+1. The polynomials of degree at most 2 need three numbers: c0, c1 and c2.
Watch out· Spanning and independence are separate checks
A basis needs both. {(1,0),(0,1),(1,1)} spans R2 but is dependent. {(1,0)} is independent but does not span. In an n-dimensional space, ‘Extending to a basis’ (part b) saves half the work: n independent vectors automatically span.
Watch out· A typo in the course notes
Lecture 3 lists {1,t,t3} as the standard basis of P2. It should be {1,t,t2}: t3 is not even in P2.
Problems
checkSpagnolie Lecture 3
Is {(1,0),(1,1),(−1,3)} independent in R2? Answer without solving any equations.
Solution
No. Three vectors in a space spanned by two vectors are dependent (the k+1 theorem). Concretely, (−1,3)=−4(1,0)+3(1,1).
check
What is the dimension of (a) R2×3, (b) P3, (c) the plane {(x,y,z):x+y+z=0}?
Solution
(a) 6: one basis matrix for each entry. (b) 4: 1,t,t2,t3. (c) 2. The condition gives x=−y−z, so every element is (−y−z,y,z)=y(−1,1,0)+z(−1,0,1). The two vectors (−1,1,0) and (−1,0,1) span the plane and are independent, so they form a basis.
check
Does a set containing the zero vector ever count as independent?
Solution
Never. 1⋅O+0⋅(the rest)=O is a combination equal to zero with a non-zero coefficient.
useApostol 1.10 #9
Show S={(x,y,z):y=2x,z=3x} is a subspace of R3 and find its dimension.
Solution
Every element is (x,2x,3x)=x(1,2,3), so S=L({(1,2,3)}), which is a subspace because a span is a subspace. The set {(1,2,3)} is independent (one non-zero vector) and spans S, so dimS=1. Geometrically, S is a line through the origin.
useApostol 1.10 #17
Find a basis and the dimension of the even polynomials in Pn (those with f(−t)=f(t)).
Solution
f(−t)=f(t) means cj(−1)j=cj for every j, which forces cj=0 for odd j. So a basis is {1,t2,t4,…}, up to the largest even power that is at most n. Its dimension is n/2+1 if n is even, and (n+1)/2 if n is odd.
useApostol 1.10 #23(a)
For a=b, both non-zero, show that 1,eat,ebt are independent.
Solution
Suppose F(t)=c0+c1eat+c2ebt=0 for all t. Then F′(t)=ac1eat+bc2ebt=0 and F′′(t)=a2c1eat+b2c2ebt=0. At t=0: ac1+bc2=0 and a2c1+b2c2=0. Multiply the first by a and subtract from the second: (b2−ab)c2=b(b−a)c2=0. Since b=0 and b=a, c2=0. Then ac1=0 with a=0, so c1=0. Finally F(0)=c0=0.
use
Find the coordinates of x=(3,1) in the basis b1=(1,1), b2=(1,−1). Check them in the Basis2D visualizer by dragging.
Solution
Solve c1(1,1)+c2(1,−1)=(3,1): c1+c2=3 and c1−c2=1. Adding gives c1=2, then c2=1. Coordinates (2,1). Check: 2(1,1)+1(1,−1)=(3,1).
prove
Prove that any subset of an independent set is independent.
Solution
Let S be independent and T⊆S. Suppose a combination of elements of T equals O. Give every element of S that is not in T the coefficient 0. That gives a combination of elements of S equal to O, so every coefficient is zero by the independence of S, including those on T. So T is independent.
proveApostol 1.10, adapted
Let dimV=n. Prove that any n vectors that span V form a basis.
Solution
Suppose S={x1,…,xn} spans V but is dependent. Then some xj is a combination of the others, so removing it leaves a set of n−1 vectors that still spans V: anything built using xj can be rebuilt with xj replaced by its expression. But V has a basis of n independent vectors, and by the k+1 theorem, n vectors in the span of n−1 vectors are dependent. That is a contradiction, so S is independent, and it is a basis.
prove
Prove: if W is a subspace of V and dimV=n, then dimW≤n, with equality only if W=V.
Solution
By the k+1 theorem, any independent set in W, which is also in V, has at most n elements. So build a basis of W as in ‘Extending to a basis’ (part a), starting from the empty set and adding vectors of W outside the current span. This stops after at most n steps, so W has a basis and dimW≤n. If dimW=n, a basis of W is n independent vectors in V, so it is a basis of V by ‘Extending to a basis’ (part b). Then W=L(basis)=V.
prove
Prove that the span of S is the smallest subspace containing S: if W is a subspace with S⊆W, then L(S)⊆W.
Solution
Take any element ∑cixi of L(S). Each xi is in S, hence in W. By closure under scaling, each cixi∈W. By closure under addition, applied k−1 times, the sum is in W. So L(S)⊆W.
stretchAxler 2C
Let U and W be subspaces of a finite-dimensional space. Let U+W be the set of all sums u+w with u∈U and w∈W. Show U+W is a subspace, and prove
dim(U+W)=dimU+dimW−dim(U∩W).Solution
U+W contains O+O, and (u+w)+(u′+w′)=(u+u′)+(w+w′) and a(u+w)=au+aw, so it is a subspace.
For the formula, take a basis v1,…,vm of U∩W. Extend it to a basis v1,…,vm,u1,…,uj of U, and separately to a basis v1,…,vm,w1,…,wk of W (‘Extending to a basis’ (part a)). The combined list v‘s, u‘s, w‘s spans U+W. Suppose ∑aivi+∑biui+∑ciwi=O. Then ∑ciwi=−∑aivi−∑biui lies in U, and also in W, so it is in U∩W. So ∑ciwi=∑divi for some di, that is, ∑ciwi−∑divi=O. The v‘s and w‘s together are a basis of W, hence independent, so all ci=0 (and all di=0). Then ∑aivi+∑biui=O forces all ai=bi=0. So the list is a basis, and
dim(U+W)=m+j+k=(m+j)+(m+k)−m.
This is the vector-space version of inclusion–exclusion, ∣A∪B∣=∣A∣+∣B∣−∣A∩B∣, from CS 240.
Summary
The span of some vectors is everything they can build; it is always a subspace, the smallest one containing them.
A set is dependent if some combination with coefficients not all zero gives O. Equivalently, one vector is a combination of the others: it is wasted.
To test independence, set ∑cixi=O and solve. Independent means the only solution is all ci=0.
Key theorem:k+1 vectors in the span of k vectors are dependent. The proof is elimination plus induction.
A basis is independent and spanning. All bases of a space have the same size, the dimension.
In an n-dimensional space, n independent vectors form a basis, n spanning vectors form a basis, and any independent set extends to a basis.
A basis gives every vector unique coordinates, so an n-dimensional space can be computed in as if it were Rn.
Watch and read
The same ideas explained by someone else. Use these when an explanation here does not land.
CS 240: The main proof here is an induction on the number of vectors. It is the same induction you wrote in CS 240, used on a harder statement.
MATH 376: 'The general solution of y'' + y = 0 is a cos t + b sin t' means that cos and sin are a basis of the solution space, which has dimension 2.
CS 532 / AI: The 'dimension' of a dataset or of an embedding (768 numbers per token in BERT) is exactly this dimension: the number of coordinates needed.