hanegreefs.com/Math II
Chapter 2 · unit 2 of 12

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:

AdditionScalar 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.

Worked example

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).

1

Find the zero vector

we need (x + a − 1, y + b + 3) = (x, y), so a = 1 and b = −3: the zero vector is (1, −3)
2

Inverse of (x, y)

(2 − x, −6 − y), because the sum is (1, −3)
3

Condition (10)

1 ⊙ (x, y) = (x − 1 + 1, y + 3 − 3) = (x, y)
4

Condition (8)

both r ⊙ (u ⊕ v) and (r ⊙ u) ⊕ (r ⊙ v) equal (r x1 + r x2 − 2r + 1, r y1 + r y2 + 6r − 3)
Answer

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).

Common trapTo show that something is not a vector space, one concrete counterexample to one condition is enough. With r ⊙ (x, y) = (rx, y) and the usual addition, (1 + 1) ⊙ (0, 1) = (0, 1) but 1 ⊙ (0, 1) + 1 ⊙ (0, 1) = (0, 2), so condition (7) fails.

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.

SubsetSubspace?Reason
{(x, y, z) | x − 2y + z = 0} in ℝ3yesa plane through the origin; combinations of solutions are solutions
{(x, y) | y = x + 1}nodoes not contain (0, 0)
{(x, y) | xy ≥ 0}no(1, 0) + (0, −1) = (1, −1) leaves the set
{p ∈ P2 | p(1) = 0}yesif p(1) = q(1) = 0 then (rp + sq)(1) = 0
{(x, y) | x ∈ ℤ}no0.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.

Worked example

Membership and an equation for a span

S = {(1, 2, 1), (2, 1, −1)} in ℝ3; is w = (4, 5, 1) in span S?

1

System

a + 2b = 4, 2a + b = 5, a − b = 1
2

Solve

the first two give a = 2, b = 1, and the third equation holds: 2 − 1 = 1
3

Conclusion

w = 2(1, 2, 1) + 1(2, 1, −1), so w ∈ span S
4

Cartesian equation of the span

normal (1, 2, 1) × (2, 1, −1) = (−3, 3, −3), so span S is the plane x − y + z = 0; indeed 4 − 5 + 1 = 0
Answer

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.

Worked example

Three vectors in ℝ3

v1 = (1, 0, 2), v2 = (2, 1, 3), v3 = (0, 1, −1).

1

Equations

c1 + 2c2 = 0, c2 + c3 = 0, 2c1 + 3c2 − c3 = 0
2

Substitute

c1 = −2c2 and c3 = −c2 turn the third equation into −4c2 + 3c2 + c2 = 0, always true
3

Non-trivial solution

c2 = 1 gives −2v1 + v2 − v3 = 0
Answer

Dependent: v2 = 2v1 + v3. The three vectors only span a plane.

Worked example

Polynomials

Is {1 + x, x + x2, 1 + x2} independent in P2?

1

Combination equal to the zero polynomial

a(1 + x) + b(x + x2) + c(1 + x2) = 0
2

Compare coefficients

constant: a + c = 0; x: a + b = 0; x2: b + c = 0
3

Solve

b = −a = c, then b + c = 2c = 0, so a = b = c = 0
Answer

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.

SpaceStandard basisDimension
ℝne1, ..., enn
Pn1, x, ..., xnn + 1
M2×2the four matrices with one entry 14
{0}the empty basis0

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.

Worked example

A basis of a subspace given by equations

W = {(x, y, z, w) | x + y − z = 0 and y + 2w = 0} in ℝ4.

1

Free variables

z and w; then y = −2w and x = z − y = z + 2w
2

General element

(z + 2w, −2w, z, w) = z(1, 0, 1, 0) + w(2, −2, 0, 1)
3

Basis

⟨(1, 0, 1, 0), (2, −2, 0, 1)⟩: spanning by construction, independent because of the 1s in the free positions
Answer

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 ⟨ ⟩.

Worked example

Coordinates in ℝ2

B = ⟨(1, 1), (1, −1)⟩ and v = (5, 1).

1

System

a + b = 5 and a − b = 1
2

Solve

a = 3, b = 2
Answer

RepB(v) = 32. In the standard basis the same vector has coordinates (5, 1).

Worked example

Coordinates of a polynomial

B = ⟨1, 1 + x, 1 + x + x2⟩ and p = 3 + 2x + 5x2.

1

Highest power first

only the third basis vector has x2: c = 5
2

Then x

b + c = 2, so b = −3
3

Then the constant

a + b + c = 3, so a = 1
4

Check

1 − 3(1 + x) + 5(1 + x + x2) = 3 + 2x + 5x2
Answer

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.

Loading cards
Question
Click, tap or press space to flip
Answer

True or false (5)

Statement 1 · Chapter 2 · true or false

{(x, y, z) | 2x − y = 0 and z = 0} is a subspace of ℝ3.

Why: A line through the origin: the solution set of a homogeneous system.
Statement 2 · Chapter 2 · true or false

{(1, 2), (2, 4)} is a basis of ℝ2.

Why: The vectors are multiples of each other.
Statement 3 · Chapter 2 · true or false

Every spanning set of ℝ3 contains at least three vectors.

Why: Fewer than dim V vectors cannot span V.
Statement 4 · Chapter 2 · true or false

The set of polynomials of degree exactly 2 is a subspace of P2.

Why: It misses the zero polynomial, and x2 + (−x2) = 0 leaves the set.
Statement 5 · Chapter 2 · true or false

If v3 is not in span{v1, v2} and {v1, v2} is independent, then {v1, v2, v3} is independent.

Why: Adding a vector outside the span keeps independence (an examinable lemma).

Multiple choice (7)

Question 1 · Chapter 2

The dimension of {(x, y, z, w) | x + y + z + w = 0} is...

Why: One equation in four unknowns leaves three free variables.
Question 2 · Chapter 2

Which set is linearly dependent?

Why: (2, 4, 6) = 2(1, 2, 3).
Question 3 · Chapter 2

RepB((3, 1)) for B = ⟨(1, 0), (1, 1)⟩ is...

Why: 2(1, 0) + 1(1, 1) = (3, 1).
Question 4 · Chapter 2

Is (1, 1, 1) in span{(1, 0, 1), (0, 1, 0)}?

Why: The sum gives exactly (1, 1, 1).
Question 5 · Chapter 2

Which subset of ℝ2 is a subspace?

Why: A line through the origin. x2 = y2 is a union of two lines.
Question 6 · Chapter 2

In a 5-dimensional space a set of 4 independent vectors...

Why: Add one vector outside the span.
Question 7 · Chapter 2

dim span{(1, 2, 0), (2, 4, 0), (0, 0, 3)} equals...

Why: The first two are parallel; the third is independent of them.

Exam-style open questions (3)

Open question · Chapter 2

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.
Open question · Chapter 2

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.
Open question · Chapter 2

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.