Skip to content

Vector Spaces and Linear Maps: From the Eight Axioms to the Rank-Nullity Theorem

Prerequisite:The Grammar of Mathematics: Reading and Writing Sets and Logic

Raw
  • A vector is not “an arrow with a direction and a length”. A vector is an element of a set on which an addition and a scalar multiplication are defined and satisfy eight axioms. Thanks to this abstraction, tuples of numbers, matrices, polynomials, functions and sequences are all covered by one and the same theorem.
  • A subspace is a subset that “contains the origin and never escapes under addition and scalar multiplication”. There is no need to recheck the eight axioms: three conditions suffice.
  • A basis is a family that spans the space “with nothing missing and nothing redundant”, and choosing a basis is the same as installing coordinates. The number of vectors in a basis does not depend on which basis we choose, and that number is the dimension. The heart of this uniqueness is the exchange lemma.
  • A linear map is a map that preserves addition and scalar multiplication. Rotations, projections, dilations and differentiation are all linear maps, and a matrix is nothing but a coordinate representation of one.
  • The rank-nullity theorem dimV=dimKerf+dimImf\dim V = \dim \operatorname{Ker} f + \dim \operatorname{Im} f is a conservation law: the image thins out by exactly as much as was collapsed. The number of degrees of freedom in the solutions of a system of linear equations, and the amount of information discarded by principal component analysis, are both explained by this single identity.

1. Motivation: what comes into view once we drop the arrows

Section titled “1. Motivation: what comes into view once we drop the arrows”

Up to high school, a vector was “an arrow with a direction and a length”. That definition works perfectly well in the plane and in space, but a little further on it runs into three questions.

First, what is the nn in “nn-dimensional”? Nobody has ever seen a four-dimensional arrow. Yet we speak of four-dimensional and hundred-dimensional spaces. Unless “dimension” can be defined without reference to pictures of arrows, such talk is empty.

Second, the collection of polynomials a0+a1x+a2x2a_0 + a_1 x + a_2 x^2, or the collection of continuous functions on the interval [0,1][0,1], are plainly not arrows. Nevertheless they can be added, they can be multiplied by constants, and they obey exactly the same computational rules as vectors in the plane. Why? Is it a coincidence?

Third, the number of degrees of freedom of the solutions of a system of linear equations is often explained as “the number of unknowns minus the number of independent equations”. Where does that subtraction come from?

These questions have a common answer: what matters is not what the objects are made of, but only the structure of how they are added to one another and how they are multiplied by constants. So we forget entirely about arrows and take as our starting point “a set equipped with an addition and a scalar multiplication satisfying a few rules”. The first person to write this down clearly was Giuseppe Peano, who in his 1888 book reorganised Grassmann’s theory of extension and gave axioms almost identical to the modern ones. Peano even listed function spaces among his examples, but this formulation came into wide use only after Weyl and Banach began to employ linear spaces as a tool in the twentieth century.

The abstraction pays off in a very concrete way. Once a theorem is proved from the axioms alone, it may be used free of charge for every object satisfying those axioms. The labour of proving something in R3\mathbb{R}^3, then reproving it for polynomials, then reproving it for functions, disappears. Indeed, the rank-nullity theorem proved in this article applies verbatim to projections in the plane, to differentiation of polynomials, and to dimension reduction in machine learning.

If you are unsure about how proofs are written (contradiction, contraposition, induction) or about the handling of “for all” and “there exists”, read The grammar of mathematics: sets and logic (in particular universal and existential quantifiers(Definition 5.2)[The Grammar of Mathematics]) and Techniques of proof: induction and contradiction (in particular the principle of mathematical induction(Theorem 3.2)[Techniques of Proof]) first. This article is a consumer of those tools.

flowchart TD
A["The 8 vector space axioms"] --> B["Subspaces"]
A --> C["Linear combinations and spans"]
C --> D["Linear independence"]
C --> E["Spanning sets"]
D --> F["Bases"]
E --> F
F --> G["Exchange lemma"]
G --> H["Dimension is independent of the basis"]
A --> I["Linear maps"]
I --> J["Kernel Ker f and image Im f"]
H --> K["Rank-nullity: dim V = dim Ker f + dim Im f"]
J --> K
K --> L["Degrees of freedom of linear systems / compression rate of PCA"]
The logical flow of this article: one straight road from the axioms to the rank-nullity theorem

2. Preliminaries: the set of scalars and the language of maps

Section titled “2. Preliminaries: the set of scalars and the language of maps”

When we multiply a vector by a “constant”, where does that constant come from? It need not be a real number. With complex coefficients we get a complex vector space; with the field of just 00 and 11 we get the vector spaces of coding theory. So we fix the set of coefficients first.

A set KK equipped with an addition and a multiplication is called a field when the following hold. Addition is associative and commutative, there is a zero element 00, and every element has an additive inverse. Multiplication is associative and commutative, there is an identity 101 \ne 0, and every element a0a \ne 0 has a multiplicative inverse a1a^{-1}. Finally the distributive law a(b+c)=ab+aca(b+c) = ab+ac holds. In short, a field is a set in which the four arithmetic operations may be performed freely. The sets Q\mathbb{Q}, R\mathbb{R} and C\mathbb{C} are fields, whereas Z\mathbb{Z} is not, since it lacks the reciprocal of 22.

In this article KK may be any field; if in doubt, read K=RK = \mathbb{R}. Elements of the field are called scalars.

Let us also fix the vocabulary for maps. A map f:XYf : X \to Y is injective if f(x1)=f(x2)f(x_1) = f(x_2) implies x1=x2x_1 = x_2, and surjective if for every yYy \in Y there is an xXx \in X with f(x)=yf(x) = y. A map that is both is called bijective. Reading “injective” as “loses no information” and “surjective” as “leaves no part of the target uncovered” makes the correspondence with the later discussion clear.

Notation is as follows. Vectors are u,v,w\boldsymbol{u}, \boldsymbol{v}, \boldsymbol{w}, scalars are a,b,ca, b, c, and N={1,2,}\mathbb{N} = \{1, 2, \ldots\} does not contain 00. A sum of nn terms is written i=1naivi\sum_{i=1}^{n} a_i \boldsymbol{v}_i.

Definition 3.1Vector space

Let KK be a field. Suppose a set VV is equipped with two maps

+ ⁣:V×VV, ⁣:K×VV+ \colon V \times V \to V, \qquad \cdot \colon K \times V \to V

satisfying the following eight conditions. Then VV is called a vector space over KK (a linear space), and the elements of VV are called vectors. Below, u,v,w\boldsymbol{u}, \boldsymbol{v}, \boldsymbol{w} denote arbitrary elements of VV, a,ba, b arbitrary elements of KK, and ava \cdot \boldsymbol{v} is abbreviated to ava\boldsymbol{v}.

  • (V1) Associativity of addition: (u+v)+w=u+(v+w)(\boldsymbol{u} + \boldsymbol{v}) + \boldsymbol{w} = \boldsymbol{u} + (\boldsymbol{v} + \boldsymbol{w})
  • (V2) Commutativity of addition: u+v=v+u\boldsymbol{u} + \boldsymbol{v} = \boldsymbol{v} + \boldsymbol{u}
  • (V3) Existence of a zero vector: there is a 0V\boldsymbol{0} \in V such that v+0=v\boldsymbol{v} + \boldsymbol{0} = \boldsymbol{v} for every vV\boldsymbol{v} \in V
  • (V4) Existence of additive inverses: for each vV\boldsymbol{v} \in V there is a vV\boldsymbol{v}' \in V with v+v=0\boldsymbol{v} + \boldsymbol{v}' = \boldsymbol{0}
  • (V5) Distributivity over vector sums: a(u+v)=au+ava(\boldsymbol{u} + \boldsymbol{v}) = a\boldsymbol{u} + a\boldsymbol{v}
  • (V6) Distributivity over scalar sums: (a+b)v=av+bv(a + b)\boldsymbol{v} = a\boldsymbol{v} + b\boldsymbol{v}
  • (V7) Associativity of scalar multiplication: (ab)v=a(bv)(ab)\boldsymbol{v} = a(b\boldsymbol{v})
  • (V8) Action of the identity: 1v=v1\boldsymbol{v} = \boldsymbol{v} (here 11 is the multiplicative identity of KK)

Two points are easy to overlook.

The first is that closure is built into the definition. By writing addition as “a map from V×VV \times V to VV” we have already demanded that u+v\boldsymbol{u} + \boldsymbol{v} be an element of VV; the same goes for scalar multiplication. When checking whether a set satisfies the axioms, closure is the first thing to verify.

The second is that (V1)–(V4) merely say that VV is an abelian group under addition; what makes the subject linear algebra is the scalar multiplication in (V5)–(V8). In particular (V8) is often felt to be too obvious to be worth stating, but as we shall see it does not follow from the other seven.

The additive inverse of v\boldsymbol{v} is unique, as we verify next, so we write it v-\boldsymbol{v} and set uv:=u+(v)\boldsymbol{u} - \boldsymbol{v} := \boldsymbol{u} + (-\boldsymbol{v}).

3.2. Elementary consequences of the axioms

Section titled “3.2. Elementary consequences of the axioms”

The axioms say nothing about “obvious facts” such as 0v=00\boldsymbol{v} = \boldsymbol{0}. Since they are not stated, they must be proved. The proofs below are also good practice in tracking which axiom is used where.

Proposition 3.2Elementary properties of a vector space

Let VV be a vector space over a field KK, let vV\boldsymbol{v} \in V and aKa \in K. Then the following hold.

  1. The vector 0\boldsymbol{0} of (V3) is unique.
  2. The additive inverse of each v\boldsymbol{v} is unique.
  3. 0v=00\boldsymbol{v} = \boldsymbol{0} (the 00 on the left is the zero of KK, the right-hand side is the zero vector of VV).
  4. a0=0a\boldsymbol{0} = \boldsymbol{0}.
  5. (1)v=v(-1)\boldsymbol{v} = -\boldsymbol{v}.
  6. If av=0a\boldsymbol{v} = \boldsymbol{0} then a=0a = 0 or v=0\boldsymbol{v} = \boldsymbol{0}.
Proof(Proposition 3.2)

(1) Suppose 0\boldsymbol{0} and 0\boldsymbol{0}' both satisfy (V3). Applying the property of 0\boldsymbol{0}' to v=0\boldsymbol{v} = \boldsymbol{0} gives 0+0=0\boldsymbol{0} + \boldsymbol{0}' = \boldsymbol{0}, and applying the property of 0\boldsymbol{0} to v=0\boldsymbol{v} = \boldsymbol{0}' gives 0+0=0\boldsymbol{0}' + \boldsymbol{0} = \boldsymbol{0}'. By (V2) the two left-hand sides agree, so 0=0\boldsymbol{0} = \boldsymbol{0}'.

(2) Suppose v+v=0\boldsymbol{v} + \boldsymbol{v}' = \boldsymbol{0} and v+v=0\boldsymbol{v} + \boldsymbol{v}'' = \boldsymbol{0}. Then

v=v+0=v+(v+v)=(v+v)+v=(v+v)+v=0+v=v+0=v\boldsymbol{v}' = \boldsymbol{v}' + \boldsymbol{0} = \boldsymbol{v}' + (\boldsymbol{v} + \boldsymbol{v}'') = (\boldsymbol{v}' + \boldsymbol{v}) + \boldsymbol{v}'' = (\boldsymbol{v} + \boldsymbol{v}') + \boldsymbol{v}'' = \boldsymbol{0} + \boldsymbol{v}'' = \boldsymbol{v}'' + \boldsymbol{0} = \boldsymbol{v}''

where we used, in order, (V3), the hypothesis, (V1), (V2), the hypothesis, (V2) and (V3).

(3) Since 0+0=00 + 0 = 0 in KK, axiom (V6) gives

0v+0v=(0+0)v=0v.0\boldsymbol{v} + 0\boldsymbol{v} = (0 + 0)\boldsymbol{v} = 0\boldsymbol{v}.

Add the additive inverse of 0v0\boldsymbol{v} (which exists by (V4)) to both sides. By (V1), (V4) and (V3) the left-hand side becomes 0v+(0v+((0v)))=0v+0=0v0\boldsymbol{v} + (0\boldsymbol{v} + (-(0\boldsymbol{v}))) = 0\boldsymbol{v} + \boldsymbol{0} = 0\boldsymbol{v}, while by (V4) the right-hand side becomes 0\boldsymbol{0}. Hence 0v=00\boldsymbol{v} = \boldsymbol{0}.

(4) By (V3) we have 0+0=0\boldsymbol{0} + \boldsymbol{0} = \boldsymbol{0}, so (V5) gives a0+a0=a(0+0)=a0a\boldsymbol{0} + a\boldsymbol{0} = a(\boldsymbol{0} + \boldsymbol{0}) = a\boldsymbol{0}. Cancelling as in (3) yields a0=0a\boldsymbol{0} = \boldsymbol{0}.

(5) By (V8), (V6) and (3),

v+(1)v=1v+(1)v=(1+(1))v=0v=0.\boldsymbol{v} + (-1)\boldsymbol{v} = 1\boldsymbol{v} + (-1)\boldsymbol{v} = (1 + (-1))\boldsymbol{v} = 0\boldsymbol{v} = \boldsymbol{0}.

Hence (1)v(-1)\boldsymbol{v} is an additive inverse of v\boldsymbol{v}, and by the uniqueness in (2) we get (1)v=v(-1)\boldsymbol{v} = -\boldsymbol{v}. Note that (V8) was used here.

(6) Suppose a0a \ne 0. Since KK is a field, a1a^{-1} exists and

v=1v=(a1a)v=a1(av)=a10=0,\boldsymbol{v} = 1\boldsymbol{v} = (a^{-1}a)\boldsymbol{v} = a^{-1}(a\boldsymbol{v}) = a^{-1}\boldsymbol{0} = \boldsymbol{0},

using in order (V8), arithmetic in KK, (V7), the hypothesis and (4). So a0a \ne 0 forces v=0\boldsymbol{v} = \boldsymbol{0}, which is the assertion.

Example 3.3The coordinate space KnK^n

Equip Kn={(x1,,xn)xiK}K^n = \{(x_1, \ldots, x_n) \mid x_i \in K\} with the componentwise operations

(x1,,xn)+(y1,,yn):=(x1+y1,,xn+yn),a(x1,,xn):=(ax1,,axn).(x_1, \ldots, x_n) + (y_1, \ldots, y_n) := (x_1 + y_1, \ldots, x_n + y_n), \qquad a(x_1, \ldots, x_n) := (ax_1, \ldots, ax_n).

All eight conditions follow componentwise from the arithmetic of KK. For instance, comparing ii-th components, (V6) is exactly the distributive law (a+b)xi=axi+bxi(a+b)x_i = ax_i + bx_i in KK. The zero vector is 0=(0,,0)\boldsymbol{0} = (0, \ldots, 0) and the inverse of (x1,,xn)(x_1,\ldots,x_n) is (x1,,xn)(-x_1, \ldots, -x_n).

The cases n=2,3n = 2, 3 with K=RK = \mathbb{R} correspond to the arrows of high school. The “sum” of arrows was the diagonal of a parallelogram, and written in components this agrees with the definition above.

Example 3.4Function spaces and their special cases

Let XX be a non-empty set and let KXK^X be the set of all maps from XX to KK. For f,gKXf, g \in K^X and aKa \in K set

(f+g)(x):=f(x)+g(x),(af)(x):=af(x)(xX).(f + g)(x) := f(x) + g(x), \qquad (af)(x) := a \cdot f(x) \quad (x \in X).

The zero vector is the function identically equal to 00, and the inverse of ff is xf(x)x \mapsto -f(x). All eight conditions reduce, at each point xx, to the arithmetic laws of KK. For example (V1) holds because ((f+g)+h)(x)=(f(x)+g(x))+h(x)=f(x)+(g(x)+h(x))=(f+(g+h))(x)((f+g)+h)(x) = (f(x)+g(x))+h(x) = f(x)+(g(x)+h(x)) = (f+(g+h))(x) for every xx, so the two maps agree at every point and hence are equal.

This single example contains many spaces at once.

Choice of XXResulting space
X={1,2,,n}X = \{1, 2, \ldots, n\}the coordinate space KnK^n (read ff as (f(1),,f(n))(f(1), \ldots, f(n)))
X=NX = \mathbb{N}the space KNK^{\mathbb{N}} of all sequences
X={1,,m}×{1,,n}X = \{1,\ldots,m\} \times \{1,\ldots,n\}the space Mm,n(K)M_{m,n}(K) of all m×nm \times n matrices
X=[0,1]X = [0,1], K=RK = \mathbb{R}all real-valued functions on the interval

The reason matrix addition and scalar multiplication are componentwise is that a matrix is a function of a pair of indices.

Example 3.5Two ways the axioms can fail

(a) The first quadrant is not a space. The set W={(x,y)R2x0, y0}W = \{(x,y) \in \mathbb{R}^2 \mid x \ge 0,\ y \ge 0\} is closed under addition. However, (1,1)W(1,1) \in W while (1)(1,1)=(1,1)W(-1)(1,1) = (-1,-1) \notin W, so scalar multiplication is not a map into WW. Additive inverses are missing as well, so (V4) fails too. “Directions can be freely reversed” is a demand of the axioms.

(b) (V8) does not follow from the other seven. On V=R2V = \mathbb{R}^2 keep the usual addition but redefine scalar multiplication by

a(x,y):=(ax,0).a \odot (x, y) := (ax, 0).

Since the addition is the ordinary one, (V1)–(V4) hold. Let us check the rest.

a((x1,y1)+(x2,y2))=(a(x1+x2),0)=(ax1,0)+(ax2,0)=a(x1,y1)+a(x2,y2),(a+b)(x,y)=((a+b)x,0)=(ax,0)+(bx,0)=a(x,y)+b(x,y),(ab)(x,y)=(abx,0),a(b(x,y))=a(bx,0)=(abx,0).\begin{aligned} a \odot ((x_1,y_1) + (x_2,y_2)) &= (a(x_1+x_2),\, 0) = (ax_1, 0) + (ax_2, 0) = a \odot (x_1,y_1) + a \odot (x_2,y_2), \\ (a+b) \odot (x,y) &= ((a+b)x,\, 0) = (ax, 0) + (bx, 0) = a \odot (x,y) + b \odot (x,y), \\ (ab) \odot (x,y) &= (abx,\, 0), \qquad a \odot (b \odot (x,y)) = a \odot (bx, 0) = (abx, 0). \end{aligned}

So (V5), (V6) and (V7) hold. But 1(0,1)=(0,0)(0,1)1 \odot (0,1) = (0,0) \ne (0,1), so (V8) alone fails. In this VV, part (5) of Proposition 3.2 fails as well: indeed (1)(0,1)=(0,0)(-1) \odot (0,1) = (0,0), whereas the additive inverse of (0,1)(0,1) is (0,1)(0,-1). Dropping (V8) destroys the compatibility between scalar multiplication and additive inverses.

Verifying all eight conditions every time we build a new space would be tedious. Fortunately, when we investigate the inside of a space already known to be a vector space, far less needs to be checked.

Definition 4.1Subspace

Let VV be a vector space over KK. A subset WVW \subseteq V is called a subspace of VV if it becomes a vector space over KK under the addition and scalar multiplication of VV restricted to WW.

Proposition 4.2Criterion for a subspace

Let VV be a vector space over KK and let WVW \subseteq V. Then WW is a subspace of VV if and only if all three of the following hold.

  1. 0W\boldsymbol{0} \in W (in particular WW \ne \emptyset).
  2. u+vW\boldsymbol{u} + \boldsymbol{v} \in W for all u,vW\boldsymbol{u}, \boldsymbol{v} \in W.
  3. avWa\boldsymbol{v} \in W for all aKa \in K and vW\boldsymbol{v} \in W.
Proof(Proposition 4.2)

Necessity. If WW is a subspace, then addition and scalar multiplication are defined inside WW, so conditions 2 and 3 hold. Also WW is non-empty (it has a zero vector), and picking any vW\boldsymbol{v} \in W, condition 3 gives 0vW0\boldsymbol{v} \in W, which by part (3) of Proposition 3.2 equals the zero vector 0\boldsymbol{0} of VV; hence condition 1 holds. Along the way we have also seen that the zero vector of WW itself coincides with the zero vector of VV.

Sufficiency. Conditions 2 and 3 say precisely that addition and scalar multiplication define maps W×WWW \times W \to W and K×WWK \times W \to W. Axioms (V1), (V2), (V5), (V6), (V7) and (V8) are identities valid for all elements of VV, hence in particular for elements of WW. Axiom (V3) follows from condition 1. As for (V4), given vW\boldsymbol{v} \in W, condition 3 with a=1a = -1 gives (1)vW(-1)\boldsymbol{v} \in W, and by part (5) of Proposition 3.2 this is v-\boldsymbol{v}. So inverses lie in WW as well, and WW satisfies all eight conditions.

For instance, inside R3\mathbb{R}^3 both the line {t(1,2,3)tR}\{t(1,2,3) \mid t \in \mathbb{R}\} through the origin and the plane {(x,y,z)x+y+z=0}\{(x,y,z) \mid x + y + z = 0\} through the origin are subspaces. Checking the latter: (0,0,0)(0,0,0) satisfies 0+0+0=00+0+0=0; if x1+y1+z1=0x_1+y_1+z_1 = 0 and x2+y2+z2=0x_2+y_2+z_2=0 then the components of the sum satisfy (x1+x2)+(y1+y2)+(z1+z2)=0(x_1+x_2)+(y_1+y_2)+(z_1+z_2) = 0; and multiplying by aa gives ax+ay+az=a0=0ax+ay+az = a\cdot 0 = 0. Likewise the polynomial space PnP_n is a subspace of a function space, and the set of all continuous functions is a subspace of R[0,1]\mathbb{R}^{[0,1]} (because continuity is preserved by sums and constant multiples).

Next we define the operation that builds a space out of a few vectors.

Definition 4.3Linear combinations and the span

Let VV be a vector space over KK, let v1,,vmV\boldsymbol{v}_1, \ldots, \boldsymbol{v}_m \in V and a1,,amKa_1, \ldots, a_m \in K. An element of the form

a1v1+a2v2++amvma_1 \boldsymbol{v}_1 + a_2 \boldsymbol{v}_2 + \cdots + a_m \boldsymbol{v}_m

is called a linear combination of v1,,vm\boldsymbol{v}_1, \ldots, \boldsymbol{v}_m. For a subset SVS \subseteq V, the set of all linear combinations of finitely many elements of SS is written span(S)\operatorname{span}(S) and called the span of SS. For S=S = \emptyset we agree that span():={0}\operatorname{span}(\emptyset) := \{\boldsymbol{0}\}.

Remark 4.4

The span span(S)\operatorname{span}(S) is the smallest subspace containing SS. Indeed, that span(S)\operatorname{span}(S) is a subspace follows from Proposition 4.2: the vector 0\boldsymbol{0} is included as the empty sum (or as the linear combination with all coefficients 00), a sum of linear combinations is again a linear combination, and aa times a linear combination is the linear combination with all coefficients multiplied by aa. Moreover, if WW is a subspace containing SS, then WW is closed under addition and scalar multiplication and therefore contains every linear combination of elements of SS, so span(S)W\operatorname{span}(S) \subseteq W. It matters that we allow only finitely many terms, even when SS is infinite: infinite sums require a notion of limit, which algebra alone cannot supply.

5. Linear independence, bases and dimension

Section titled “5. Linear independence, bases and dimension”

With span\operatorname{span} we can build as many spaces as we like, but redundancy creeps in. The plane R2\mathbb{R}^2 is spanned by the three vectors (1,0),(0,1),(1,1)(1,0), (0,1), (1,1), yet the third is superfluous because it is built from the first two. Linear independence is the notion that measures this redundancy.

Definition 5.1Linear independence, spanning sets and bases

Let VV be a vector space over KK.

  1. A tuple (v1,,vm)(\boldsymbol{v}_1, \ldots, \boldsymbol{v}_m) is linearly independent if, for a1,,amKa_1, \ldots, a_m \in K,
a1v1++amvm=0    a1=a2==am=0.a_1\boldsymbol{v}_1 + \cdots + a_m\boldsymbol{v}_m = \boldsymbol{0} \implies a_1 = a_2 = \cdots = a_m = 0.

Otherwise it is linearly dependent; that is, there exist coefficients a1,,ama_1,\ldots,a_m, not all 00, with iaivi=0\sum_i a_i \boldsymbol{v}_i = \boldsymbol{0}. An infinite subset SVS \subseteq V is called linearly independent when every tuple of finitely many distinct elements of SS is linearly independent.

  1. If span(S)=V\operatorname{span}(S) = V, we say SS generates VV and call SS a spanning set of VV.

  2. A linearly independent spanning set is called a basis of VV. In the finite case we write it as an ordered tuple (v1,,vn)(\boldsymbol{v}_1, \ldots, \boldsymbol{v}_n).

A word on how to read the definition. The relation iaivi=0\sum_i a_i \boldsymbol{v}_i = \boldsymbol{0} always holds when all coefficients are 00 (by part (3) of Proposition 3.2). This is called the trivial relation. Linear independence says that there is no relation other than the trivial one.

Geometrically, linear dependence is the same as “one of the vectors lies in the span of the others”. Indeed, if iaivi=0\sum_i a_i \boldsymbol{v}_i = \boldsymbol{0} with ak0a_k \ne 0, multiplying by ak1a_k^{-1} and rearranging gives

vk=ak1ikaivi,\boldsymbol{v}_k = -a_k^{-1} \sum_{i \ne k} a_i \boldsymbol{v}_i,

so vk\boldsymbol{v}_k is a linear combination of the others; the converse is checked in the same way. The vectors (1,0),(0,1),(1,1)(1,0), (0,1), (1,1) in R2\mathbb{R}^2 satisfy the non-trivial relation 1(1,0)+1(0,1)+(1)(1,1)=(0,0)1\cdot(1,0) + 1\cdot(0,1) + (-1)\cdot(1,1) = (0,0) and are therefore linearly dependent.

Proposition 5.2Uniqueness of the expansion in a basis

Let VV be a vector space over KK and v1,,vnV\boldsymbol{v}_1, \ldots, \boldsymbol{v}_n \in V. Then (v1,,vn)(\boldsymbol{v}_1, \ldots, \boldsymbol{v}_n) is a basis of VV if and only if for every xV\boldsymbol{x} \in V there is exactly one tuple of scalars (x1,,xn)Kn(x_1, \ldots, x_n) \in K^n with

x=x1v1++xnvn.\boldsymbol{x} = x_1\boldsymbol{v}_1 + \cdots + x_n\boldsymbol{v}_n.
Proof(Proposition 5.2)

Necessity. Let (v1,,vn)(\boldsymbol{v}_1,\ldots,\boldsymbol{v}_n) be a basis. Since it spans, every x\boldsymbol{x} has at least one expansion x=ixivi\boldsymbol{x} = \sum_i x_i \boldsymbol{v}_i. If there were another expansion x=ixivi\boldsymbol{x} = \sum_i x_i' \boldsymbol{v}_i, subtracting term by term gives

0=i=1n(xixi)vi.\boldsymbol{0} = \sum_{i=1}^{n} (x_i - x_i')\boldsymbol{v}_i.

By linear independence, xixi=0x_i - x_i' = 0 for every ii, that is xi=xix_i = x_i'. So the expansion is unique.

Sufficiency. Every x\boldsymbol{x} has an expansion, so the tuple spans. For linear independence, suppose iaivi=0\sum_i a_i \boldsymbol{v}_i = \boldsymbol{0}. One expansion of x=0\boldsymbol{x} = \boldsymbol{0} is the one with all coefficients 00, and by hypothesis it is the only one. Hence ai=0a_i = 0 for every ii.

This unique tuple (x1,,xn)(x_1, \ldots, x_n) is called the coordinate vector of x\boldsymbol{x} with respect to the basis B=(v1,,vn)B = (\boldsymbol{v}_1,\ldots,\boldsymbol{v}_n), written [x]B[\boldsymbol{x}]_B. Choosing a basis is the same as installing a coordinate system, and it is what makes an abstract vector computable as a tuple of numbers in KnK^n. As we shall see, a matrix is simply a linear map written out in such coordinates.

Example 5.3The polynomial space PnP_n and its standard basis

Let Pn:={a0+a1x++anxnaiR}P_n := \{a_0 + a_1x + \cdots + a_nx^n \mid a_i \in \mathbb{R}\} be the set of functions defined by real polynomials of degree at most nn (the zero polynomial included).

First, it is a subspace. PnP_n is a subset of the function space RR\mathbb{R}^{\mathbb{R}} (Example 3.4). The zero function belongs to PnP_n, being the polynomial with all ai=0a_i = 0; the sum of two polynomials of degree at most nn is computed coefficientwise and so again has degree at most nn; and the same holds for constant multiples. Hence PnP_n is a vector space by Proposition 4.2.

Next, (1,x,x2,,xn)(1, x, x^2, \ldots, x^n) is a basis. That it spans is the definition of PnP_n. For linear independence, suppose a0+a1x++anxn=0a_0 + a_1x + \cdots + a_nx^n = 0 for every real xx. Substituting x=0x = 0 gives a0=0a_0 = 0. Differentiating the remaining identity a1x++anxn=0a_1x + \cdots + a_nx^n = 0 gives a1+2a2x++nanxn1=0a_1 + 2a_2x + \cdots + na_nx^{n-1} = 0 for every xx, and substituting x=0x = 0 gives a1=0a_1 = 0. Repeating the procedure, each time we differentiate kk times and substitute x=0x = 0 we obtain k!ak=0k!\,a_k = 0, that is ak=0a_k = 0, one after another. So all coefficients vanish and the family is linearly independent.

Therefore a basis of PnP_n has n+1n+1 elements. The coordinate vector of the polynomial 32x+x33 - 2x + x^3 with respect to the basis (1,x,x2,x3)(1,x,x^2,x^3) is (3,2,0,1)(3, -2, 0, 1).

5.3. The exchange lemma and the invariance of dimension

Section titled “5.3. The exchange lemma and the invariance of dimension”

Besides ((1,0),(0,1))((1,0),(0,1)), the plane R2\mathbb{R}^2 has the basis ((1,1),(1,1))((1,1),(1,-1)), and infinitely many others. Yet every basis has two elements. This is no accident; it follows from the next lemma, the single most important lemma at this stage of linear algebra.

Lemma 5.4Exchange lemma

Let VV be a vector space over KK. If u1,,umV\boldsymbol{u}_1, \ldots, \boldsymbol{u}_m \in V are linearly independent and

u1,,umspan(w1,,wn),\boldsymbol{u}_1, \ldots, \boldsymbol{u}_m \in \operatorname{span}(\boldsymbol{w}_1, \ldots, \boldsymbol{w}_n),

then mnm \le n. That is, the size of a linearly independent family never exceeds the size of a spanning family.

Proof(Lemma 5.4)

Put W:=span(w1,,wn)W := \operatorname{span}(\boldsymbol{w}_1, \ldots, \boldsymbol{w}_n). We prove the following claim by induction on rr.

Claim. For each rr with 0rm0 \le r \le m, after renumbering w1,,wn\boldsymbol{w}_1, \ldots, \boldsymbol{w}_n we have rnr \le n and

Wspan(u1,,ur,wr+1,,wn).W \subseteq \operatorname{span}(\boldsymbol{u}_1, \ldots, \boldsymbol{u}_r, \boldsymbol{w}_{r+1}, \ldots, \boldsymbol{w}_n).

For r=0r = 0 the right-hand side is WW itself, so the claim clearly holds.

Assume the claim for some r<mr < m and prove it for r+1r+1. By hypothesis ur+1Wspan(u1,,ur,wr+1,,wn)\boldsymbol{u}_{r+1} \in W \subseteq \operatorname{span}(\boldsymbol{u}_1, \ldots, \boldsymbol{u}_r, \boldsymbol{w}_{r+1}, \ldots, \boldsymbol{w}_n), so there are scalars a1,,ar,br+1,,bna_1,\ldots,a_r, b_{r+1},\ldots,b_n with

ur+1=i=1raiui+j=r+1nbjwj.\boldsymbol{u}_{r+1} = \sum_{i=1}^{r} a_i \boldsymbol{u}_i + \sum_{j=r+1}^{n} b_j \boldsymbol{w}_j.

Suppose all the bjb_j were 00 (this includes the case r=nr = n, where no w\boldsymbol{w} is left). Then

1ur+1i=1raiui=0,1 \cdot \boldsymbol{u}_{r+1} - \sum_{i=1}^{r} a_i \boldsymbol{u}_i = \boldsymbol{0},

and since the coefficient of ur+1\boldsymbol{u}_{r+1} is 101 \ne 0 this is a non-trivial relation. As r+1mr + 1 \le m, it contradicts the linear independence of u1,,um\boldsymbol{u}_1, \ldots, \boldsymbol{u}_m. Hence bj0b_j \ne 0 for some jj; in particular at least one w\boldsymbol{w} remains, that is r+1nr + 1 \le n. Renumbering, we may assume br+10b_{r+1} \ne 0, and solving the displayed equation for wr+1\boldsymbol{w}_{r+1} gives

wr+1=br+11(ur+1i=1raiuij=r+2nbjwj).\boldsymbol{w}_{r+1} = b_{r+1}^{-1}\left( \boldsymbol{u}_{r+1} - \sum_{i=1}^{r} a_i \boldsymbol{u}_i - \sum_{j=r+2}^{n} b_j \boldsymbol{w}_j \right).

The right-hand side is a linear combination of u1,,ur+1,wr+2,,wn\boldsymbol{u}_1, \ldots, \boldsymbol{u}_{r+1}, \boldsymbol{w}_{r+2}, \ldots, \boldsymbol{w}_n, so wr+1span(u1,,ur+1,wr+2,,wn)\boldsymbol{w}_{r+1} \in \operatorname{span}(\boldsymbol{u}_1, \ldots, \boldsymbol{u}_{r+1}, \boldsymbol{w}_{r+2}, \ldots, \boldsymbol{w}_n). Consequently

span(u1,,ur,wr+1,,wn)span(u1,,ur+1,wr+2,,wn)\operatorname{span}(\boldsymbol{u}_1, \ldots, \boldsymbol{u}_r, \boldsymbol{w}_{r+1}, \ldots, \boldsymbol{w}_n) \subseteq \operatorname{span}(\boldsymbol{u}_1, \ldots, \boldsymbol{u}_{r+1}, \boldsymbol{w}_{r+2}, \ldots, \boldsymbol{w}_n)

(because every generator on the left lies in the right-hand side, which is a subspace; we used Remark 4.4), and together with the induction hypothesis the claim holds for r+1r+1.

Carrying the induction through to r=mr = m produces, along the way, the inequality mnm \le n.

The name “exchange” comes from the procedure in the proof: we discard wr+1\boldsymbol{w}_{r+1} and insert ur+1\boldsymbol{u}_{r+1}, one vector at a time. Since the spanning side has only nn vectors, the exchanges run out after nn steps.

Theorem 5.5Invariance of dimension

Let VV be a vector space over KK and suppose VV has both a basis with mm elements and a basis with nn elements (m,nm, n finite). Then m=nm = n.

Proof(Theorem 5.5)

Call the two bases (u1,,um)(\boldsymbol{u}_1, \ldots, \boldsymbol{u}_m) and (w1,,wn)(\boldsymbol{w}_1, \ldots, \boldsymbol{w}_n).

The first is linearly independent and the second spans, so uiV=span(w1,,wn)\boldsymbol{u}_i \in V = \operatorname{span}(\boldsymbol{w}_1,\ldots,\boldsymbol{w}_n). By Lemma 5.4 we get mnm \le n.

Now swap the roles. The second is linearly independent and the first spans, so wjV=span(u1,,um)\boldsymbol{w}_j \in V = \operatorname{span}(\boldsymbol{u}_1,\ldots,\boldsymbol{u}_m). Again Lemma 5.4 gives nmn \le m.

Hence m=nm = n.

Definition 5.6Dimension

If a vector space VV has a basis with finitely many elements, VV is called finite-dimensional, and the number of elements of such a basis is the dimension of VV, written dimV\dim V (or dimKV\dim_K V when the field must be made explicit). By Theorem 5.5, this value does not depend on the choice of basis. If VV has no finite basis, it is called infinite-dimensional. For V={0}V = \{\boldsymbol{0}\} we regard the empty set as a basis and set dim{0}=0\dim \{\boldsymbol{0}\} = 0.

Let us compute a few values.

We have dimKn=n\dim K^n = n. Indeed, let ei\boldsymbol{e}_i be the vector whose ii-th component is 11 and whose other components are 00. Every x=(x1,,xn)\boldsymbol{x} = (x_1,\ldots,x_n) can be written x=ixiei\boldsymbol{x} = \sum_i x_i \boldsymbol{e}_i, so these vectors span; and iaiei=(a1,,an)=0\sum_i a_i\boldsymbol{e}_i = (a_1, \ldots, a_n) = \boldsymbol{0} immediately forces ai=0a_i = 0 for every ii, so they are linearly independent. The family (e1,,en)(\boldsymbol{e}_1,\ldots,\boldsymbol{e}_n) is called the standard basis.

By Example 5.3 we have dimPn=n+1\dim P_n = n + 1. Also Mm,n(K)M_{m,n}(K) has as a basis the matrices EijE_{ij} whose only non-zero entry is a 11 in position (i,j)(i,j), so dimMm,n(K)=mn\dim M_{m,n}(K) = mn.

By contrast, the space K[x]K[x] of all polynomials is infinite-dimensional. If it were generated by NN polynomials, then the N+1N+1 linearly independent elements 1,x,,xN1, x, \ldots, x^{N} would lie in the span of those NN polynomials, and Lemma 5.4 would give N+1NN + 1 \le N, a contradiction. More directly, for every nn there are n+1n+1 linearly independent elements 1,x,,xn1, x, \ldots, x^n, so no finite basis can exist.

5.4. Basic properties of finite-dimensional spaces

Section titled “5.4. Basic properties of finite-dimensional spaces”

Here we assemble the tools needed for the proof of the rank-nullity theorem. Each is a corollary of the exchange lemma.

Proposition 5.7Basic properties of finite-dimensional spaces

Let VV be a finite-dimensional vector space with dimV=n\dim V = n.

  1. Any family of n+1n+1 or more vectors of VV is linearly dependent.
  2. Any linearly independent family (u1,,uk)(\boldsymbol{u}_1, \ldots, \boldsymbol{u}_k) in VV can be extended to a basis of VV by adjoining suitable vectors.
  3. Every subspace UU of VV is finite-dimensional with dimUn\dim U \le n, and dimU=n\dim U = n holds only when U=VU = V.
Proof(Proposition 5.7)

Fix a basis (w1,,wn)(\boldsymbol{w}_1, \ldots, \boldsymbol{w}_n) of VV.

(1) If (u1,,um)(\boldsymbol{u}_1,\ldots,\boldsymbol{u}_m) is linearly independent, then, since the basis spans, each ui\boldsymbol{u}_i is a linear combination of w1,,wn\boldsymbol{w}_1,\ldots,\boldsymbol{w}_n, and Lemma 5.4 gives mnm \le n. Taking the contrapositive, any family with mn+1m \ge n+1 is linearly dependent.

(2) First an auxiliary fact: if (u1,,uk)(\boldsymbol{u}_1,\ldots,\boldsymbol{u}_k) is linearly independent and vspan(u1,,uk)\boldsymbol{v} \notin \operatorname{span}(\boldsymbol{u}_1,\ldots,\boldsymbol{u}_k), then (u1,,uk,v)(\boldsymbol{u}_1,\ldots,\boldsymbol{u}_k,\boldsymbol{v}) is linearly independent as well. Indeed, suppose iaiui+bv=0\sum_i a_i\boldsymbol{u}_i + b\boldsymbol{v} = \boldsymbol{0}. If b0b \ne 0 then v=b1iaiuispan(u1,,uk)\boldsymbol{v} = -b^{-1}\sum_i a_i \boldsymbol{u}_i \in \operatorname{span}(\boldsymbol{u}_1,\ldots,\boldsymbol{u}_k), contrary to hypothesis; hence b=0b = 0, and the remaining relation iaiui=0\sum_i a_i \boldsymbol{u}_i = \boldsymbol{0} forces all ai=0a_i = 0 by the independence of the ui\boldsymbol{u}_i.

Now take a linearly independent family containing (u1,,uk)(\boldsymbol{u}_1,\ldots,\boldsymbol{u}_k) with as many elements as possible. By (1) the number of elements is bounded by nn, so a maximal one exists. Write it as (u1,,uk,z1,,zs)(\boldsymbol{u}_1,\ldots,\boldsymbol{u}_k,\boldsymbol{z}_1,\ldots,\boldsymbol{z}_s). If this family did not span VV, we could pick vV\boldsymbol{v} \in V outside its span, and the auxiliary fact would produce a longer linearly independent family, contradicting maximality. So the family spans and is linearly independent, hence is a basis.

(3) A linearly independent family inside UU is also linearly independent inside VV, so by (1) it has at most nn elements. Take a linearly independent family in UU with the largest possible number of elements, say (u1,,uk)(\boldsymbol{u}_1,\ldots,\boldsymbol{u}_k) with knk \le n. For any uU\boldsymbol{u} \in U, the family (u1,,uk,u)(\boldsymbol{u}_1,\ldots,\boldsymbol{u}_k,\boldsymbol{u}) is linearly dependent by maximality, so the contrapositive of the auxiliary fact in (2) gives uspan(u1,,uk)\boldsymbol{u} \in \operatorname{span}(\boldsymbol{u}_1,\ldots,\boldsymbol{u}_k). Hence this family is a basis of UU and dimU=kn\dim U = k \le n.

Now suppose dimU=n\dim U = n. A basis of UU is a linearly independent family of nn vectors in VV, so by (2) it extends to a basis of VV. By Theorem 5.5 the extended family must have nn elements, so in fact nothing was adjoined. That is, a basis of UU is already a basis of VV, and U=span(that basis)=VU = \operatorname{span}(\text{that basis}) = V. Conversely, if U=VU = V then dimU=n\dim U = n trivially.

Having defined the spaces themselves, we turn to the maps between them. Since the structure of a vector space consists of addition and scalar multiplication only, the notion of a “structure-preserving map” is determined automatically.

Definition 6.1Linear map

Let V,WV, W be vector spaces over the same field KK. A map f:VWf : V \to W is called a linear map if it satisfies the following two conditions.

  • Additivity: f(u+v)=f(u)+f(v)f(\boldsymbol{u} + \boldsymbol{v}) = f(\boldsymbol{u}) + f(\boldsymbol{v}) for all u,vV\boldsymbol{u}, \boldsymbol{v} \in V
  • Homogeneity: f(av)=af(v)f(a\boldsymbol{v}) = a f(\boldsymbol{v}) for all aKa \in K and vV\boldsymbol{v} \in V

When V=WV = W we call ff a linear transformation of VV.

The two conditions can be combined into one: for all a,bKa, b \in K and u,vV\boldsymbol{u}, \boldsymbol{v} \in V,

f(au+bv)=af(u)+bf(v).f(a\boldsymbol{u} + b\boldsymbol{v}) = a f(\boldsymbol{u}) + b f(\boldsymbol{v}).

That this follows from additivity and homogeneity is the computation f(au+bv)=f(au)+f(bv)=af(u)+bf(v)f(a\boldsymbol{u}+b\boldsymbol{v}) = f(a\boldsymbol{u}) + f(b\boldsymbol{v}) = af(\boldsymbol{u}) + bf(\boldsymbol{v}). Conversely, putting a=b=1a = b = 1 in the combined identity gives additivity, and putting b=0b = 0 gives f(au)=af(u)+0f(v)=af(u)f(a\boldsymbol{u}) = af(\boldsymbol{u}) + 0\cdot f(\boldsymbol{v}) = af(\boldsymbol{u}), which is homogeneity (we used part (3) of Proposition 3.2). By induction, f(iaivi)=iaif(vi)f(\sum_i a_i \boldsymbol{v}_i) = \sum_i a_i f(\boldsymbol{v}_i) holds for any finite linear combination.

Every linear map satisfies f(0)=0f(\boldsymbol{0}) = \boldsymbol{0}: simply compute f(0)=f(00)=0f(0)=0f(\boldsymbol{0}) = f(0 \cdot \boldsymbol{0}) = 0 \cdot f(\boldsymbol{0}) = \boldsymbol{0}, again using part (3) of Proposition 3.2. This one remark is immediately useful for recognising counterexamples.

Example 6.2Linear transformations of the plane, and maps that are not linear

Let us examine several maps on R2\mathbb{R}^2.

(a) Rotation about the origin Rθ(x,y)=(xcosθysinθ, xsinθ+ycosθ)R_\theta(x, y) = (x\cos\theta - y\sin\theta,\ x\sin\theta + y\cos\theta). We check linearity:

Rθ(a(x1,y1)+b(x2,y2))=Rθ(ax1+bx2, ay1+by2)=((ax1+bx2)cosθ(ay1+by2)sinθ, (ax1+bx2)sinθ+(ay1+by2)cosθ)=a(x1cosθy1sinθ, x1sinθ+y1cosθ)+b(x2cosθy2sinθ, x2sinθ+y2cosθ)=aRθ(x1,y1)+bRθ(x2,y2).\begin{aligned} R_\theta\bigl(a(x_1,y_1) + b(x_2,y_2)\bigr) &= R_\theta(ax_1 + bx_2,\ ay_1 + by_2) \\ &= \bigl((ax_1+bx_2)\cos\theta - (ay_1+by_2)\sin\theta,\ (ax_1+bx_2)\sin\theta + (ay_1+by_2)\cos\theta\bigr) \\ &= a\bigl(x_1\cos\theta - y_1\sin\theta,\ x_1\sin\theta + y_1\cos\theta\bigr) + b\bigl(x_2\cos\theta - y_2\sin\theta,\ x_2\sin\theta + y_2\cos\theta\bigr) \\ &= a R_\theta(x_1,y_1) + b R_\theta(x_2,y_2). \end{aligned}

The only thing that matters is that each component is homogeneous of degree one in xx and yy.

(b) Projection onto the xx-axis P(x,y)=(x,0)P(x,y) = (x, 0). Since P(a(x1,y1)+b(x2,y2))=(ax1+bx2,0)=a(x1,0)+b(x2,0)P(a(x_1,y_1)+b(x_2,y_2)) = (ax_1+bx_2, 0) = a(x_1,0) + b(x_2,0), this map is linear. It throws away the information in the yy direction.

(c) Axis-aligned scaling S(x,y)=(c1x,c2y)S(x,y) = (c_1 x, c_2 y) and (d) shear T(x,y)=(x+ky,y)T(x,y) = (x + ky, y). In both cases the components are homogeneous of degree one, so the same computation as in (a) proves linearity.

Here are their matrix representations with respect to the standard basis. The matrix AA is the one for which f(x,y)f(x,y), viewed as a column vector, equals A(xy)A\begin{pmatrix} x \\ y\end{pmatrix}.

TransformationFormulaMatrixKernelImage
rotation(xcosθysinθ, xsinθ+ycosθ)(x\cos\theta - y\sin\theta,\ x\sin\theta+y\cos\theta)(cosθsinθsinθcosθ)\begin{pmatrix}\cos\theta & -\sin\theta \\ \sin\theta & \cos\theta\end{pmatrix}{0}\{\boldsymbol{0}\}R2\mathbb{R}^2
projection onto the xx-axis(x,0)(x, 0)(1000)\begin{pmatrix}1 & 0 \\ 0 & 0\end{pmatrix}the yy-axisthe xx-axis
scaling(c1x,c2y)(c_1x, c_2y)(c100c2)\begin{pmatrix}c_1 & 0 \\ 0 & c_2\end{pmatrix}{0}\{\boldsymbol{0}\} if c1c20c_1c_2 \ne 0R2\mathbb{R}^2 if c1c20c_1c_2 \ne 0
shear(x+ky, y)(x + ky,\ y)(1k01)\begin{pmatrix}1 & k \\ 0 & 1\end{pmatrix}{0}\{\boldsymbol{0}\}R2\mathbb{R}^2

Maps that are not linear. The translation Tb(x,y)=(x+1,y)T_{\boldsymbol{b}}(x,y) = (x+1, y) is not linear because Tb(0)=(1,0)0T_{\boldsymbol{b}}(\boldsymbol{0}) = (1,0) \ne \boldsymbol{0}. A linear map plus a constant vector is called an affine map, and is to be distinguished from a linear map. Likewise g(x,y)=(x2,y)g(x,y) = (x^2, y) is not linear: g(2,0)=(4,0)g(2,0) = (4,0) while 2g(1,0)=(2,0)2g(1,0) = (2,0), so homogeneity fails.

6.2. A linear map is determined by the images of a basis

Section titled “6.2. A linear map is determined by the images of a basis”

Remark 6.3

Let (v1,,vn)(\boldsymbol{v}_1, \ldots, \boldsymbol{v}_n) be a basis of VV. Then a linear map f:VWf : V \to W is completely determined by f(v1),,f(vn)f(\boldsymbol{v}_1), \ldots, f(\boldsymbol{v}_n). Indeed, every xV\boldsymbol{x} \in V can be written uniquely as x=ixivi\boldsymbol{x} = \sum_i x_i \boldsymbol{v}_i by Proposition 5.2, so linearity forces f(x)=ixif(vi)f(\boldsymbol{x}) = \sum_i x_i f(\boldsymbol{v}_i).

Conversely, choose w1,,wnW\boldsymbol{w}_1, \ldots, \boldsymbol{w}_n \in W arbitrarily and define f(x):=ixiwif(\boldsymbol{x}) := \sum_i x_i \boldsymbol{w}_i, where (xi)(x_i) is the coordinate vector of x\boldsymbol{x}. Then ff is a linear map with f(vi)=wif(\boldsymbol{v}_i) = \boldsymbol{w}_i. The definition is unambiguous because coordinates are unique, and linearity follows because the coordinates of x+y\boldsymbol{x} + \boldsymbol{y} and axa\boldsymbol{x} are the componentwise sum and the componentwise multiple. This fact, restated as the isomorphism given by the coordinate map, is the coordinate isomorphism and the determination of a linear map by a basis(Proposition 2.1)[Matrices and Linear Systems].

In other words, constructing a linear map is the same as prescribing nn destinations for the basis vectors. Choosing a basis of WW as well, expressing each f(vj)f(\boldsymbol{v}_j) in coordinates and arranging these as columns gives a matrix. A matrix is not the linear map itself but its representation once bases are fixed; change the bases and the same map acquires a different matrix. This correspondence and the associated computations are treated in Matrices and systems of linear equations, in the correspondence between linear maps and matrices(Theorem 3.2)[Matrices and Linear Systems], while the problem of choosing bases so as to make the matrix as simple as possible is treated in Eigenvalues and eigenvectors and Diagonalisation and the Jordan normal form.

7. Kernel, image and the rank-nullity theorem

Section titled “7. Kernel, image and the rank-nullity theorem”

When studying a linear map there are two subspaces to look at first: “what gets crushed” and “how far it reaches”.

Definition 7.1Kernel and image

Let f:VWf : V \to W be a linear map between vector spaces over KK. The sets

Kerf:={vVf(v)=0},Imf:={f(v)vV}\operatorname{Ker} f := \{\boldsymbol{v} \in V \mid f(\boldsymbol{v}) = \boldsymbol{0}\}, \qquad \operatorname{Im} f := \{f(\boldsymbol{v}) \mid \boldsymbol{v} \in V\}

are called the kernel and the image of ff respectively. When Imf\operatorname{Im} f is finite-dimensional, rankf:=dimImf\operatorname{rank} f := \dim \operatorname{Im} f is called the rank of ff.

Proposition 7.2Basic properties of the kernel and the image

Let f:VWf : V \to W be a linear map.

  1. Kerf\operatorname{Ker} f is a subspace of VV, and Imf\operatorname{Im} f is a subspace of WW.
  2. ff is injective if and only if Kerf={0}\operatorname{Ker} f = \{\boldsymbol{0}\}.
Proof(Proposition 7.2)

(1) We check the three conditions of Proposition 4.2. For the kernel: f(0)=0f(\boldsymbol{0}) = \boldsymbol{0}, so 0Kerf\boldsymbol{0} \in \operatorname{Ker} f. If u,vKerf\boldsymbol{u}, \boldsymbol{v} \in \operatorname{Ker} f then f(u+v)=f(u)+f(v)=0+0=0f(\boldsymbol{u}+\boldsymbol{v}) = f(\boldsymbol{u}) + f(\boldsymbol{v}) = \boldsymbol{0} + \boldsymbol{0} = \boldsymbol{0}, and for aKa \in K we get f(av)=af(v)=a0=0f(a\boldsymbol{v}) = af(\boldsymbol{v}) = a\boldsymbol{0} = \boldsymbol{0} (the last step is part (4) of Proposition 3.2).

For the image: 0=f(0)Imf\boldsymbol{0} = f(\boldsymbol{0}) \in \operatorname{Im} f. If y1=f(x1)\boldsymbol{y}_1 = f(\boldsymbol{x}_1) and y2=f(x2)\boldsymbol{y}_2 = f(\boldsymbol{x}_2) then y1+y2=f(x1+x2)Imf\boldsymbol{y}_1 + \boldsymbol{y}_2 = f(\boldsymbol{x}_1 + \boldsymbol{x}_2) \in \operatorname{Im} f and ay1=f(ax1)Imfa\boldsymbol{y}_1 = f(a\boldsymbol{x}_1) \in \operatorname{Im} f.

(2) Suppose ff is injective. If vKerf\boldsymbol{v} \in \operatorname{Ker} f then f(v)=0=f(0)f(\boldsymbol{v}) = \boldsymbol{0} = f(\boldsymbol{0}), so injectivity gives v=0\boldsymbol{v} = \boldsymbol{0}. Hence Kerf={0}\operatorname{Ker} f = \{\boldsymbol{0}\}.

Conversely suppose Kerf={0}\operatorname{Ker} f = \{\boldsymbol{0}\}. If f(u)=f(v)f(\boldsymbol{u}) = f(\boldsymbol{v}) then linearity gives f(uv)=f(u)f(v)=0f(\boldsymbol{u} - \boldsymbol{v}) = f(\boldsymbol{u}) - f(\boldsymbol{v}) = \boldsymbol{0}, so uvKerf={0}\boldsymbol{u} - \boldsymbol{v} \in \operatorname{Ker} f = \{\boldsymbol{0}\}, that is u=v\boldsymbol{u} = \boldsymbol{v}.

Part (2) is a useful reformulation. For a general map, injectivity must be tested “for every pair of points”, whereas for a linear map it suffices to examine only the points sent to the origin. In the language of linear systems: to decide uniqueness of solutions, one need only look at the case where the right-hand side is 0\boldsymbol{0}, that is, the homogeneous equation.

Theorem 7.3Rank-nullity theorem

Let V,WV, W be vector spaces over a field KK and let f:VWf : V \to W be a linear map. If VV is finite-dimensional, then Kerf\operatorname{Ker} f and Imf\operatorname{Im} f are both finite-dimensional and

dimV=dimKerf+dimImf.\dim V = \dim \operatorname{Ker} f + \dim \operatorname{Im} f.
Proof(Theorem 7.3)

Put n:=dimVn := \dim V. By Proposition 7.2 the kernel Kerf\operatorname{Ker} f is a subspace of VV, hence finite-dimensional by part (3) of Proposition 5.7. Put k:=dimKerfnk := \dim \operatorname{Ker} f \le n and choose a basis (u1,,uk)(\boldsymbol{u}_1, \ldots, \boldsymbol{u}_k) of Kerf\operatorname{Ker} f (the empty family when k=0k = 0).

This is also a linearly independent family in VV, so by part (2) of Proposition 5.7 it extends to a basis of VV. Write the extended basis as

(u1,,uk,z1,,zr).(\boldsymbol{u}_1, \ldots, \boldsymbol{u}_k, \boldsymbol{z}_1, \ldots, \boldsymbol{z}_r).

By Theorem 5.5 we have k+r=nk + r = n.

Claim: (f(z1),,f(zr))(f(\boldsymbol{z}_1), \ldots, f(\boldsymbol{z}_r)) is a basis of Imf\operatorname{Im} f.

It spans. Take any yImf\boldsymbol{y} \in \operatorname{Im} f and write y=f(x)\boldsymbol{y} = f(\boldsymbol{x}). Expanding x\boldsymbol{x} in the above basis as x=i=1kaiui+j=1rbjzj\boldsymbol{x} = \sum_{i=1}^{k} a_i \boldsymbol{u}_i + \sum_{j=1}^{r} b_j \boldsymbol{z}_j, linearity of ff gives

y=f(x)=i=1kaif(ui)+j=1rbjf(zj)=j=1rbjf(zj),\boldsymbol{y} = f(\boldsymbol{x}) = \sum_{i=1}^{k} a_i f(\boldsymbol{u}_i) + \sum_{j=1}^{r} b_j f(\boldsymbol{z}_j) = \sum_{j=1}^{r} b_j f(\boldsymbol{z}_j),

the first sum vanishing because uiKerf\boldsymbol{u}_i \in \operatorname{Ker} f gives f(ui)=0f(\boldsymbol{u}_i) = \boldsymbol{0}. Hence Imf=span(f(z1),,f(zr))\operatorname{Im} f = \operatorname{span}(f(\boldsymbol{z}_1), \ldots, f(\boldsymbol{z}_r)); in particular Imf\operatorname{Im} f is finite-dimensional.

It is linearly independent. Suppose j=1rcjf(zj)=0\sum_{j=1}^{r} c_j f(\boldsymbol{z}_j) = \boldsymbol{0}. By linearity f(jcjzj)=0f\left(\sum_j c_j \boldsymbol{z}_j\right) = \boldsymbol{0}, so jcjzjKerf\sum_j c_j \boldsymbol{z}_j \in \operatorname{Ker} f. Since the ui\boldsymbol{u}_i form a basis of the kernel, there are scalars d1,,dkd_1, \ldots, d_k with

j=1rcjzj=i=1kdiui,that isi=1kdiuij=1rcjzj=0.\sum_{j=1}^{r} c_j \boldsymbol{z}_j = \sum_{i=1}^{k} d_i \boldsymbol{u}_i, \qquad \text{that is} \qquad \sum_{i=1}^{k} d_i \boldsymbol{u}_i - \sum_{j=1}^{r} c_j \boldsymbol{z}_j = \boldsymbol{0}.

The equation on the right is a relation among the basis (u1,,uk,z1,,zr)(\boldsymbol{u}_1,\ldots,\boldsymbol{u}_k,\boldsymbol{z}_1,\ldots,\boldsymbol{z}_r) of VV, so by its linear independence all coefficients vanish; in particular c1==cr=0c_1 = \cdots = c_r = 0.

Therefore dimImf=r=nk=dimVdimKerf\dim \operatorname{Im} f = r = n - k = \dim V - \dim \operatorname{Ker} f, and rearranging gives the asserted identity. When k=nk = n (so r=0r = 0), we have Imf=span()={0}\operatorname{Im} f = \operatorname{span}(\emptyset) = \{\boldsymbol{0}\} and dimImf=0\dim \operatorname{Im} f = 0, so the identity reads n=n+0n = n + 0 and still holds.

The content of the proof can be drawn as follows. Split a basis of VV into “a basis of the kernel” and “the rest”; the rest is carried bijectively onto a basis of the image.

V (dimension n)the remaining n-k dimensionsKer f(dimension k)WIm f(dimension n-k)0one-to-one correspondenceall sent to 0
A schematic view of the rank-nullity theorem: the kernel is crushed to 0, and the remaining n-k dimensions become the image

Example 7.4Checking the rank-nullity theorem on the differentiation operator

Let D:P3P3D : P_3 \to P_3 be differentiation, D(p)=pD(p) = p'. By Example 5.3 we have dimP3=4\dim P_3 = 4.

Linearity. For p=i=03aixip = \sum_{i=0}^{3} a_i x^i and q=i=03bixiq = \sum_{i=0}^{3} b_i x^i, the coefficients of ap+bqap + bq are aai+bbia a_i + b b_i, and

D(ap+bq)=i=13i(aai+bbi)xi1=ai=13iaixi1+bi=13ibixi1=aD(p)+bD(q),D(ap + bq) = \sum_{i=1}^{3} i(a a_i + b b_i)x^{i-1} = a\sum_{i=1}^{3} i a_i x^{i-1} + b \sum_{i=1}^{3} i b_i x^{i-1} = aD(p) + bD(q),

so DD is linear. The values stay inside P3P_3 because the degree drops by one.

Kernel. Suppose D(a0+a1x+a2x2+a3x3)=a1+2a2x+3a3x2=0D(a_0 + a_1x + a_2x^2 + a_3x^3) = a_1 + 2a_2x + 3a_3x^2 = 0. The linear independence of 1,x,x21, x, x^2 established in Example 5.3 gives a1=2a2=3a3=0a_1 = 2a_2 = 3a_3 = 0, that is a1=a2=a3=0a_1 = a_2 = a_3 = 0. Hence KerD={a0a0R}\operatorname{Ker} D = \{a_0 \mid a_0 \in \mathbb{R}\} consists of the constant polynomials, with basis (1)(1), so dimKerD=1\dim \operatorname{Ker} D = 1.

Image. The values of DD always have degree at most 22, so ImDP2\operatorname{Im} D \subseteq P_2. Conversely, given any b0+b1x+b2x2P2b_0 + b_1 x + b_2 x^2 \in P_2,

D(b0x+b12x2+b23x3)=b0+b1x+b2x2,D\left(b_0 x + \frac{b_1}{2}x^2 + \frac{b_2}{3}x^3\right) = b_0 + b_1 x + b_2 x^2,

and the polynomial in brackets belongs to P3P_3. Hence ImD=P2\operatorname{Im} D = P_2 and dimImD=3\dim \operatorname{Im} D = 3.

Check. We get dimP3=4=1+3=dimKerD+dimImD\dim P_3 = 4 = 1 + 3 = \dim\operatorname{Ker} D + \dim\operatorname{Im} D, exactly as Theorem 7.3 predicts. Differentiation is the map that discards “only the information carried by the constant term”, and the image thins out by precisely that one dimension.

Corollary 7.5Injective, surjective and bijective coincide in finite dimensions

Let V,WV, W be finite-dimensional vector spaces over a field KK with dimV=dimW=n\dim V = \dim W = n, and let f:VWf : V \to W be a linear map. Then the following three conditions are equivalent.

  1. ff is injective.
  2. ff is surjective.
  3. ff is bijective.
Proof(Corollary 7.5)

It suffices to prove (1)(2)(1) \Leftrightarrow (2); the equivalence with (3)(3) then follows from the definitions.

By Proposition 7.2, ff is injective if and only if Kerf={0}\operatorname{Ker} f = \{\boldsymbol{0}\}, that is dimKerf=0\dim \operatorname{Ker} f = 0. By Theorem 7.3 this is equivalent to dimImf=dimV=n\dim \operatorname{Im} f = \dim V = n.

On the other hand, Imf\operatorname{Im} f is a subspace of WW, so applying part (3) of Proposition 5.7 to WW shows that dimImf=n=dimW\dim \operatorname{Im} f = n = \dim W is equivalent to Imf=W\operatorname{Im} f = W. And Imf=W\operatorname{Im} f = W is precisely the surjectivity of ff.

Chaining these gives (1)(2)(1) \Leftrightarrow (2).

This corollary may be read as: “in finite dimensions, a map that loses no information necessarily fills up its target”. It is the real reason why, for a system of nn linear equations in nn unknowns, “there is always at most one solution” and “there is always at least one solution” are equivalent. As Exercise 8.4 shows, the statement fails in infinite dimensions. Finite-dimensionality is used essentially, through Proposition 5.7.

Remark 7.6

A system of linear equations Ax=bA\boldsymbol{x} = \boldsymbol{b} (with AA an m×nm \times n matrix) can be rewritten as fA(x)=bf_A(\boldsymbol{x}) = \boldsymbol{b} using the linear map fA:KnKmf_A : K^n \to K^m, fA(x)=Axf_A(\boldsymbol{x}) = A\boldsymbol{x}. Then a solution exists exactly when bImfA\boldsymbol{b} \in \operatorname{Im} f_A, the number of degrees of freedom of the solutions is dimKerfA\dim \operatorname{Ker} f_A, and Theorem 7.3 gives

dimKerfA=nrankfA.\dim \operatorname{Ker} f_A = n - \operatorname{rank} f_A.

The rule of thumb quoted in the motivating section, “the number of unknowns minus the number of independent equations”, is a restatement of this identity. The true meaning of “the number of independent equations” is rankfA\operatorname{rank} f_A, and how to compute it by Gaussian elimination(Theorem 7.4)[Matrices and Linear Systems] is treated in Matrices and systems of linear equations.

7.3. How to read the theorem in data science

Section titled “7.3. How to read the theorem in data science”

A data point with pp features is a vector in Rp\mathbb{R}^p. Principal component analysis (PCA) first centres the data by subtracting the mean, then chooses directions u1,,ukRp\boldsymbol{u}_1, \ldots, \boldsymbol{u}_k \in \mathbb{R}^p of length 11 that are mutually orthogonal, and compresses pp dimensions into kk by

f(x)=(u1,x,,uk,x)Rk.f(\boldsymbol{x}) = \bigl(\langle \boldsymbol{u}_1, \boldsymbol{x}\rangle, \ldots, \langle \boldsymbol{u}_k, \boldsymbol{x}\rangle\bigr) \in \mathbb{R}^k.

The inner product is linear in its second argument, so ff is a linear map. If the uj\boldsymbol{u}_j are orthonormal then f(uj)=ejf(\boldsymbol{u}_j) = \boldsymbol{e}_j (the standard basis of Rk\mathbb{R}^k), so Imf=Rk\operatorname{Im} f = \mathbb{R}^k and rankf=k\operatorname{rank} f = k. Hence Theorem 7.3 gives

dimKerf=pk.\dim \operatorname{Ker} f = p - k.

These pkp - k dimensions are exactly “the information thrown away by the compression”. However cleverly the directions uj\boldsymbol{u}_j are chosen, pkp-k dimensions are inevitably lost. What PCA answers is the optimisation problem “which kk dimensions should be kept so that the loss of variance is smallest”, and the answer is the eigenvectors of the covariance matrix, as guaranteed by the maximum and minimum of the Rayleigh quotient(Theorem 7.1)[スペクトル定理]. This thread continues in Eigenvalues and eigenvectors, Inner product spaces and Gram-Schmidt orthogonalisation and The spectral theorem.

Here is one more practical example. In linear regression, when one explanatory variable is a linear combination of the others (multicollinearity), the kernel of the linear map defined by the data matrix is no longer {0}\{\boldsymbol{0}\}. By part (2) of Proposition 7.2 the map is no longer injective, so infinitely many coefficient vectors give the same predictions. The phenomenon known as “unstable coefficients” is a consequence of the kernel failing to vanish.

Exercise 8.1Easy

Decide whether each of the following subsets of R2\mathbb{R}^2 is a subspace, and justify your answer.

  1. W1={(x,y)R22x3y=0}W_1 = \{(x,y) \in \mathbb{R}^2 \mid 2x - 3y = 0\}
  2. W2={(x,y)R2xy=0}W_2 = \{(x,y) \in \mathbb{R}^2 \mid xy = 0\}
Solution

1. It is a subspace. We check the three conditions of Proposition 4.2. Since 2030=02\cdot 0 - 3\cdot 0 = 0, we have (0,0)W1(0,0) \in W_1. If (x1,y1),(x2,y2)W1(x_1,y_1), (x_2,y_2) \in W_1 then

2(x1+x2)3(y1+y2)=(2x13y1)+(2x23y2)=0+0=0,2(x_1+x_2) - 3(y_1+y_2) = (2x_1 - 3y_1) + (2x_2 - 3y_2) = 0 + 0 = 0,

so the sum lies in W1W_1. For aRa \in \mathbb{R} we have 2(ax1)3(ay1)=a(2x13y1)=a0=02(ax_1) - 3(ay_1) = a(2x_1 - 3y_1) = a \cdot 0 = 0, so scalar multiples lie in W1W_1 too. Note that W1=span((3,2))W_1 = \operatorname{span}((3,2)), a line through the origin.

2. It is not a subspace. The equation xy=0xy = 0 means ”x=0x = 0 or y=0y = 0”, so W2W_2 is the union of the two coordinate axes. We have (1,0)W2(1,0) \in W_2 (since y=0y=0) and (0,1)W2(0,1) \in W_2 (since x=0x=0), but their sum is (1,1)(1,1) and 11=101 \cdot 1 = 1 \ne 0, so the sum is not in W2W_2. Thus W2W_2 is not closed under addition and condition 2 fails. Since it does contain the zero vector and is closed under scalar multiplication, this is an example where exactly one of the three conditions fails.

Exercise 8.2Standard

In the vector space RR\mathbb{R}^{\mathbb{R}} of all real-valued functions on the reals (Example 3.4), consider f1(x)=1f_1(x) = 1, f2(x)=cos2xf_2(x) = \cos^2 x and f3(x)=cos2xf_3(x) = \cos 2x.

  1. Show that (f1,f2,f3)(f_1, f_2, f_3) is linearly dependent.
  2. Show that (f1,f2)(f_1, f_2) is linearly independent.
  3. Determine the dimension of span(f1,f2,f3)\operatorname{span}(f_1, f_2, f_3).
Solution

1. By the double angle formula cos2x=2cos2x1\cos 2x = 2\cos^2 x - 1, for every xx we have

1f1(x)2f2(x)+1f3(x)=12cos2x+cos2x=0.1 \cdot f_1(x) - 2 \cdot f_2(x) + 1 \cdot f_3(x) = 1 - 2\cos^2 x + \cos 2x = 0.

As functions, f12f2+f3=0f_1 - 2f_2 + f_3 = 0, and the coefficients (1,2,1)(1,-2,1) are not all 00, so this is a non-trivial relation. Hence the family is linearly dependent.

2. Suppose af1+bf2=0a f_1 + b f_2 = 0, that is a+bcos2x=0a + b\cos^2 x = 0 for every xx. Substituting x=π/2x = \pi/2 and using cos(π/2)=0\cos(\pi/2) = 0 gives a=0a = 0. Substituting x=0x = 0 and using cos0=1\cos 0 = 1 gives a+b=0a + b = 0, and with a=0a = 0 this yields b=0b = 0. Hence the family is linearly independent.

3. By part 1 we have f3=2f2f1f_3 = 2f_2 - f_1, so span(f1,f2,f3)=span(f1,f2)\operatorname{span}(f_1,f_2,f_3) = \operatorname{span}(f_1,f_2) (every linear combination involving f3f_3 can be rewritten as a linear combination of f1f_1 and f2f_2). By part 2 these two are linearly independent, so (f1,f2)(f_1,f_2) is a basis and the dimension is 22.

Exercise 8.3Standard

Let M2(R)M_2(\mathbb{R}) be the vector space of all real 2×22 \times 2 matrices and consider the trace

tr(abcd):=a+d.\operatorname{tr} \begin{pmatrix} a & b \\ c & d \end{pmatrix} := a + d.

Show that tr:M2(R)R\operatorname{tr} : M_2(\mathbb{R}) \to \mathbb{R} is a linear map, determine a basis and the dimension of Ker(tr)\operatorname{Ker}(\operatorname{tr}) and the dimension of Im(tr)\operatorname{Im}(\operatorname{tr}), and verify Theorem 7.3.

Solution

Linearity. For X=(a1b1c1d1)X = \begin{pmatrix} a_1 & b_1 \\ c_1 & d_1\end{pmatrix}, Y=(a2b2c2d2)Y = \begin{pmatrix} a_2 & b_2 \\ c_2 & d_2\end{pmatrix} and s,tRs, t \in \mathbb{R}, the (1,1)(1,1) entry of sX+tYsX + tY is sa1+ta2sa_1 + ta_2 and the (2,2)(2,2) entry is sd1+td2sd_1 + td_2, so

tr(sX+tY)=(sa1+ta2)+(sd1+td2)=s(a1+d1)+t(a2+d2)=str(X)+ttr(Y).\operatorname{tr}(sX + tY) = (sa_1 + ta_2) + (sd_1 + td_2) = s(a_1+d_1) + t(a_2+d_2) = s\operatorname{tr}(X) + t\operatorname{tr}(Y).

Hence the trace is linear.

Image. By Proposition 7.2, Im(tr)\operatorname{Im}(\operatorname{tr}) is a subspace of R\mathbb{R}, and it is not {0}\{0\} because tr(1000)=10\operatorname{tr}\begin{pmatrix}1&0\\0&0\end{pmatrix} = 1 \ne 0. Since dimR=1\dim \mathbb{R} = 1, part (3) of Proposition 5.7 gives Im(tr)=R\operatorname{Im}(\operatorname{tr}) = \mathbb{R} and dimIm(tr)=1\dim \operatorname{Im}(\operatorname{tr}) = 1. More directly, any λR\lambda \in \mathbb{R} is obtained as tr(λ000)=λ\operatorname{tr}\begin{pmatrix}\lambda & 0\\ 0 & 0\end{pmatrix} = \lambda, so the map is surjective.

Kernel. The condition a+d=0a + d = 0 means d=ad = -a, so

Ker(tr)={(abca)  |  a,b,cR}=span((1001),(0100),(0010)).\operatorname{Ker}(\operatorname{tr}) = \left\{ \begin{pmatrix} a & b \\ c & -a\end{pmatrix} \;\middle|\; a,b,c \in \mathbb{R} \right\} = \operatorname{span}\left( \begin{pmatrix}1&0\\0&-1\end{pmatrix}, \begin{pmatrix}0&1\\0&0\end{pmatrix}, \begin{pmatrix}0&0\\1&0\end{pmatrix} \right).

These three matrices are linearly independent: a linear combination has the form (αβγα)\begin{pmatrix} \alpha & \beta \\ \gamma & -\alpha \end{pmatrix}, which is the zero matrix only when α=β=γ=0\alpha = \beta = \gamma = 0. Hence they form a basis and dimKer(tr)=3\dim \operatorname{Ker}(\operatorname{tr}) = 3.

Check. We have dimM2(R)=4\dim M_2(\mathbb{R}) = 4 (with basis E11,E12,E21,E22E_{11}, E_{12}, E_{21}, E_{22}), and indeed 4=3+14 = 3 + 1.

Exercise 8.4Hard

Let V=RNV = \mathbb{R}^{\mathbb{N}} be the vector space of all real sequences and let

S(a1,a2,a3,):=(0,a1,a2,),T(a1,a2,a3,):=(a2,a3,a4,)S(a_1, a_2, a_3, \ldots) := (0, a_1, a_2, \ldots), \qquad T(a_1, a_2, a_3, \ldots) := (a_2, a_3, a_4, \ldots)

be the right shift and the left shift.

  1. Verify that SS and TT are linear maps.
  2. Show that SS is injective but not surjective, and that TT is surjective but not injective.
  3. Show that VV is infinite-dimensional, and explain why the finite-dimensionality hypothesis in Corollary 7.5 cannot be dropped.
Solution

1. Sums and scalar multiples of sequences are defined componentwise. Let a=(ai)\boldsymbol{a} = (a_i), b=(bi)\boldsymbol{b} = (b_i) and s,tRs,t \in \mathbb{R}. The first component of S(sa+tb)S(s\boldsymbol{a} + t\boldsymbol{b}) is 0=s0+t00 = s\cdot 0 + t \cdot 0 and its (i+1)(i+1)-st component is sai+tbisa_i + tb_i, which agree with the corresponding components of sS(a)+tS(b)sS(\boldsymbol{a}) + tS(\boldsymbol{b}). For TT, the ii-th component of T(sa+tb)T(s\boldsymbol{a}+t\boldsymbol{b}) is sai+1+tbi+1sa_{i+1} + tb_{i+1}, which agrees with the ii-th component of sT(a)+tT(b)sT(\boldsymbol{a}) + tT(\boldsymbol{b}).

2. If S(a)=0S(\boldsymbol{a}) = \boldsymbol{0} then, reading off the (i+1)(i+1)-st component, ai=0a_i = 0 for every ii, so a=0\boldsymbol{a} = \boldsymbol{0}. Hence SS is injective by Proposition 7.2. On the other hand, every element of ImS\operatorname{Im} S has first component 00, so (1,0,0,)ImS(1,0,0,\ldots) \notin \operatorname{Im} S and SS is not surjective.

As for TT, given any b=(b1,b2,)\boldsymbol{b} = (b_1,b_2,\ldots) we have T(0,b1,b2,)=bT(0, b_1, b_2, \ldots) = \boldsymbol{b}, so TT is surjective. But T(1,0,0,)=(0,0,)=0T(1,0,0,\ldots) = (0,0,\ldots) = \boldsymbol{0}, so KerT{0}\operatorname{Ker} T \ne \{\boldsymbol{0}\} and TT is not injective. Note also that TS=idVT \circ S = \mathrm{id}_V, whereas ST(a)=(0,a2,a3,)S \circ T(\boldsymbol{a}) = (0, a_2, a_3, \ldots), so STidVS \circ T \ne \mathrm{id}_V for any sequence with a10a_1 \ne 0. A one-sided inverse of this kind cannot occur in finite dimensions.

3. For each nn let en\boldsymbol{e}_n be the sequence whose nn-th term is 11 and whose other terms are 00. If i=1Nciei=0\sum_{i=1}^{N} c_i \boldsymbol{e}_i = \boldsymbol{0} then reading off the ii-th component gives ci=0c_i = 0, so (e1,,eN)(\boldsymbol{e}_1, \ldots, \boldsymbol{e}_N) is linearly independent for every NN. If VV were finite-dimensional with dimV=n\dim V = n, then by part (1) of Proposition 5.7 no linearly independent family of n+1n+1 vectors could exist, yet (e1,,en+1)(\boldsymbol{e}_1,\ldots,\boldsymbol{e}_{n+1}) is one. Hence VV is infinite-dimensional.

Now SS is a linear map from VV to VV that is injective but not surjective, so the conclusion of Corollary 7.5 fails and its finite-dimensionality hypothesis cannot be dropped. Looking back at where finite-dimensionality was used: in deducing Imf=W\operatorname{Im} f = W from dimImf=dimW\dim \operatorname{Im} f = \dim W (part (3) of Proposition 5.7), and in the fact that Theorem 7.3 itself assumes finite dimension. For SS we have KerS={0}\operatorname{Ker} S = \{\boldsymbol{0}\} and ImSV\operatorname{Im} S \subsetneq V: the situation, peculiar to infinite dimensions, in which a proper subspace is “just as large” as the whole space.

  • Masahiko Saito, Senkei Daisu Nyumon, University of Tokyo Press, 1966 (in Japanese) — the chapters on linear spaces, bases, dimension and linear maps. A standard Japanese textbook.
  • Ichiro Satake, Senkei Daisugaku, Shokabo, new edition 2015 (original 1958) (in Japanese) — the chapters on vector spaces and linear maps. The level of abstraction is high and the axiomatic development is careful.
  • Sheldon Axler, Linear Algebra Done Right, 4th ed., Springer, 2024 — Chapter 1 (Vector Spaces), Chapter 2 (Finite-Dimensional Vector Spaces), Chapter 3 (Linear Maps). Builds the structure without determinants, and is close in spirit to the organisation of this article. An open access edition is available at linear.axler.net.
  • Gilbert Strang, Introduction to Linear Algebra, 6th ed., Wellesley-Cambridge Press, 2023 — the chapters on vector spaces and subspaces, and on the four fundamental subspaces. The emphasis is on numerical computation and data analysis.
  • Giuseppe Peano, Calcolo geometrico secondo l’Ausdehnungslehre di H. Grassmann, Fratelli Bocca, Torino, 1888 — Chapter IX gives the axioms for a “linear system”, known as the prototype of the modern definition of a vector space.
  • I. T. Jolliffe, Principal Component Analysis, 2nd ed., Springer, 2002 — the standard reference on principal component analysis, and the background to the discussion of compression in §7.3.

Appendix: What changes in infinite dimensions

Section titled “Appendix: What changes in infinite dimensions”

Existence of bases. For finite-dimensional spaces we proved the existence of a basis in Proposition 5.7. The statement “every vector space has a basis” is true for general vector spaces as well, but its proof requires Zorn’s lemma (equivalent to the axiom of choice). Conversely, it is known that the axiom of choice can be derived from that statement. So the existence of a basis is a proposition depending on the axiom system of set theory, out of reach of the kind of constructive argument available in the finite-dimensional case.

Bases that cannot be written down. A basis whose existence is guaranteed by the axiom of choice need not be explicitly describable. The famous example is a basis of R\mathbb{R} regarded as a vector space over Q\mathbb{Q} (a Hamel basis). It exists, yet not a single one of its elements can be exhibited. This is why “take a basis” is a far less casual operation in infinite dimensions than in finite ones.

The limits of algebraic bases. As we saw in Definition 4.3, a linear combination is always a finite sum. Consequently an infinite sum such as a Fourier series is not a linear combination in the algebraic sense. Functional analysis introduces a notion of convergence and uses a complete orthonormal system to give meaning to an infinite sum f=ncnenf = \sum_{n} c_n e_n as a limit. This is a different object from an algebraic basis. For complete orthonormal systems in Hilbert spaces, Inner product spaces and Gram-Schmidt orthogonalisation is the entry point, and its finite-dimensional counterpart is the expansion in an orthonormal basis(Theorem 5.3)[内積空間とグラム・シュミット直交化].

What replaces dimension. In infinite dimensions an identity such as Theorem 7.3 is unavailable. As the right shift of Exercise 8.4 shows, injectivity and surjectivity also come apart. Instead, more delicate quantities take the leading role: whether the image of an operator is closed, and whether the difference between the dimensions of the kernel and the cokernel (the index) is finite. On the care needed even in comparing the “sizes” of infinite sets, see Cardinality and infinity: infinities come in different sizes and equipotence(Definition 3.1)[濃度と無限].

Where finiteness was used in this article. Looking back, finite-dimensionality mattered only in the step of Lemma 5.4 where “the spanning family is finite, so the exchanges run out”, and in the three assertions of Proposition 5.7 derived from it. Everything else — Proposition 3.2, Proposition 4.2, Proposition 5.2, Proposition 7.2 — holds without any assumption on dimension.

Report an error in this article ・Operated by: Mugen Giken LLCPricingTermsLegal notice

© 2026 夢現技研合同会社 ・Feeding the text to an LLM is welcome. Code samples are MIT licensed.