Survey of Mathematics

2.1 Vector spaces and subspaces

Arrows, lists of numbers, polynomials and functions can all be added and scaled by the same ten rules, so we study the rules once and get results for all of them.

Taught in 375/376Beyond the courseApostol 1.1 to 1.6Spagnolie, Lectures 1 and 2MATH 375 HW1

In JEE a vector was an arrow: something with a length and a direction. But many other things also get added and stretched: lists of numbers, polynomials, sound waves, images, the solutions of a differential equation. They all obey the same handful of rules. This chapter writes those rules down. Anything that obeys them is a vector space, and every fact we prove from the rules is then true for all of these things at once.

Two names come up throughout. Apostol is the textbook MATH 375 used (Tom Apostol, Calculus, Volume 2). Spagnolie is the professor who taught your 375 section; his lecture examples appear where they explain something well. “Apostol 1.4” means section 1.4 of that book, not a chapter of this one.

Before you start

Only high-school algebra. The set language used below is defined in the first section, so nothing from CS 240 is assumed. Two quick checks on the names of the rules of ordinary arithmetic, because the axioms reuse them:

Quick checkWhich rule of ordinary arithmetic says a(b+c)=ab+aca(b + c) = ab + ac?
Quick checkWhich rule says (a+b)+c=a+(b+c)(a + b) + c = a + (b + c)?

The picture

Start with two operations you already know for arrows: add two arrows (tip to tail), and stretch an arrow by a number. Now switch the visualizer to functions, then to lists of numbers. The objects change, but the two operations and the way they behave do not.

Three things to notice:

  • In every case, adding two objects gives another object of the same kind. Two arrows give an arrow, two functions give a function, and two lists of four numbers give a list of four numbers.
  • In every case, multiplying by a number does the same. Setting a=0a = 0 shrinks the object to “nothing”, which is the zero arrow, the zero function (a flat line at height 0), or the list (0,0,0,0)(0, 0, 0, 0).
  • In every case, a=−1a = -1 produces the opposite object, which cancels the original when you add them.

An axiom is a rule we agree to accept without proof. In this chapter the axioms are the rules of adding and scaling. Every theorem after that is built only from the axioms, one cited step at a time. The observations above, made precise, are the axioms.

The language: sets

A few words used in the rest of the book.

Same idea elsewhere· Recap: sets

A set is a collection of objects, called its elements. We write x∈Sx \in S for ”xx is an element of SS” and x∉Sx \notin S for “it is not”. A set is determined by its elements alone: {1,2,3}\{1, 2, 3\} and {3,1,2}\{3, 1, 2\} are the same set. Chapter 0.3 defines sets properly, with unions, intersections and how to prove two sets are equal.

The notation you will see most:

NotationRead it asExample
R\mathbb Rthe set of all real numbersπ∈R\pi \in \mathbb R
Rn\mathbb R^nthe set of all ordered lists (x1,…,xn)(x_1, \dots, x_n) of nn real numbers(1,−2,0)∈R3(1, -2, 0) \in \mathbb R^3
{x:condition}\{x : \text{condition}\}the set of all xx that satisfy the condition (set-builder notation){x∈R:x>0}\{x \in \mathbb R : x > 0\} is the positive reals
S⊆VS \subseteq VSS is a subset of VV: every element of SS is also in VV{(x,0):x∈R}⊆R2\{(x, 0) : x \in \mathbb R\} \subseteq \mathbb R^2

An “ordered list” means order matters: (1,2)≠(2,1)(1, 2) \ne (2, 1) in R2\mathbb R^2. Each xix_i is called an entry or component of the list.

The idea, in words

Why· Why bother with axioms

We want to prove a fact once and use it everywhere. For example: “if a⋅x=0a \cdot x = 0, then a=0a = 0 or x=0x = 0.” We could prove it for arrows, then again for polynomials, then again for matrices. Or we can notice that the proof only ever uses a few rules about adding and scaling. If an object obeys those rules, the proof works for it automatically.

So we list the rules, and give the name “vector space” to anything that obeys them. The rules are the axioms. A theorem proved from the axioms alone holds in every vector space, including ones nobody has thought of yet.

Where this came from· From arrows to axioms

Physicists added forces and velocities as arrows long before anyone wrote rules down. In 1844 Hermann Grassmann, a German schoolteacher, published the Ausdehnungslehre (“theory of extension”). It was an algebra of geometric quantities that worked in any number of dimensions, with linear combinations, independence and dimension already in it. It was so unusual that almost nobody read it. In 1888 Giuseppe Peano, building on Grassmann, wrote down the first axiomatic definition of a real vector space, very close to the ten axioms below. The idea only became standard in the 1920s, when Stefan Banach and others needed spaces of functions to behave like spaces of arrows. That need is why Apostol, and this book, start from axioms instead of from arrows.

Definitions and theorems

Definition T

Scalar

A scalar is a number used to multiply vectors. In a real vector space the scalars are the real numbers. In a complex vector space they are the complex numbers (used in quantum mechanics and in Unit 3).

In one lineA number you multiply vectors by. In this book it is a real number unless we say complex.

Why it existsWe need a word that separates the numbers doing the stretching from the objects being stretched.

Definition T

Vector space

A real vector space (Apostol says linear space) is a non-empty set VV together with two operations:

  • addition, which takes two elements x,y∈Vx, y \in V and gives an element written x+yx + y;
  • scalar multiplication, which takes a real number aa and an element x∈Vx \in V and gives an element written axax;

such that the ten axioms below hold. The elements of VV are then called vectors, whatever they actually are.

In one lineA non-empty set VV with an addition and a scalar multiplication that obey the ten axioms below; its elements are called vectors.

Why it existsIt captures exactly the behaviour that arrows, lists, polynomials and functions share, so one theorem covers all of them.

Here are the ten axioms, with Apostol’s numbering, which the course used. In axioms 1 and 2, closure means that adding (or scaling) things from the set never takes you outside the set. It gets a formal definition right after the table. In each, x,y,zx, y, z are any elements of VV and a,ba, b are any real numbers.

AxiomIn symbolsWhat it says, for arrows
1Closure under additionx+y∈Vx + y \in VAdding two arrows gives an arrow, not something else.
2Closure under scalar multiplicationax∈Vax \in VStretching an arrow gives an arrow.
3Commutative lawx+y=y+xx + y = y + xTip to tail in either order lands at the same point.
4Associative law(x+y)+z=x+(y+z)(x + y) + z = x + (y + z)With three arrows, the grouping does not matter.
5Zero elementthere is an element O∈VO \in V with x+O=xx + O = x for every xxThe arrow of length 0 changes nothing.
6Negativesx+(−1)x=Ox + (-1)x = OFlipping an arrow and adding it brings you back to the start.
7Associative law for scalarsa(bx)=(ab)xa(bx) = (ab)xStretch by 2 then by 3, or by 6 at once.
8Distributive law, adding vectorsa(x+y)=ax+aya(x + y) = ax + ayScaling a triangle of arrows scales each side.
9Distributive law, adding numbers(a+b)x=ax+bx(a + b)x = ax + bx5x5x is 2x2x followed by 3x3x.
10Identity1x=x1x = xMultiplying by 1 changes nothing.
Quick checkTake VV = the positive real numbers, with ordinary addition and ordinary multiplication by real numbers. Which axiom fails first?
Definition T

Closed under

A set SS is closed under addition if x+y∈Sx + y \in S whenever x,y∈Sx, y \in S. It is closed under scalar multiplication if ax∈Sax \in S whenever x∈Sx \in S and aa is a scalar.

In one lineA set is closed under an operation when applying it to elements of the set never produces something outside the set.

Why it existsAxioms 1 and 2 are closure statements, and the subspace test below is nothing but two closure checks.

Watch out· Which axioms actually fail in practice

When the operations are the usual ones, axioms 3, 4 and 7 to 10 are facts about real numbers. They hold automatically for lists and functions, because those operations work entry by entry, or point by point. The usual way a set fails is axiom 1 or 2: adding two of its elements, or scaling one, leaves the set. Axioms 5 and 6 then come for free from axiom 2, because O=0xO = 0x and −x=(−1)x-x = (-1)x are scalings of xx. The subspace test below proves this.

Apostol’s axiom 6 is more specific than you might expect. It names the opposite of xx exactly: (−1)x(-1)x. Spagnolie wrote it as x+(−x)=Ox + (-x) = O, which says the same thing once we know that negatives are unique (proved below).

First consequences

For arrows, the next results are what you would expect. The point is that they follow from the ten axioms alone, so they hold in every vector space. These are your first proofs from axioms. In each step, the reason names the axiom used.

Definition T

Zero vector

The zero vector (or zero element) of VV is the element OO given by axiom 5. In Rn\mathbb R^n it is (0,…,0)(0, \dots, 0); for functions it is the function that is 0 everywhere; for matrices it is the matrix of zeros.

In one lineThe element OO of axiom 5, with x+O=xx + O = x for every xx; it is unique.

Why it existsEvery subspace must contain it, which makes it the fastest test for whether a set can be a vector space.

Uniqueness matters because it lets us say the zero vector and the negative of xx. Without it, "−x-x" would not name one thing.

Theorem T Apostol Thm 1.1

Uniqueness of the zero vector

In any vector space there is one and only one zero element.

In one lineA vector space has exactly one zero element.

Why it is trueIf O1O_1 and O2O_2 are both zeros, then O1=O1+O2=O2O_1 = O_1 + O_2 = O_2.

ProofApostol 1.4; Spagnolie Lecture 2
The idea: Suppose there were two zeros, and add them to each other. Each one 'does nothing' to the other, so the sum equals both of them.
Suppose O1O_1 and O2O_2 are both zero elements.
Axiom 5 gives at least one. To show there is only one, take any two and show they are equal.
O1+O2=O1O_1 + O_2 = O_1.
O2O_2 is a zero element, so adding it to anything (x=O1x = O_1 here) changes nothing.
O2+O1=O2O_2 + O_1 = O_2.
O1O_1 is a zero element, so adding it to O2O_2 changes nothing.
O1+O2=O2+O1O_1 + O_2 = O_2 + O_1.
Axiom 3: addition can be done in either order.
O1=O1+O2=O2+O1=O2O_1 = O_1 + O_2 = O_2 + O_1 = O_2, so O1=O2O_1 = O_2.
Chain the last three lines together.
Proof workshopGive the reason for each line: the zero vector is unique

Each line of the proof is shown in order. Choose the reason that justifies it, then press Check.

  1. Suppose O1O_1 and O2O_2 are both zero elements.
  2. O1+O2=O1O_1 + O_2 = O_1
  3. O2+O1=O2O_2 + O_1 = O_2
  4. O1+O2=O2+O1O_1 + O_2 = O_2 + O_1
  5. O1=O2O_1 = O_2
Definition T

Negative

The negative of xx, written −x-x, is the element (−1)x(-1)x from axiom 6. Subtraction is defined by y−x=y+(−x)y - x = y + (-x).

In one lineThe negative of xx is (−1)x(-1)x, written −x-x. It is the only yy with x+y=Ox + y = O (proved below).

Why it existsSubtraction, y−x=y+(−x)y - x = y + (-x), is built from it.

Theorem T Apostol Thm 1.2

Uniqueness of negatives

For every xx in a vector space there is one and only one yy with x+y=Ox + y = O.

In one lineEach xx has exactly one yy with x+y=Ox + y = O, namely (−1)x(-1)x.

Why it is trueAdd the second candidate to both sides of the first equation and regroup.

ProofApostol 1.4; Spagnolie Lecture 2
The idea: We want y₁ = y₂. The trick is to build one expression, y₂ + x + y₁, that equals y₂ when grouped one way and y₁ when grouped the other way. Both answers come from the same expression, so they must be equal.
Suppose x+y1=Ox + y_1 = O and x+y2=Ox + y_2 = O.
Axiom 6 says (−1)x(-1)x works, so at least one exists. Now take any two.
y2+(x+y1)=y2+O=y2y_2 + (x + y_1) = y_2 + O = y_2.
Group as y2+(x+y1)y_2 + (x + y_1). The bracket is OO by the first assumption, and axiom 5 removes it.
y2+(x+y1)=(y2+x)+y1y_2 + (x + y_1) = (y_2 + x) + y_1.
Axiom 4: the grouping of a sum does not matter.
(y2+x)+y1=(x+y2)+y1(y_2 + x) + y_1 = (x + y_2) + y_1.
Axiom 3: y2+x=x+y2y_2 + x = x + y_2.
(x+y2)+y1=O+y1(x + y_2) + y_1 = O + y_1.
The second assumption says x+y2=Ox + y_2 = O.
O+y1=y1+O=y1O + y_1 = y_1 + O = y_1.
Axiom 3 then axiom 5.
y2=y1y_2 = y_1.
The two lines computed the same expression y2+(x+y1)y_2 + (x + y_1), so the answers agree.
Theorem T Apostol Thm 1.3(a)

Scaling by zero

For every x∈Vx \in V, 0x=O0x = O. (On the left, 00 is the number zero; on the right, OO is the zero vector.)

In one line0x=O0x = O for every vector xx.

Why it is true0x=(0+0)x=0x+0x0x = (0 + 0)x = 0x + 0x, and subtracting 0x0x leaves OO.

ProofApostol 1.4
The idea: Write the number 0 as 0 + 0 and use the distributive law. That shows 0x added to itself is 0x, and the only vector with that property is the zero vector.
Let z=0xz = 0x.
A name, to keep the lines short.
z=0x=(0+0)x=0x+0x=z+zz = 0x = (0 + 0)x = 0x + 0x = z + z.
The number 00 equals 0+00 + 0; then axiom 9 splits the scalar.
z+(−z)=(z+z)+(−z)z + (-z) = (z + z) + (-z).
Add −z-z to both sides of z=z+zz = z + z. We are allowed to do the same thing to both sides because they are the same element.
Left side: z+(−z)=Oz + (-z) = O.
Axiom 6: a vector plus its negative is OO.
Right side: (z+z)+(−z)=z+(z+(−z))=z+O=z(z + z) + (-z) = z + (z + (-z)) = z + O = z.
Axiom 4 regroups; axiom 6 turns z+(−z)z + (-z) into OO; axiom 5 removes the OO.
So O=zO = z, that is, 0x=O0x = O.
The two sides were equal, so their simplified forms are equal. And zz was our name for 0x0x.
Same idea elsewhere· Where this kind of proof came from

The move “write 00 as 0+00 + 0, then cancel” is the same trick that proves 0⋅a=00 \cdot a = 0 for ordinary numbers. School never asked you to prove that, because it was taken for granted. Here it is a theorem because “vector” could mean anything, and you only know what the axioms give you.

Worked example Apostol 1.5, adapted
Prove from the axioms: if x+y=x+zx + y = x + z, then y=zy = z (cancellation).

Solution. The plan: add −x-x to both sides to remove xx, and track each axiom used.

  1. Start from the hypothesis. x+y=x+zx + y = x + z. This is what we are told.
  2. Add −x-x on the left of both sides. (−x)+(x+y)=(−x)+(x+z)(-x) + (x + y) = (-x) + (x + z). Both sides are the same vector, so adding the same thing to each keeps them equal.
  3. Regroup. ((−x)+x)+y=((−x)+x)+z((-x) + x) + y = ((-x) + x) + z. Axiom 4 (associativity) lets us move the brackets.
  4. Cancel the pair. (−x)+x=x+(−x)=O(-x) + x = x + (-x) = O, so O+y=O+zO + y = O + z. Axiom 3 swaps the order, then axiom 6 (with −x=(−1)x-x = (-1)x) gives OO.
  5. Remove the zero. y+O=z+Oy + O = z + O, so y=zy = z. Axiom 3 swaps again, then axiom 5 says adding OO changes nothing.

Answer. y=zy = z. Every step cited one axiom: this is what “proof from the axioms” means.

Subspaces

Most vector spaces you meet sit inside a bigger one: a plane through the origin inside 3D space, or the polynomials of degree at most 3 inside all functions. These are subspaces.

Definition T

Subspace

Let VV be a vector space and S⊆VS \subseteq V a non-empty subset. If SS is a vector space under the same addition and scalar multiplication as VV, then SS is a subspace of VV.

In one lineA non-empty subset SS of a vector space VV that is itself a vector space with the same operations.

Why it existsSolution sets, spans, null spaces and eigenspaces are all subspaces. The test below lets you confirm one with two quick checks.

The flat plane in the picture is a subspace of R3\mathbb R^3. Every sum of multiples of its two arrows stays on it, and it passes through the origin.

Theorem T Apostol Thm 1.4 (section 1.6)

Subspace test

Let SS be a non-empty subset of a vector space VV. Then SS is a subspace of VV if and only if SS is closed under addition and closed under scalar multiplication.

In one lineA non-empty subset of a vector space is a subspace exactly when it is closed under addition and under scalar multiplication.

Why it is trueThe other eight axioms are either inherited from VV, or (zero and negatives) produced by scaling with 00 and −1-1.

“If and only if” means two statements, and we prove each. (⇒\Rightarrow) means “subspace implies closed”. (⇐\Leftarrow) means “closed implies subspace”.

ProofApostol 1.6; Spagnolie Lecture 2
The idea: One direction is immediate. For the other, sort the ten axioms into three kinds: closure (assumed), equations that hold for all elements of V and so for elements of S (inherited), and the two that ask for an element to EXIST in S (zero and negatives). Produce those two by scaling.
(⇒\Rightarrow) If SS is a subspace, it satisfies axioms 1 and 2, which say exactly that SS is closed.
A subspace is a vector space, so axioms 1 and 2 hold for it.
(⇐\Leftarrow) Now assume SS is non-empty and closed under both operations. We check the ten axioms for SS.
This direction is the harder one, because each of the ten axioms has to be checked inside SS.
Axioms 1 and 2 hold.
These are the assumptions.
Axioms 3, 4, 7, 8, 9 and 10 hold, because each is an equation that is true for every element of VV, in particular for those in SS.
Each of these is an equation about elements. It holds for all elements of VV, and elements of SS are elements of VV.This is what Spagnolie meant by 'inherited from V'.
Pick x∈Sx \in S. Then O=0x∈SO = 0x \in S, so axiom 5 holds in SS.
Axiom 5 asks for OO to be IN SS. That is not inherited, so we build it. SS is non-empty, so pick any x∈Sx \in S. Closure under scalars puts 0x0x in SS, and 0x=O0x = O by 'Scaling by zero' above.This is where 'non-empty' is used. The empty set is closed under everything but contains no zero.
For any x∈Sx \in S, (−1)x∈S(-1)x \in S, and x+(−1)x=Ox + (-1)x = O by axiom 6 in VV. So axiom 6 holds in SS.
Axiom 6 asks for (−1)x(-1)x to be in SS. Closure under scalars, with a=−1a = -1, gives it.
SS is a vector space with the operations of VV, so it is a subspace.
All ten checked.
Quick checkIn the proof of the subspace test, where is the assumption that SS is NON-EMPTY used?
Proof workshopRebuild the subspace test (the closed-implies-subspace direction)

Tap the lines in the order a proof would write them. Each line can only use what is already above it.

    Why· The quick test you will actually use

    To show a set SS is a subspace, check three things:

    1. O∈SO \in S. This also shows SS is non-empty.
    2. If x,y∈Sx, y \in S, then x+y∈Sx + y \in S.
    3. If x∈Sx \in S and aa is any scalar, then ax∈Sax \in S.

    To show a set is not a subspace, one failure with one specific example is enough. Check whether O∈SO \in S first. That check alone rules out most impostors.

    Quick checkS={(x,y):xy=0}S = \{(x, y) : xy = 0\}, the two coordinate axes together. Is it a subspace of R2\mathbb R^2?

    Examples and non-examples

    Lists, Rn\mathbb R^n. Add entry by entry, scale entry by entry. Every axiom reduces to the same fact about real numbers in each entry. For example, axiom 3 holds because xi+yi=yi+xix_i + y_i = y_i + x_i in every entry. So Rn\mathbb R^n is a vector space.

    Matrices. The set Rm×n\mathbb R^{m \times n} of mm by nn arrays of real numbers, added and scaled entry by entry, is a vector space. Spagnolie’s advice for checking an axiom here: “go slowly and only use the definitions.” Write aija_{ij} for the entry of AA in row ii and column jj, and use λ\lambda (lambda) for a scalar. For axiom 8, λ(A+B)\lambda(A + B) has entries λ(aij+bij)\lambda(a_{ij} + b_{ij}). The ordinary distributive law turns that into λaij+λbij\lambda a_{ij} + \lambda b_{ij}, and those are exactly the entries of λA+λB\lambda A + \lambda B.

    Your answerLet A=[1234]A = \begin{bmatrix}1&2\\3&4\end{bmatrix} and B=[0−152]B = \begin{bmatrix}0&-1\\5&2\end{bmatrix}. The matrix 2A−3B2A - 3B is computed entry by entry. What is its entry in row 2, column 1?

    Functions. Let VV be the set of all real functions on [0,1][0, 1]. Define f+gf + g by (f+g)(t)=f(t)+g(t)(f + g)(t) = f(t) + g(t), and afaf by (af)(t)=a f(t)(af)(t) = a\,f(t). Each axiom holds because it holds for the numbers f(t)f(t) at every tt. The zero vector is the function that is 00 everywhere.

    Watch out· Each vector is a whole function

    In a function space, one vector is a whole function: the entire graph. Spagnolie underlined this. The number f(0.3)f(0.3) is one value of one vector. It is a number, and the vectors of this space are functions.

    Your answerIn the space of real functions, let f(t)=t2+1f(t) = t^2 + 1 and g(t)=3tg(t) = 3t. The vector 2f−g2f - g is itself a function, defined point by point. What is its value at t=2t = 2?
    Quick checkIn the vector space of all real functions on [0,1][0, 1], which of these is a vector?

    Polynomials of degree at most nn. Write PnP_n for these: polynomials c0+c1t+⋯+cntnc_0 + c_1 t + \dots + c_n t^n, including the zero polynomial. A sum of two of them still has degree at most nn, and so does a scalar multiple. So PnP_n is a subspace of the function space.

    Worked example
    Is the line {(x,y):y=2x}\{(x, y) : y = 2x\} a subspace of R2\mathbb R^2? Is the line y=2x+1y = 2x + 1?

    Solution.

    1. Zero vector. (0,0)(0, 0) satisfies 0=2⋅00 = 2 \cdot 0, so it is on the first line. The fastest first test: every subspace contains OO.
    2. Addition, with arbitrary points. Two points on the line look like (p,2p)(p, 2p) and (q,2q)(q, 2q). Their sum is (p+q, 2p+2q)=(p+q, 2(p+q))(p + q,\ 2p + 2q) = (p + q,\ 2(p + q)), which has the form (number, twice that number). Closure must be shown for ANY two points, so we name them with letters, not numbers.
    3. Scaling. a(p,2p)=(ap, 2(ap))a(p, 2p) = (ap,\ 2(ap)), again on the line. Closure under scalar multiplication.
    4. The second line. (0,0)(0, 0) does not satisfy 0=2⋅0+10 = 2 \cdot 0 + 1. One failure is enough to say no.

    Answer. y=2xy = 2x is a subspace. y=2x+1y = 2x + 1 is not: it misses the origin.

    Quick checkWhich of these is a subspace of R3\mathbb R^3?
    Worked example
    Do the polynomials of degree exactly 3 form a vector space?

    Solution.

    1. Look for a pair whose sum leaves the set. Take p(t)=t3+tp(t) = t^3 + t and q(t)=−t3q(t) = -t^3. Both have degree exactly 3. Adding can cancel the top term, so try a pair whose t3t^3 terms cancel.
    2. Add them. p+q=tp + q = t, which has degree 1. So the sum is outside the set.
    3. Conclude. Closure under addition (axiom 1) fails. One counterexample is enough.

    Answer. No. (The zero polynomial is missing too.) Compare: the polynomials of degree AT MOST 3 do form a vector space, P3P_3, because cancelling the top term only lowers the degree, and lower degrees are allowed.

    Worked example
    Is the first quadrant {(x,y):x≥0, y≥0}\{(x, y) : x \ge 0,\ y \ge 0\} a subspace of R2\mathbb R^2?

    Solution.

    1. Zero vector. (0,0)(0, 0) has 0≥00 \ge 0 and 0≥00 \ge 0. In the set. Passing this test proves nothing yet; it only fails to rule the set out.
    2. Addition. If x1,y1,x2,y2≥0x_1, y_1, x_2, y_2 \ge 0, then x1+x2≥0x_1 + x_2 \ge 0 and y1+y2≥0y_1 + y_2 \ge 0. Closed. Sums of non-negative numbers are non-negative.
    3. Scaling. Take a=−1a = -1 and the point (1,1)(1, 1): (−1)(1,1)=(−1,−1)(-1)(1, 1) = (-1, -1), not in the quadrant. Scaling allows negative numbers, and they flip the sign.

    Answer. Not a subspace: closure under scalar multiplication fails. Compare the union of the two axes in the quick check above: that one fails addition instead. Different sets fail in different places, so check all three.

    Worked example
    Show that the solutions of x+2y−z=0x + 2y - z = 0 and 3x−y+4z=03x - y + 4z = 0 form a subspace of R3\mathbb R^3.

    A system of linear equations is homogeneous when every right-hand side is 0. This one is.

    Solution.

    1. Zero vector. (0,0,0)(0, 0, 0) gives 0=00 = 0 in both equations. Homogeneous systems always have the zero solution.
    2. Addition. Suppose (x1,y1,z1)(x_1, y_1, z_1) and (x2,y2,z2)(x_2, y_2, z_2) both solve the system. Then (x1+x2)+2(y1+y2)−(z1+z2)=(x1+2y1−z1)+(x2+2y2−z2)=0+0=0(x_1 + x_2) + 2(y_1 + y_2) - (z_1 + z_2) = (x_1 + 2y_1 - z_1) + (x_2 + 2y_2 - z_2) = 0 + 0 = 0, and the second equation works the same way. Regroup the sum into the two original left sides, each of which is 0.
    3. Scaling. ax1+2(ay1)−(az1)=a(x1+2y1−z1)=a⋅0=0ax_1 + 2(ay_1) - (az_1) = a(x_1 + 2y_1 - z_1) = a \cdot 0 = 0, and likewise for the second equation. Factor out aa.

    Answer. A subspace. Now change a right side to 5. Then (0,0,0)(0, 0, 0) is no longer a solution, so OO is missing. Closure fails too: two solutions add up to something with right side 10. Only homogeneous systems give subspaces.

    Worked example
    Is W={f:f(0)=0}W = \{f : f(0) = 0\} a subspace of the real functions on [0,1][0, 1]? Is {f:f(0)=1}\{f : f(0) = 1\}?

    Solution.

    1. Zero vector. The zero function has value 0 at 0, so it is in WW. It is not in the second set, since 0≠10 \ne 1. The zero vector of a function space is the zero function.
    2. Addition. If f(0)=0f(0) = 0 and g(0)=0g(0) = 0, then (f+g)(0)=f(0)+g(0)=0(f + g)(0) = f(0) + g(0) = 0. Functions add value by value; that is how f+gf + g is defined.
    3. Scaling. (af)(0)=a f(0)=a⋅0=0(af)(0) = a\,f(0) = a \cdot 0 = 0. Same reason.

    Answer. WW is a subspace. The second set is not: no zero function, and also (f+g)(0)=2(f + g)(0) = 2. A condition “equals 0” tends to give a subspace; “equals 1” never does.

    Worked example
    On R2\mathbb R^2, keep ordinary addition but define scaling by a(x1,x2)=(x1, ax2)a(x_1, x_2) = (x_1,\ a x_2). Which of the ten axioms fail?

    When an operation is changed, every axiom that uses it has to be tested. Addition is the usual one, so axioms 1, 3, 4 and 5 hold as in R2\mathbb R^2.

    Solution.

    1. Axiom 2 (closure). a(x1,x2)=(x1,ax2)a(x_1, x_2) = (x_1, ax_2) is a pair of reals. Holds. The output is still a list of two real numbers.
    2. Axiom 7. a(b x)=a(x1,bx2)=(x1,abx2)=(ab)xa(b\,x) = a(x_1, bx_2) = (x_1, abx_2) = (ab)x. Holds. Scale twice: only the second entry is multiplied, and it picks up bb then aa.
    3. Axiom 8. a(x+y)=(x1+y1, a(x2+y2))a(x + y) = (x_1 + y_1,\ a(x_2 + y_2)) and ax+ay=(x1+y1, ax2+ay2)ax + ay = (x_1 + y_1,\ ax_2 + ay_2). Equal, so holds. Compare both sides entry by entry.
    4. Axiom 10. 1x=(x1,1⋅x2)=x1x = (x_1, 1 \cdot x_2) = x. Holds. Multiplying the second entry by 1 changes nothing.
    5. Axiom 9. (a+b)x=(x1, (a+b)x2)(a + b)x = (x_1,\ (a + b)x_2), but ax+bx=(2x1, (a+b)x2)ax + bx = (2x_1,\ (a + b)x_2). Take a=b=1a = b = 1 and x=(1,0)x = (1, 0): the left side is (1,0)(1, 0), the right is (2,0)(2, 0). Fails. The first entry is not scaled, so adding two copies doubles it.
    6. Axiom 6. x+(−1)x=(x1,x2)+(x1,−x2)=(2x1,0)x + (-1)x = (x_1, x_2) + (x_1, -x_2) = (2x_1, 0), which is not OO unless x1=0x_1 = 0. Fails. Same cause: the first entry is never flipped.

    Answer. Axioms 9 and 6 fail; the other eight hold. So this is not a vector space. One failing axiom is enough, and a single example (x=(1,0)x = (1, 0) here) shows it.

    A preview· Preview: null spaces

    “The solutions of a system whose right sides are all zero form a subspace” is the first example of a null space. Chapter 2.3 shows that the null space of every linear map is a subspace, and the reason is the same two lines of algebra.

    A strange one: Apostol 1.5 #29. Let VV be the positive real numbers. Define the “sum” of xx and yy to be their ordinary product xyxy, and “scaling” xx by cc to be the power xcx^c. All ten axioms hold; the last stretch problem checks them. Here the zero vector, the element that plays the role of OO, is the number 11, because the “sum” x⋅1=xx \cdot 1 = x. Check it against ‘Scaling by zero’: "0⋅x0 \cdot x" here means x0=1x^0 = 1, which is indeed this space’s zero vector. The negative of xx is 1/x1/x, because the “sum” x⋅(1/x)=1x \cdot (1/x) = 1. A vector space can look nothing like arrows, as long as it follows the rules. (Taking log⁡\log turns this space into R\mathbb R with ordinary operations, because log⁡(xy)=log⁡x+log⁡y\log(xy) = \log x + \log y and log⁡(xc)=clog⁡x\log(x^c) = c \log x. That is a preview of isomorphism, chapter 2.4.)

    Your answerIn this space ('sum' is the product, 'scaling by cc' is the power xcx^c), which positive number is the vector 3⋅43 \cdot 4, meaning the vector 44 scaled by the scalar 33?
    Your answerIn the same space, what is the negative of the vector 88? (It is the vector yy with 8+y=O8 + y = O, where 'sum' is multiplication and OO is 11.)

    Where it is used

    Used inside maths· Inside maths: differential equations

    The solutions of y′′+y=0y'' + y = 0 form a vector space. If y1y_1 and y2y_2 are solutions, then (y1+y2)′′+(y1+y2)=(y1′′+y1)+(y2′′+y2)=0(y_1 + y_2)'' + (y_1 + y_2) = (y_1'' + y_1) + (y_2'' + y_2) = 0, and scaling works the same way. This is why the solutions can be described by a basis. The solution space has dimension 2 (chapter 7.2 proves it), and cos⁡\cos and sin⁡\sin are two independent solutions, so every solution is acos⁡t+bsin⁡ta \cos t + b \sin t. MATH 376 used this without ever saying “vector space”. Unit 7 explains it fully.

    Used in the real world· Physics: superposition

    A guitar string’s displacement u(x,t)u(x, t) (how far the point at position xx is from rest at time tt) obeys the wave equation utt=c2uxxu_{tt} = c^2 u_{xx}. Here uttu_{tt} is the second derivative with respect to tt and uxxu_{xx} the second derivative with respect to xx. It is linear and homogeneous, so its solutions form a vector space. When you pluck a string fixed at both ends and let it go from rest, its motion is a sum of standing waves, the fundamental plus overtones: u=∑kaksin⁡(kπx/L)cos⁡(kπct/L)u = \sum_k a_k \sin(k\pi x / L)\cos(k\pi c t / L). The mix of coefficients aka_k is why a guitar and a piano playing the same note sound different.

    Noise-cancelling headphones use axiom 6. A microphone records the incoming noise n(t)n(t), and the speaker plays (−1)n(t)(-1)n(t). The two add to the zero function, which is silence.

    Used in the real world· AI: words and images as vectors

    word2vec (Google, 2013) represents each English word as a vector in R300\mathbb R^{300}, learned from billions of sentences. The famous result: the vector king−man+woman\text{king} - \text{man} + \text{woman} lands closest to queen\text{queen}. That calculation uses only the two operations of this chapter. Image models do the same with pictures: a 28 by 28 greyscale digit from the MNIST dataset is a vector in R784\mathbb R^{784}, one entry per pixel. Averaging a thousand images of the digit 3 means adding them and scaling by 1/10001/1000.

    Traps

    Watch out· Check for the zero vector first

    Every subspace contains OO. A line or plane that misses the origin is never a subspace. A set defined by a condition like "f(1)=1f(1) = 1" is never one either, because the zero function has f(1)=0f(1) = 0. This was Spagnolie’s test question in Lecture 2.

    Watch out· One example proves 'no'; only a general argument proves 'yes'

    To show closure fails, one pair of specific elements is enough. To show closure holds, you must take ARBITRARY elements (call them xx and yy, with nothing assumed beyond membership) and show their sum is in the set. Checking a few examples proves nothing.

    Watch out· There is no vector times vector

    The axioms never multiply two vectors together. “Scalar multiplication” means number times vector. Products of vectors (dot products, products of matrices or of functions) are extra structure, added later for particular spaces.

    Problems

    check

    Is {(x,y)∈R2:y=−3x}\{(x, y) \in \mathbb R^2 : y = -3x\} a subspace of R2\mathbb R^2? Is {(x,y):y=−3x+2}\{(x, y) : y = -3x + 2\}?

    Solution

    The first is: it contains (0,0)(0, 0), and sums and scalar multiples of points with y=−3xy = -3x still satisfy y=−3xy = -3x, because the condition is linear. The second is not: (0,0)(0, 0) does not satisfy 0=−3⋅0+20 = -3 \cdot 0 + 2.

    checkSpagnolie, Lecture 2

    Is the set of all real functions ff with f(1)=1f(1) = 1 a vector space under the usual operations?

    Solution

    No. If f(1)=1f(1) = 1 and g(1)=1g(1) = 1, then (f+g)(1)=2(f + g)(1) = 2, so closure under addition fails. Also the zero function is missing.

    checkApostol 1.5 #31(a)

    On R2\mathbb R^2, keep ordinary addition but define scaling by a(x1,x2)=(ax1,0)a(x_1, x_2) = (ax_1, 0). Which axiom fails?

    Solution

    Axiom 10. 1⋅(1,1)=(1,0)≠(1,1)1 \cdot (1, 1) = (1, 0) \ne (1, 1). (This was on MATH 375 HW1, and the posted answer key wrongly called it a vector space. When an operation is changed, test every axiom that uses it.)

    checkApostol 1.5 #11

    Is the set of increasing functions on R\mathbb R a vector space?

    Solution

    No. If ff is increasing and not constant, then (−1)f(-1)f is decreasing, so closure under scalar multiplication (axiom 2) fails. (If ‘increasing’ means strictly increasing, the zero function is not in the set either, so axiom 5 fails too.)

    useApostol 1.5 #4

    Show that the set of functions ff with 2f(0)=f(1)2f(0) = f(1) is a subspace of the space of all real functions.

    Solution

    The zero function satisfies 2⋅0=02 \cdot 0 = 0. If 2f(0)=f(1)2f(0) = f(1) and 2g(0)=g(1)2g(0) = g(1), then 2(f+g)(0)=2f(0)+2g(0)=f(1)+g(1)=(f+g)(1)2(f + g)(0) = 2f(0) + 2g(0) = f(1) + g(1) = (f + g)(1). For a scalar aa, 2(af)(0)=a⋅2f(0)=af(1)=(af)(1)2(af)(0) = a \cdot 2f(0) = a f(1) = (af)(1). So all three checks pass.

    use

    Which of these are subspaces of the 2 by 2 matrices R2×2\mathbb R^{2 \times 2}? (a) Matrices with trace 0 (the trace is the sum of the diagonal entries). (b) Matrices with determinant 0.

    Solution

    (a) Yes. The zero matrix has trace 0, and tr⁡(A+B)=tr⁡A+tr⁡B\operatorname{tr}(A + B) = \operatorname{tr} A + \operatorname{tr} B and tr⁡(aA)=atr⁡A\operatorname{tr}(aA) = a \operatorname{tr} A, so trace-0 matrices stay trace 0.

    (b) No. [1000]\begin{bmatrix}1&0\\0&0\end{bmatrix} and [0001]\begin{bmatrix}0&0\\0&1\end{bmatrix} both have determinant 0, but their sum is the identity, with determinant 1.

    use

    Show that the solutions of y′′−3y′+2y=0y'' - 3y' + 2y = 0 form a vector space, and check that ete^t and e2te^{2t} are in it.

    Solution

    If y1y_1 and y2y_2 are solutions, then (y1+y2)′′−3(y1+y2)′+2(y1+y2)=(y1′′−3y1′+2y1)+(y2′′−3y2′+2y2)=0+0=0(y_1 + y_2)'' - 3(y_1 + y_2)' + 2(y_1 + y_2) = (y_1'' - 3y_1' + 2y_1) + (y_2'' - 3y_2' + 2y_2) = 0 + 0 = 0. The same works for ay1ay_1. The zero function is a solution. So the solutions form a subspace of the twice-differentiable functions.

    For y=ety = e^t: y′=y′′=ety' = y'' = e^t, so y′′−3y′+2y=(1−3+2)et=0y'' - 3y' + 2y = (1 - 3 + 2)e^t = 0. For y=e2ty = e^{2t}: y′=2e2ty' = 2e^{2t} and y′′=4e2ty'' = 4e^{2t}, so the left side is (4−6+2)e2t=0(4 - 6 + 2)e^{2t} = 0.

    use

    Is the set of real sequences (a1,a2,… )(a_1, a_2, \dots) that converge to 00 a vector space? What about those that converge to 11?

    Solution

    Converging to 00: yes. The limit of a sum is the sum of the limits (0+0=00 + 0 = 0), and the limit of canc a_n is c⋅0=0c \cdot 0 = 0. The zero sequence converges to 00. (Chapter 1.2 of this book proves these limit laws.)

    Converging to 11: no. The sum of two such sequences converges to 22.

    proveApostol Thm 1.3(b)

    Prove from the axioms that aO=OaO = O for every scalar aa.

    Solution

    Let z=aOz = aO. By axiom 5, O+O=OO + O = O. So z=aO=a(O+O)=aO+aO=z+zz = aO = a(O + O) = aO + aO = z + z (axiom 8). Add −z-z to both sides. The left side becomes z+(−z)=Oz + (-z) = O (axiom 6). The right side becomes (z+z)+(−z)=z+(z+(−z))=z+O=z(z + z) + (-z) = z + (z + (-z)) = z + O = z (axioms 4, 6, 5). So O=z=aOO = z = aO.

    proveApostol Thm 1.3(c)

    Prove that (−a)x=−(ax)(-a)x = -(ax) for every scalar aa and vector xx.

    Solution

    By uniqueness of negatives, it is enough to show that (−a)x(-a)x added to axax gives OO. Now (−a)x+ax=(−a+a)x=0x=O(-a)x + ax = (-a + a)x = 0x = O, by axiom 9 and ‘Scaling by zero’. So (−a)x(-a)x is the negative of axax.

    proveApostol 1.5 #32(d), MATH 375 HW1

    Prove: if ax=Oax = O, then a=0a = 0 or x=Ox = O.

    Solution

    Suppose ax=Oax = O. If a=0a = 0, we are done. Otherwise a≠0a \ne 0, so 1/a1/a is a real number, and we can multiply both sides by it: x=1x=(1aa)x=1a(ax)=1aO=Ox = 1x = \left(\tfrac1a a\right)x = \tfrac1a(ax) = \tfrac1a O = O. The steps use axioms 10 and 7, then the hypothesis, then the problem above proving aO=OaO = O. So x=Ox = O.

    prove

    Let UU and WW be subspaces of VV. Prove that their intersection U∩WU \cap W (the vectors in both) is a subspace.

    Solution

    O∈UO \in U and O∈WO \in W, since every subspace contains OO, so O∈U∩WO \in U \cap W. If x,y∈U∩Wx, y \in U \cap W, then x+y∈Ux + y \in U because UU is closed, and x+y∈Wx + y \in W because WW is closed. So x+y∈U∩Wx + y \in U \cap W. In the same way, ax∈Uax \in U and ax∈Wax \in W. By the subspace test, U∩WU \cap W is a subspace.

    prove

    Prove the one-line subspace test: a non-empty subset SS of VV is a subspace if and only if ax+y∈Sax + y \in S for all x,y∈Sx, y \in S and every scalar aa.

    Solution

    If SS is a subspace, then ax∈Sax \in S and so ax+y∈Sax + y \in S by closure.

    Conversely, suppose the condition holds. Take a=1a = 1: then 1x+y=x+y∈S1x + y = x + y \in S (axiom 10), so SS is closed under addition. Next, pick any x∈Sx \in S (possible because SS is non-empty) and take a=−1a = -1, y=xy = x. That gives (−1)x+x=x+(−1)x=O(-1)x + x = x + (-1)x = O (axioms 3 and 6), so O∈SO \in S. Finally, with y=Oy = O, we get ax=ax+O∈Sax = ax + O \in S, so SS is closed under scaling. By the subspace test, SS is a subspace.

    stretchclassic; Axler 1C

    Let UU and WW be subspaces of VV. Prove that the union U∪WU \cup W (vectors in at least one of them) is a subspace if and only if U⊆WU \subseteq W or W⊆UW \subseteq U.

    Solution

    If U⊆WU \subseteq W, the union is WW, a subspace. The case W⊆UW \subseteq U is the same.

    For the other direction, suppose neither is inside the other. Then there is some u∈Uu \in U with u∉Wu \notin W, and some w∈Ww \in W with w∉Uw \notin U. Suppose u+w∈U∪Wu + w \in U \cup W. If u+w∈Uu + w \in U, then w=(u+w)+(−1)u∈Uw = (u + w) + (-1)u \in U, because UU is closed under scaling (by −1-1) and under addition. That contradicts the choice of ww. If u+w∈Wu + w \in W, then u=(u+w)−w∈Wu = (u + w) - w \in W, a contradiction too. So u+w∉U∪Wu + w \notin U \cup W, and the union is not closed under addition. The two axes in R2\mathbb R^2 are exactly this situation.

    stretchApostol 1.5 #29

    For the positive reals with “sum” xyxy and “scaling” xcx^c, check all ten axioms. What is the “negative” of xx? What does axiom 9 say about exponents?

    Solution

    1: xy>0xy > 0. 2: xc>0x^c > 0. 3: xy=yxxy = yx. 4: (xy)z=x(yz)(xy)z = x(yz). 5: the zero vector is 11, since x⋅1=xx \cdot 1 = x. 6: the “negative” of xx is (−1)⋅x(-1) \cdot x, which here is x−1=1/xx^{-1} = 1/x, and x⋅(1/x)=1x \cdot (1/x) = 1. 7: (xb)a=xab(x^b)^a = x^{ab}. 8: (xy)a=xaya(xy)^a = x^a y^a. 9: xa+b=xaxbx^{a + b} = x^a x^b. 10: x1=xx^1 = x.

    Axiom 9 is the exponent law xa+b=xaxbx^{a+b} = x^a x^b. The laws of exponents are the vector-space axioms for this space.

    Summary

    • A vector space is a non-empty set with an addition and a scalar multiplication obeying ten axioms. Its elements are called vectors, whatever they are: arrows, lists, matrices, polynomials, functions, solutions of equations.
    • The axioms are the familiar rules of adding and scaling arrows, written down so that proofs can cite them.
    • Facts proved from the axioms hold in every vector space. Examples: the zero vector is unique, negatives are unique, 0x=O0x = O, and aO=OaO = O.
    • A subspace is a non-empty subset that is a vector space with the same operations.
    • Subspace test: contains OO, closed under addition, closed under scaling.
    • The fast “no” is that OO is missing. Then look for two elements whose sum leaves the set, or a scaling that does.
    • Solution sets of homogeneous linear equations, whether algebraic or differential, are subspaces. That is the reason superposition works.

    Watch and read

    The same ideas explained by someone else. Use these when an explanation here does not land.

    Where this sits

    Comes from
    Nothing earlier in this volume
    Leads to
    2.2 Span, independence, basis, dimension
    2.3 Linear maps, null space, range, rank–nullity
    Same idea elsewhere
    CS 240: Sets, the symbols for 'is an element of' and 'for all', and set-builder notation come from CS 240's first chapters. This chapter uses them constantly.
    MATH 376: The solutions of a linear differential equation form a vector space. That is why 376 could write every solution as a combination of a few basic ones.
    MATH 541: A vector space is the first algebraic structure you meet. Groups, rings and fields (541) are built the same way: a set, some operations, and a list of rules.