Vector spaces, span and bases
The ten vector space conditions, subspaces, spans, linear independence, bases, dimension and the coordinates of a vector with respect to a basis, in ℝn and in spaces of polynomials.
Course notes: Syllabus ch. 3 (Vector Spaces) · Exercise sessions: Sheets 2, 3 and 4, first bonus test · About 60 minutes
What is a vector space?Important
A vector space over ℝ is a set V with an addition and a scalar multiplication that behave like those of arrows. Concretely, for all u, v, w in V and all scalars r, s:
| Addition | Scalar multiplication |
|---|---|
| (1) closure: v + w ∈ V | (6) closure: r v ∈ V |
| (2) commutative: v + w = w + v | (7) (r + s) v = r v + s v |
| (3) associative: (u + v) + w = u + (v + w) | (8) r (v + w) = r v + r w |
| (4) a zero vector 0 with v + 0 = v | (9) (rs) v = r (s v) |
| (5) every v has an inverse −v with v + (−v) = 0 | (10) 1 v = v |
Familiar examples: ℝn; the space Pn of polynomials of degree at most n (a polynomial a0 + a1x + ... + anxn behaves like the vector of its n + 1 coefficients); the space Mm×n of matrices; the space of all real functions. Two consequences that follow from the conditions (and are examinable proofs) are 0 · v = 0 and (−1) v = −v.
Unusual operations
On V = ℝ2 define (x1, y1) ⊕ (x2, y2) = (x1 + x2 − 1, y1 + y2 + 3) and r ⊙ (x, y) = (rx − r + 1, ry + 3r − 3).
Find the zero vector
Inverse of (x, y)
Condition (10)
Condition (8)
All ten conditions hold: this is ℝ2 with its origin moved to (1, −3). The zero vector of a space need not be (0, 0).
SubspacesImportant
A subspace W of V is a subset that is itself a vector space with the same operations. You do not need all ten conditions: W is a subspace as soon as it is non-empty and closed under linear combinations, that is, r w1 + s w2 ∈ W for all w1, w2 in W and scalars r, s. In practice check three things: 0 ∈ W, closed under addition, closed under scalar multiplication.
| Subset | Subspace? | Reason |
|---|---|---|
| {(x, y, z) | x − 2y + z = 0} in ℝ3 | yes | a plane through the origin; combinations of solutions are solutions |
| {(x, y) | y = x + 1} | no | does not contain (0, 0) |
| {(x, y) | xy ≥ 0} | no | (1, 0) + (0, −1) = (1, −1) leaves the set |
| {p ∈ P2 | p(1) = 0} | yes | if p(1) = q(1) = 0 then (rp + sq)(1) = 0 |
| {(x, y) | x ∈ ℤ} | no | 0.5 · (1, 0) leaves the set |
The intersection of two subspaces is always a subspace. Their union usually is not: the x-axis and the y-axis are subspaces of ℝ2, but (1, 0) + (0, 1) = (1, 1) lies on neither axis.
SpanImportant
The span of a set S = {s1, ..., sk} is the set of all linear combinations c1s1 + ... + cksk. It is always a subspace (an examinable proof), and it is the smallest subspace that contains S. By convention the span of the empty set is {0}.
To decide whether w lies in the span, solve c1s1 + ... + cksk = w. A solution means yes (and gives the coefficients); an inconsistent system means no.
Membership and an equation for a span
S = {(1, 2, 1), (2, 1, −1)} in ℝ3; is w = (4, 5, 1) in span S?
System
Solve
Conclusion
Cartesian equation of the span
Two independent vectors in ℝ3 span a plane through the origin.
Linear independenceImportant
A set {v1, ..., vk} is linearly independent when c1v1 + ... + ckvk = 0 forces c1 = ... = ck = 0. Otherwise it is dependent, and then at least one vector is a combination of the others and can be removed without shrinking the span.
Procedure: put the vectors as columns of a matrix and row reduce. Independent exactly when every column gets a pivot. Shortcuts: a set with the zero vector is dependent; two vectors are dependent exactly when one is a multiple of the other; more than n vectors in ℝn are always dependent.
Three vectors in ℝ3
v1 = (1, 0, 2), v2 = (2, 1, 3), v3 = (0, 1, −1).
Equations
Substitute
Non-trivial solution
Dependent: v2 = 2v1 + v3. The three vectors only span a plane.
Polynomials
Is {1 + x, x + x2, 1 + x2} independent in P2?
Combination equal to the zero polynomial
Compare coefficients
Solve
Independent, and since dim P2 = 3 these three polynomials form a basis of P2.
Basis and dimensionImportant
A basis of V is a sequence of vectors that is linearly independent and spans V. Every vector then has exactly one representation as a combination of the basis vectors. All bases of a space have the same number of vectors (an examinable proof); that number is the dimension.
| Space | Standard basis | Dimension |
|---|---|---|
| ℝn | e1, ..., en | n |
| Pn | 1, x, ..., xn | n + 1 |
| M2×2 | the four matrices with one entry 1 | 4 |
| {0} | the empty basis | 0 |
In a space of dimension n: n independent vectors automatically form a basis, n spanning vectors as well; more than n vectors are dependent; fewer than n cannot span. To trim a spanning set to a basis, keep the vectors that receive a pivot (drop those that are combinations of earlier ones). To extend an independent set, add vectors outside its span, for example standard basis vectors, until you have n of them.
A basis of a subspace given by equations
W = {(x, y, z, w) | x + y − z = 0 and y + 2w = 0} in ℝ4.
Free variables
General element
Basis
dim W = 2: four unknowns minus two independent equations.
Coordinates with respect to a basisImportant
If B = 〈b1, ..., bn〉 is a basis and v = c1b1 + ... + cnbn, the column (c1, ..., cn) is the representation RepB(v), the coordinates of v in B. The order of the basis vectors matters, which is why a basis is written as a sequence 〈 〉.
Coordinates in ℝ2
B = 〈(1, 1), (1, −1)〉 and v = (5, 1).
System
Solve
RepB(v) = 32. In the standard basis the same vector has coordinates (5, 1).
Coordinates of a polynomial
B = 〈1, 1 + x, 1 + x + x2〉 and p = 3 + 2x + 5x2.
Highest power first
Then x
Then the constant
Check
RepB(p) = (1, −3, 5).
Key takeaways
- A vector space satisfies ten conditions; a subspace only needs 0, closure under addition and closure under scalars.
- One counterexample is enough to reject a vector space or a subspace.
- The span of S is the set of all combinations of S, always a subspace.
- Independent: only the trivial combination gives 0; test with a pivot in every column.
- Basis = independent + spanning; every basis has dim V vectors.
- RepB(v) lists the unique coefficients of v in the basis B.
True or false (5)
{(x, y, z) | 2x − y = 0 and z = 0} is a subspace of ℝ3.
{(1, 2), (2, 4)} is a basis of ℝ2.
Every spanning set of ℝ3 contains at least three vectors.
The set of polynomials of degree exactly 2 is a subspace of P2.
If v3 is not in span{v1, v2} and {v1, v2} is independent, then {v1, v2, v3} is independent.
Multiple choice (7)
The dimension of {(x, y, z, w) | x + y + z + w = 0} is...
Which set is linearly dependent?
RepB((3, 1)) for B = 〈(1, 0), (1, 1)〉 is...
Is (1, 1, 1) in span{(1, 0, 1), (0, 1, 0)}?
Which subset of ℝ2 is a subspace?
In a 5-dimensional space a set of 4 independent vectors...
dim span{(1, 2, 0), (2, 4, 0), (0, 0, 3)} equals...
Exam-style open questions (3)
Exotic operations
On ℝ2 take (a, b) ⊕ (c, d) = (a + c + 2, b + d) and r ⊙ (a, b) = (ra + 2r − 2, rb). Find the zero vector and the inverse of (a, b), and check condition (7).
Show a model answer outline
- Zero vector: (a + z + 2, b + w) = (a, b) gives (z, w) = (−2, 0).
- Inverse of (a, b): (−a − 4, −b), because the sum is (−2, 0).
- (r + s) ⊙ (a, b) = ((r + s)a + 2(r + s) − 2, (r + s)b).
- r ⊙ v ⊕ s ⊙ v = (ra + 2r − 2 + sa + 2s − 2 + 2, rb + sb): the same, so (7) holds.
Trim to a basis
Find a basis of span{(1, 1, 0), (2, 2, 0), (1, 0, 1), (3, 2, 1)} and give its dimension.
Show a model answer outline
- Columns in a matrix, row reduce: pivots in columns 1 and 3.
- (2, 2, 0) = 2(1, 1, 0) and (3, 2, 1) = 2(1, 1, 0) + (1, 0, 1).
- Basis 〈(1, 1, 0), (1, 0, 1)〉, dimension 2: a plane through the origin, with equation x − y − z = 0.
Extend to a basis of P2
Extend {1 + x2, x − x2} to a basis of P2.
Show a model answer outline
- The two polynomials are not multiples, so they are independent.
- Try adding 1: a(1 + x2) + b(x − x2) + c = 0 gives b = 0 (x), then a = 0 (x2) and c = 0.
- So 〈1 + x2, x − x2, 1〉 is a basis of P2 (three independent vectors in a 3-dimensional space).
LabSpan membership and coordinates lab
Enter the vectors as the columns of a matrix: one row per line, entries separated by spaces.
LabIndependence and basis lab
Try four vectors in ℝ3: they can never be independent.
LabSubspace or not?
Look for 0 first; then try a sum or a multiple.