Contents / Linear Algebra / Vector Spaces
Chapter 5
Vector Spaces
Abstract vector spaces over a field, subspaces, bases, dimension, coordinates, and the four fundamental subspaces.
Introduction
Up to this point every vector in this course has been a list of numbers. That was a useful fiction. The theorems we proved about — span, independence, basis, dimension — never once used the fact that a vector is a list. They used only that vectors can be added and scaled, and that those two operations obey a short list of algebraic rules.
That observation is worth a great deal. Polynomials can be added and scaled. So can matrices of a fixed shape, functions on an interval, infinite sequences, solutions of a linear differential equation, and digital signals. Each of those is a vector space, and every theorem in this chapter applies to all of them at once. When you prove that any two bases of a space have the same size, you have proved it simultaneously for arrows in the plane, for cubic polynomials, and for the solution set of .
This chapter builds that framework from the axioms. It defines a vector space over a field, collects the examples you will meet for the rest of your mathematical life, and then develops the four load-bearing ideas — span, independence, basis, dimension — in the general setting. It closes by coming back to matrices, where the abstract machinery pays for itself: the column space, row space and null space of a matrix are vector spaces, their dimensions are locked together by the Rank Theorem, and the whole structure of a linear system is readable off those numbers.
The chapter is proof-carrying. Almost every result here has a short argument, and the arguments are the content: they are what tells you why dimension is well defined rather than merely that it is.
5.1Vector spaces and fields
Before vectors, scalars. The numbers we multiply vectors by must themselves form a system in which we can add, subtract, multiply and divide. Such a system is called a field.
Definition 5.1 (Field). A field is a set with two operations, addition and multiplication, such that both are commutative and associative, multiplication distributes over addition, there are distinct identity elements and , every element has an additive inverse , and every has a multiplicative inverse .
The three fields used in this course are the real numbers , the complex numbers , and the two-element field
which is the arithmetic of a single bit and is the field underneath error-correcting codes. The rational numbers are a field; the integers are not, because has no multiplicative inverse in . Unless a statement says otherwise, read below as ; nothing in this chapter changes if you swap in .
Definition 5.2 (Vector space). A vector space over a field is a set together with an addition and a scalar multiplication such that for all and all :
- (commutativity);
- (associativity);
- there is a with for all (additive identity);
- for each there is a with (additive inverse);
- (unit scalar);
- (compatibility of scalars);
- (distributivity over vector addition);
- (distributivity over scalar addition).
Elements of are called vectors; elements of are called scalars.
Two of the axioms are quietly hidden in the phrase "an addition ": the sum of two elements of must land back in , and likewise . These are the closure requirements, and in practice they are the conditions that fail most often.
Axiom 5 looks like a triviality. It is not: it is the axiom that ties the scalar to the vector operation, and without it you can build a perfectly consistent system that satisfies the other seven and is useless. The example at the end of this section does exactly that. Axioms 1–4 say that is a commutative group under addition, and 5–8 say the scalars act on it compatibly.
Intuition. A vector space is a set of things you are allowed to mix. You can take parts of one thing and parts of another and add them, and the recipe you get is again a thing of the same kind. That is all. Nothing in the definition mentions length, angle, or coordinates — those are extra structure added in a later chapter. A vector space is just a mixing rule that never takes you outside the set.
The axioms are short enough that the first consequences can be squeezed out immediately, and they are worth seeing derived rather than assumed.
Proposition 5.3 (Elementary consequences of the axioms). In any vector space over :
- the zero vector is unique, and each has exactly one additive inverse;
- for every ;
- for every ;
- ;
- if then or .
Proof. (1) If and are both additive identities then , using axiom 3 for each in turn. If and are both inverses of , then
(2) By axiom 8, . Add to both sides to get .
(3) By axiom 7, ; add to both sides.
(4) Using axioms 5 and 8, by (2). So is an additive inverse of , and by (1) it is the additive inverse.
(5) Suppose and . Then exists in , and
by axioms 5 and 6 and part (3).∎
Notice where part (5) used the field: it needed . This is the one place in the elementary theory where "the scalars form a field" rather than merely a ring does real work, and it is the reason the whole subject is built over fields.
Now the examples. Learn these; they are the vector spaces that the rest of mathematics runs on.
Example 5.4 (The standard spaces). Verify that each of the following is a vector space over , and identify its zero vector: ; the space of polynomials of degree at most ; the space of real matrices; the space of all functions from a set to .
Solution. with componentwise operations. Every axiom is the corresponding axiom of applied in each of the slots at once. Zero vector: .
, with polynomials added coefficient by coefficient and scaled coefficient by coefficient. Closure holds because adding two polynomials of degree at most cannot raise the degree, and scaling cannot either. Zero vector: the zero polynomial, all of whose coefficients vanish.
The full space of polynomials of any degree is also a vector space; it is not contained in any , and is our first example of an infinite-dimensional space.
with entrywise addition and scaling. The zero vector is the zero matrix. Note that matrix multiplication plays no role here — it is not part of the vector space structure.
, where and . Each axiom is checked by evaluating both sides at an arbitrary and citing the corresponding axiom in . For instance , and since two functions are equal exactly when they agree at every point, . Zero vector: the function that is identically .
Sanity check on the pattern: in all four cases the operations are performed "slotwise" — per coordinate, per coefficient, per entry, per input value — and the axioms are inherited slotwise from .□
Two more families deserve names. , the set of continuous real functions on , is a vector space because a sum of continuous functions is continuous and a scalar multiple of a continuous function is continuous. The set of all infinite real sequences is a vector space under termwise operations. And the smallest example of all, the zero space , satisfies every axiom trivially; it is the only vector space with finitely many elements when .
Example 5.5 (An exotic vector space). Let , the set of strictly positive reals, with operations
Show is a vector space over and identify its zero vector and the additive inverse of .
Solution. Closure: a product of positive numbers is positive, and for and any real . So both operations land in .
Axioms 1 and 2 are commutativity and associativity of ordinary multiplication. For axiom 3 we need an element with , that is ; so . The zero vector of this space is the number .
Axiom 4: we need , that is , so . The additive inverse of is its reciprocal.
Axiom 5: . Axiom 6: . Axiom 7: . Axiom 8: .
All eight hold, so is a vector space. Sanity check: the map turns into ordinary addition and into ordinary scalar multiplication, so this space is a disguised copy of . That is why every axiom worked out — the logarithm was doing the work all along, and this space has dimension .□
Example 5.6 (Two non-examples). For each set below, find one axiom that fails. (a) The first quadrant with the usual operations. (b) with the usual addition but with scalar multiplication redefined as .
Solution. (a) Axiom 4 fails. Take . Its additive inverse would have to be , which is not in , and by the uniqueness in the elementary-consequences proposition no other element can serve. Equivalently, is not closed under multiplication by , so scalar multiplication does not map into .
(b) Axiom 5 fails: whenever . It is worth checking how much does survive: axioms 1–4 are untouched since addition is unchanged; axiom 6 holds since ; axiom 7 and axiom 8 both hold by direct computation. So seven of the eight axioms hold and the system is still worthless — in it, forgets half of . That is precisely why axiom 5 is on the list.□
Pitfall. "It has an addition and a scalar multiplication, so it must be a vector space" is the single most common error here. The operations must satisfy all eight axioms with the operations you were given, not with the ones you expected. When you are handed a strange and , resist the urge to read as "the number zero": the additive identity is whatever element the axiom demands, as the positive-reals example shows.
5.2Subspaces
Inside a vector space sit smaller vector spaces. Rather than re-checking eight axioms each time, we exploit the fact that most of them are inherited automatically.
Definition 5.7 (Subspace). A subset of a vector space over is a subspace of if is itself a vector space over under the addition and scalar multiplication it inherits from .
Theorem 5.8 (Subspace criterion). A subset is a subspace of if and only if
- ;
- whenever ;
- whenever and .
Proof. If is a subspace it is a vector space, so it is closed under both operations, giving (2) and (3); and it has an additive identity with , whence adding (computed in ) gives , which is (1).
Conversely suppose (1)–(3). Conditions (2) and (3) say exactly that the two operations of restrict to operations on . Axioms 1, 2, 5, 6, 7 and 8 are identities between elements; they hold for all elements of , so in particular for elements of — nothing needs re-checking. Axiom 3 is condition (1). For axiom 4, given , condition (3) with puts , and by the elementary-consequences proposition. So all eight axioms hold in .∎
The proof is the reason the criterion is only three conditions rather than eight: identities descend to subsets for free, and only the existence claims — a zero, an inverse — and closure need attention. Condition (1) can be weakened to " is nonempty", because a nonempty closed under scaling contains ; but checking directly is faster and rules out most impostors in one line.
Proposition 5.9 (One-step subspace test). A nonempty subset is a subspace if and only if for all and all .
Proof. A subspace is closed under scaling and then addition, so the condition holds. Conversely, pick any (possible since ); taking gives , taking gives closure under addition, and taking gives closure under scaling.∎
Here is the standard stock of subspaces. In : the zero space, every line through the origin, every plane through the origin, and itself — and, as we will prove once dimension is available, nothing else. In : the subspace , the polynomials with , the even polynomials. In : the symmetric matrices, the upper-triangular matrices, the matrices of trace zero, the diagonal matrices. In : the continuous functions, the differentiable functions, the polynomials, and the solution set of .
The last of these is worth pausing on. The reason linear differential equations are called linear is exactly that their solution sets are subspaces: if and then by linearity of differentiation. The one-step test applies verbatim, and everything this chapter proves about dimension immediately becomes a statement about how many independent solutions such an equation has.
Non-examples are just as instructive. A line not through the origin fails condition (1). The set — the union of the two axes — contains and is closed under scaling but not addition: is off both axes. The set is closed under addition but not under multiplication by . The set of invertible matrices fails at once, since it omits the zero matrix. Each non-example fails exactly one condition, and each of the three conditions is genuinely needed.
Intuition. Think of as a country and a subspace as a region you can never drive out of, no matter how you combine your moves, and which contains your starting point, the origin. A plane through the origin in is such a region: add two vectors lying in it, stretch either of them, and you are still in the plane. Tilt that plane up so it misses the origin and the region is no longer closed — scaling any point in it by drops you out.
Theorem 5.10 (Intersections of subspaces). If and are subspaces of , then is a subspace of . More generally the intersection of any family of subspaces of is a subspace.
Proof. lies in every subspace, hence in the intersection. If lie in every member of the family, then so does , since each member is closed under linear combinations. By the one-step test the intersection is a subspace.∎
Proposition 5.11 (Unions are almost never subspaces). If and are subspaces of , then is a subspace if and only if or .
Proof. If one contains the other the union is the larger one, which is a subspace. Conversely suppose is a subspace and neither containment holds. Choose and . Then lies in , so it lies in or in . If then , a contradiction; if then , also a contradiction.∎
Geometrically: two distinct lines through the origin in form an shape, and adding one vector from each lands you off both lines. To get a subspace out of two subspaces you must not take their union but their sum, which is the subject of the next section.
Example 5.12 (Subspaces of a matrix space). Let . Decide which of these are subspaces: (a) the symmetric matrices ; (b) the matrices with ; (c) the matrices of trace .
Solution. (a) The zero matrix is symmetric. If and then , using that transposition is linear. So passes the one-step test and is a subspace.
(b) Not a subspace. Both
have determinant , but has determinant . Closure under addition fails. (The set does contain and is closed under scaling, so only one condition fails — which is enough.)
(c) The zero matrix has trace , and , since the trace is a linear function of the entries. So the trace-zero matrices form a subspace.
Sanity check: (a) and (c) are each cut out by linear equations in the entries (; ), while (b) is cut out by the quadratic equation . Solution sets of homogeneous linear equations are always subspaces; solution sets of nonlinear ones essentially never are.□
Example 5.13 (A subspace inside a function space). Let and let and . Which is a subspace?
Solution. : the zero function satisfies . If then . So is a subspace.
: the zero function has , so and is not a subspace. It also fails closure: if then .
Sanity check: is defined by a homogeneous condition, by an inhomogeneous one. The same dichotomy governs versus .□
Pitfall. The condition defining a subspace must be homogeneous and linear. " " gives a subspace; " " does not (no zero vector); " " does not (not closed under addition: and sum to ); " " does not (not closed under negative scaling).
5.3Sums and direct sums
Since the union of two subspaces is a blunt instrument, we take instead the smallest subspace containing both.
Definition 5.14 (Sum of subspaces). If and are subspaces of , their sum is
Proposition 5.15 (The sum is the smallest subspace containing both). is a subspace of containing both and , and it is contained in every subspace of that contains both.
Proof. . Given and in the sum and scalars ,
where the first bracket lies in and the second in . So is a subspace. Taking shows , and similarly . Finally if is a subspace with and , then for and both lie in , so ; hence .∎
A vector of can usually be written as in many ways. In , let be the -axis, the -axis, and the line . Then and also ; but the vector is in the first decomposition and in the second — and in each case that is the only decomposition. Contrast , where and uniqueness is gone. Uniqueness is the property worth naming.
Definition 5.16 (Direct sum). The sum is called direct, written , if every vector of can be written as with and in exactly one way. If we call a complement of in .
Theorem 5.17 (Criterion for a direct sum). For subspaces of , the sum is direct if and only if . Equivalently, it is direct if and only if the only way to write with is .
Proof. Suppose the sum is direct and let . Then
and the first expression has its -part equal to while the second has -part . Uniqueness of the decomposition of forces .
Conversely suppose and that with , . Rearranging,
The left side lies in and the right side lies in , so both lie in . Hence and , which is uniqueness.∎
The criterion is startlingly cheap to check: intersect two subspaces and see whether anything but survives. Note the asymmetry with three or more summands — for pairwise trivial intersections are not enough, as the three lines above show: they meet pairwise only at the origin, yet the sum is not direct. The correct general condition is that the only decomposition of is the all-zero one.
Intuition. A direct sum is a filing system with no ambiguity. Splitting into the -plane and the -axis, every vector has one and only one horizontal part and one vertical part — a unique filing. Splitting it into the -plane and the -plane instead, the vector can be filed under either, or half under each, and the system is useless for bookkeeping. The intersection of the two drawers, the -axis, is exactly the ambiguity.
Example 5.18 (Symmetric plus antisymmetric). In , let be the symmetric matrices and the antisymmetric ones (). Show .
Solution. First, and are subspaces (each is cut out by linear conditions on the entries; the argument for was given earlier and the one for is identical).
: given any , write
and check the memberships: , so the first summand is symmetric, and , the negative of the second summand.
The sum is direct: if then , so and . By the direct-sum criterion, .
Sanity check with on : the symmetric part is and the antisymmetric part is , and they do sum to .□
Example 5.19 (Deciding whether a sum is direct). In let and . Is direct, and what is ?
Solution. A vector of has the form , so .
Intersection: a vector in has last two coordinates , so if it also lies in then and the vector is ; being in imposes nothing further, so and the intersection is not trivial. The sum is not direct.
What is ? It is spanned by . The third is the sum of the first two and can be dropped, leaving three vectors which are visibly independent, so ; in fact .
Sanity check against the dimension formula proved later: , matching.□
Pitfall. is not a different set from — it is the same set, with a promise attached. Writing asserts that the intersection is trivial; if you have not checked that, write .
5.4Linear combinations and span
Definition 5.20 (Linear combination and span). Let be vectors in a vector space over . A linear combination of them is any vector of the form
Their span is the set of all such combinations,
By convention . For an infinite set , means the set of all finite linear combinations of elements of . If we say spans , and is finite-dimensional if some finite set spans it.
The restriction to finite combinations is not a technicality to skip over: an infinite sum has no meaning in a bare vector space, where there is no notion of limit. That is why , the space of all polynomials, is spanned by — every polynomial is a finite combination — while the function , whose power series needs infinitely many terms, is not in that span.
Theorem 5.21 (The span is the smallest subspace containing the vectors). For any , the set is a subspace of containing each , and it is contained in every subspace of containing all the .
Proof. Taking all gives , so the span is nonempty. Given two combinations and scalars ,
again a linear combination of the same vectors; by the one-step test the span is a subspace. Taking and the rest shows is in the span. Finally, a subspace containing every is closed under scaling and addition, so by induction on it contains every ; hence it contains the span.∎
The "smallest" clause is what makes span a useful construction rather than a mere abbreviation: is the subspace generated by , and any argument that needs "the least subspace containing these vectors" can use it.
Intuition. Two colours of paint, red and blue, span every purple you can mix from them, in every proportion, including pure red and pure blue. Yellow is not in the span — no amount of mixing gets you there. Adding yellow to your set does not merely add one colour; it opens up a whole new plane of mixtures. That jump is what a new independent direction does.
Proposition 5.22 (Redundant vectors can be dropped). If , then
Proof. The right side is contained in the left, since a combination of the first vectors is a combination of all with last coefficient . For the other direction write . Then
which lies in the right side.∎
In , testing membership in a span is a linear system, and this is the computational face of the whole chapter.
Method 5.23 (Testing membership in a span in ). To decide whether :
- Form the augmented matrix , the as columns.
- Row-reduce.
- If a row of the form with appears, the system is inconsistent and is not in the span. Otherwise it is, and any solution gives coefficients.
In other spaces the same idea works after translating to coordinates: a question about polynomials becomes a question about their coefficient lists, a question about matrices becomes a question about four-entry lists. That translation is made precise in the section on coordinates.
Example 5.24 (Span membership in ). Is in ?
Solution. Row-reduce the augmented matrix:
The system is consistent with , . Check: . Yes, is in the span.□
Example 5.25 (Spanning in a polynomial space). Does span ?
Solution. We must hit an arbitrary . Write
Two polynomials are equal exactly when their coefficients agree, so we need , , . Solving, , , — always solvable. So the three polynomials span .
Sanity check on : , , , and indeed .□
Example 5.26 (A span that misses). In , describe where is the matrix with a in position and zeros elsewhere. Is in it? Is ?
Solution. A combination is the diagonal matrix , so the span is exactly the set of diagonal matrices.
The identity is , so yes, it is in the span, with .
The matrix has a nonzero off-diagonal entry, and every element of the span has zeros off the diagonal, so it is not in the span. The span is a subspace of of dimension , sitting inside a space of dimension .□
Pitfall. "Span" is a set, not a number, and "spans" is a verb with a target. The sentence "these vectors span " is meaningless; either they span a specific space, or their span has dimension . Also: a set can span while being wildly redundant. Spanning says nothing about independence.
5.5Linear independence
Definition 5.27 (Linear independence). Vectors in are linearly independent if the only scalars with
are . Otherwise they are linearly dependent, and any choice of scalars not all zero satisfying the equation is called a dependence relation.
The definition is about the only solution being trivial. There is always the trivial solution; independence says there is no other. An equivalent formulation makes the meaning plainer.
Proposition 5.28 (Independence as unique representation). The vectors are independent if and only if every vector in their span is a linear combination of them in exactly one way.
Proof. Suppose they are independent and . Subtracting, , so every and the representations coincide. Conversely, if representations are unique then in particular has only the representation with all coefficients , which is independence.∎
Lemma 5.29 (Linear dependence lemma). Suppose are linearly dependent and . Then there is an index with
and removing from the list does not change the span.
Proof. Take a dependence relation with the not all zero, and let be the largest index with . If the relation reads with , forcing , contrary to hypothesis. So , and solving for ,
which puts in the span of its predecessors. The span is unchanged by the redundancy proposition of the previous section (applied after reordering so that comes last).∎
This lemma is the engine of the chapter: it is what turns any spanning set into a basis, and it is the inductive step in the exchange lemma. Note how it uses division by — the field again.
Some facts fall straight out of the definition. Any list containing is dependent, since together with zero coefficients elsewhere is a nontrivial relation. A single vector is independent exactly when . Two vectors are dependent exactly when one is a scalar multiple of the other. Any sublist of an independent list is independent, and any list containing a dependent sublist is dependent.
Intuition. Independence is the absence of redundancy in a set of instructions. "Go km east, then km north, then km northeast" is a redundant set of moves: the third is achievable with the first two, so you did not need it in your toolkit. If no instruction can be simulated by the others, the set is independent — each one buys you a genuinely new direction of travel.
Method 5.30 (Testing independence in ). Place the vectors as the columns of a matrix and row-reduce.
- Independent every column is a pivot column .
- If is square, independent .
- Any dependence relation is read off from a nonzero null-space vector.
Example 5.31 (Dependence in , with the relation). Are , , independent? If not, exhibit a dependence relation.
Solution. Row-reduce the matrix with these as columns:
Only two pivots, so the columns are dependent. The third column is free; setting gives , , so , i.e.
Check: ✓.□
Example 5.32 (Independence in ). Show that is linearly independent in , without appealing to coordinates.
Solution. Suppose as a function, i.e. for every real . Evaluate at three points:
From the first, . Adding the last two gives , so ; subtracting gives , so . All coefficients vanish, so the set is independent.
The evaluation trick generalises: a nonzero polynomial of degree has at most roots, so if it vanishes at distinct points it is the zero polynomial. That single fact proves independent in in one line.□
Example 5.33 (Independence of exponentials). Show is independent in .
Solution. Suppose for all . Two arguments, either suffices.
Evaluation. At : . At : . From the first , so , giving and then .
Growth. Divide by to get for all ; letting gives , and then forces .
Either way the only relation is trivial. The same growth argument shows is independent for distinct exponents — a fact that underlies the solution theory of linear differential equations.□
Remark (The Wronskian). For differentiable functions one can also differentiate the relation repeatedly to get a linear system with coefficient matrix the Wronskian
If for even one point , the only solution is and the functions are independent. For , the Wronskian at is , confirming the example. The converse fails: a vanishing Wronskian does not prove dependence.
Pitfall. Independence in a function space means the relation holds for every input, not at one convenient point. The functions and agree at and at , yet is independent — a relation must hold identically, and evaluating at and forces .
5.6Bases
Definition 5.34 (Basis). A list of vectors in is a basis of if it is linearly independent and spans .
Theorem 5.35 (Unique representation). is a basis of if and only if every can be written
for exactly one choice of scalars .
Proof. If is a basis, spanning gives at least one representation and independence gives at most one, by the unique-representation proposition. Conversely, existence of a representation for every is spanning, and uniqueness applied to gives independence.∎
This theorem is why a basis is called a coordinate system: choosing attaches to each vector an unambiguous list of numbers. A basis is simultaneously the smallest spanning set and the largest independent set, which the next two theorems make precise.
Here are the bases to memorise.
Notation (Standard bases).
- : the standard basis , where has a in slot and zeros elsewhere. Size .
- : the monomial basis . Size , not .
- : the matrix units , a single in position . Size .
- : the empty list. Size .
- , , : no finite basis exists; these spaces are infinite-dimensional.
Intuition. A basis is the shortest possible set of building blocks that still builds everything. Lego bricks of one shape can build a wall but not a roof — not spanning. Throwing in a duplicate shape adds nothing — not independent. A basis is the catalogue with no gaps and no duplicates, and the unique-representation theorem says the build instructions for any object are then unambiguous.
Theorem 5.36 (Spanning sets contain bases). Every finite spanning list of a vector space can be reduced to a basis of by deleting some (possibly no) of its vectors. Consequently every finite-dimensional vector space has a basis.
Proof. Let span . Run through the list from left to right. At step , delete if ; otherwise keep it. (In particular is deleted precisely when it is , since the span of the empty list is .)
Each deletion removes a vector lying in the span of the retained predecessors, so by the redundancy proposition the span of the retained list together with the not-yet-processed vectors is unchanged at every step. After the last step the retained list still spans .
The retained list is independent: if it were dependent, the linear dependence lemma would produce a retained vector lying in the span of the retained vectors before it — but such a vector was deleted, not retained. (The lemma applies because the first retained vector is nonzero.) So the retained list is an independent spanning list, i.e. a basis.∎
Theorem 5.37 (Every independent list extends to a basis). Let be finite-dimensional and let be linearly independent in . Then there are vectors such that is a basis of .
Proof. Since is finite-dimensional it has a finite spanning list . Consider the combined list
which certainly spans . Apply the reduction procedure of the previous theorem to it. No is ever deleted: at the moment is processed, the retained vectors are exactly , and if lay in their span the list would be dependent, contradicting independence. So the resulting basis contains all the together with some of the .∎
Example 5.38 (Reducing a spanning set). The list , , , spans a subspace of . Reduce it to a basis and give .
Solution. Process left to right. Keep , which is nonzero. Next, lies in the span of what is kept, so delete it. Next, is not a multiple of (look at the third coordinate), so keep it. Finally , so delete it.
Basis: , and .
Sanity check by the column method: put the four vectors as columns and row-reduce; the pivots land in columns and , agreeing with the vectors retained. is the plane through the origin spanned by these two vectors.□
Example 5.39 (Extending an independent set). Extend to a basis of .
Solution. Append the standard basis and reduce: consider .
Keep the first two (independent, as neither is a multiple of the other). Is in their span? A combination has third coordinate , so ; then the second coordinate is , and the first is . Not in the span — keep .
Now is in the span, so delete it. Likewise is in the span, so delete it. Finally has a nonzero fourth coordinate while everything kept so far has fourth coordinate , so keep it.
Basis: . Sanity check: four vectors in , and the matrix with these as columns has determinant .□
Example 5.40 (A basis for a matrix subspace). Find a basis for the space of symmetric real matrices and for the space of trace-zero real matrices.
Solution. A symmetric matrix is , so those three matrices span . They are independent: if the combination is the zero matrix, then reading off the , and entries gives . So .
A trace-zero matrix is , and the same entry-reading argument gives independence. So .
Sanity check: each space is cut out of the -dimensional space by one linear equation (; ), and one equation costs one dimension.□
Pitfall. has dimension , not . The basis has members because the constants count. This off-by-one is the most reliable source of lost marks in the subject.
5.7Dimension
Everything so far has quietly assumed that "the number of vectors in a basis" is a property of the space rather than of the basis. That needs proof, and the proof rests on one counting lemma.
Lemma 5.41 (Steinitz exchange lemma). In a vector space , suppose are linearly independent and span . Then .
Proof. We show by induction on that after reordering the 's, the list
spans . In particular at every stage, which for gives the claim.
The case is the hypothesis that the 's span. Suppose the statement holds for some . Then lies in the span of , so there is a relation
Not every can be zero: otherwise would be a combination of , contradicting the independence of the 's. In particular there is at least one left, so . Reorder so that and solve:
So lies in the span of ; adjoining it to that list therefore does not enlarge the span, and the enlarged list spans by the inductive hypothesis. Hence spans , completing the induction.∎
Read the lemma as a slogan: an independent list is never longer than a spanning list. Every counting theorem below is a corollary of that one sentence.
Theorem 5.42 (Dimension is well defined). Any two bases of a finite-dimensional vector space have the same number of vectors. That common number is the dimension .
Proof. Let and be bases with and . Since is independent and spans, the exchange lemma gives . Swapping the roles gives . Hence .∎
From the standard bases listed earlier we read off
and is as a complex vector space but as a real one — the field of scalars is part of the data, and the basis over shows why.
Corollary 5.43 (Counting shortcuts). Let . Then:
- any list of more than vectors in is dependent;
- any list of fewer than vectors fails to span ;
- an independent list of exactly vectors is a basis;
- a spanning list of exactly vectors is a basis.
Proof. (1) and (2) are the exchange lemma applied against a basis, which is both independent and spanning of size .
(3) Let be independent. Extend it to a basis by the extension theorem; the resulting basis has size by the dimension theorem, so nothing was added and the original list was already a basis.
(4) Let span . Reduce it to a basis by the reduction theorem; the resulting basis has size , so nothing was deleted.∎
Parts (3) and (4) are enormous labour-savers: to check that specific vectors form a basis of an -dimensional space, verify either independence or spanning, never both.
Theorem 5.44 (Dimension of a subspace). Let be finite-dimensional and a subspace of . Then is finite-dimensional, , and if and only if .
Proof. Any independent list in is an independent list in , so by the exchange lemma it has length at most . Build an independent list in greedily: start with the empty list and, as long as the current independent list does not span , pick outside its span; the extended list is still independent, because a relation involving with a nonzero coefficient would place in the span of the others. The process must stop after at most steps, and when it stops the list spans and is independent — a basis of of size at most . Hence is finite-dimensional with .
If the dimensions agree. Conversely if , take a basis of ; it is an independent list of vectors in , hence a basis of by the counting corollary, so .∎
The last clause deserves emphasis: a subspace of the same dimension is the whole space. It converts a dimension count into a set equality and is used constantly — for instance to prove two subspaces equal when one obviously sits inside the other.
This also finally justifies the classification of subspaces of : a subspace has dimension , , or , and these are the zero space, lines through the origin, planes through the origin, and itself. There is nothing else, and no counting was needed beyond the theorem above.
Theorem 5.45 (Dimension of a sum). If and are finite-dimensional subspaces of a vector space , then
Proof. Let be a basis of , so . Since is a subspace of , extend that list to a basis
of , so ; and extend it also to a basis of , so . We claim
is a basis of ; its length is , which is the formula.
Spanning. Any element of is ; expand in the basis of and in the basis of , and every term appearing is in .
Independence. Suppose
Set . Then , and also , so and therefore for some scalars . Comparing the two expressions for ,
a relation among the basis of ; hence every (and every ). The original relation now reads , a relation among a basis of , so all and vanish too.∎
Corollary 5.46 (Dimension of a direct sum). If the sum is direct then . Conversely, if are finite-dimensional and , the sum is direct.
Proof. Both directions follow from the formula: the sum is direct exactly when , which for finite-dimensional subspaces is exactly .∎
Intuition. The sum formula is inclusion–exclusion for dimensions. Two planes through the origin in each have dimension , and exceeds — so they must overlap in at least one dimension. They do: two distinct planes through the origin always meet in a line. The formula turns "counting twice" into a geometric prediction.
Example 5.47 (Two planes in ). In , let and . Compute , , and decide whether the sum is direct.
Solution. A vector of is and a vector of is . For these to coincide we need and , leaving . So and .
By the formula, . Indeed , which is -dimensional.
The sum is not direct, since the intersection is not trivial — equivalently .□
Example 5.48 (Forcing a nontrivial intersection). Let and be subspaces of with and . What is the smallest possible value of ?
Solution. is a subspace of , so . By the sum formula,
So the intersection has dimension at least , and this is attained: take and , whose intersection is . Minimum: .□
Example 5.49 (Dimension of a polynomial subspace). Let . Find .
Solution. is a subspace (the condition is linear and homogeneous). A polynomial of degree at most vanishing at factors as with , and conversely every such product lies in . The map therefore carries onto , and it sends the basis to
which span and are independent (their degrees are , so a nontrivial relation would have a nonzero leading coefficient in its top degree). Hence .
Sanity check: is cut out of the -dimensional space by one nontrivial linear condition, which costs exactly one dimension. And because , consistent with lying outside .□
5.8Coordinates and the coordinate isomorphism
Unique representation turns a basis into a dictionary between an abstract space and a concrete list of numbers.
Definition 5.50 (Coordinate vector). Let be a basis of over . For write , which by the unique-representation theorem determines the uniquely. The coordinate vector of relative to is
A basis is an ordered list precisely because coordinates are: reordering the basis permutes the entries of every coordinate vector.
Theorem 5.51 (The coordinate map is an isomorphism). Let be a basis of an -dimensional space over . The map , , is a bijection satisfying
Consequently : every -dimensional space over is a relabelled copy of .
Proof. Linearity: if and then , and by uniqueness this is the representation of , so its coordinate vector is the sum of the coordinate vectors. The same argument with gives the second identity.
Injective: if then ; combined with linearity, implies and so .
Surjective: given , the vector has exactly those coordinates.∎
Corollary 5.52 (Structure transfers through coordinates). With fixed, vectors are linearly independent if and only if their coordinate vectors are independent in ; they span if and only if their coordinate vectors span ; and if and only if .
Proof. carries the linear combination to , and only for . So a relation on one side corresponds to a relation on the other with the same coefficients, and a representation on one side to a representation on the other.∎
This is what the abstraction buys. Any question about independence, span, basis or dimension in any -dimensional space — polynomials, matrices, solutions of a differential equation — becomes, after a choice of basis, a question about columns of a matrix in , answerable by row reduction. No new machinery is ever needed.
Intuition. A basis is a language, and the coordinate map is a translator. The polynomial and the column are the same idea in two languages; the dictionary is the monomial basis. Switching to a different basis is switching to a different language about the same object, and the object does not change — only its spelling does.
Example 5.53 (Coordinates in a polynomial space). Find for relative to (a) the monomial basis and (b) the basis of .
Solution. (a) Immediate: .
(b) Solve . Comparing coefficients from the top down:
So .
Check: ✓. Note that the same vector has different coordinates in different bases; the coordinates are a property of the pair (vector, basis).□
Example 5.54 (Independence decided by coordinates). Are the matrices , , independent in ?
Solution. Use the basis , so that a matrix corresponds to the column of its entries read :
Look for a relation. Trying : the first entry gives , the third gives , and then the second entry is . So no such relation, and the general relation reduces by the first and third coordinates to , , and then the second coordinate gives , hence all .
The matrices are independent, and is a -dimensional subspace of the -dimensional space .□
Definition 5.55 (Change-of-coordinates matrix). Let and be bases of the same space . The change-of-coordinates matrix from to is the matrix
whose columns are the -coordinates of the -basis vectors.
Theorem 5.56 (Change of coordinates). For every ,
The matrix is invertible, with inverse .
Proof. Write with . Applying the coordinate map for and using its linearity,
which is exactly the matrix times the column .
For invertibility, the same identity with the roles of and swapped gives for every . As ranges over all of , the product fixes every column vector and is therefore .∎
Method 5.57 (Computing a change of coordinates in ). If and are bases of , let and be the matrices with those columns. Then , so
In practice, row-reduce to .
Example 5.58 (Changing basis in ). Let and be bases of . Find and use it to find for the vector with .
Solution. Express each -vector in . For : the second coordinate gives , so , and then , so . For : gives , then . Hence
Then
Sanity check directly: means ; and ✓. The coincidence that both coordinate vectors equal is an accident of these particular bases, not a general phenomenon.□
Pitfall. Read the arrow. takes -coordinates in and produces -coordinates out, and its columns are the -vectors written in . Building the matrix the other way round is the standard error; the cure is to check it on a single basis vector, where the answer must be a standard basis column.
5.9Column space, row space and null space
Every matrix carries three subspaces with it, and almost every question about a linear system is a question about one of them.
Definition 5.59 (The subspaces of a matrix). Let be an matrix over . Its
- column space ;
- row space ;
- null space .
Proposition 5.60 (All three are subspaces). is a subspace of ; and are subspaces of .
Proof. Column and row spaces are spans, hence subspaces by the span theorem. For the null space: , and if then by linearity of matrix multiplication. The one-step test applies.∎
The identity is worth unwinding, since it is the bridge between the two ways of reading a matrix: is by definition where are the columns, so the set of all is exactly the set of all combinations of columns. Two consequences are immediate and constantly used:
For the second: if then , and conversely adding a null vector to a solution gives another solution. So the full solution set of a consistent system is a single particular solution plus the whole null space — a translate of a subspace, which is why it is a subspace precisely when .
Intuition. Picture as a machine. The column space is the set of outputs the machine can actually produce — its reachable catalogue. The null space is the set of inputs it destroys, mapping them to nothing. A machine with a big null space is throwing information away; a machine whose null space is just keeps every distinction between its inputs.
Theorem 5.61 (Row operations preserve the row space and the null space). If is obtained from by elementary row operations, then and . The column space, by contrast, generally changes.
Proof. Each elementary operation replaces the rows of by linear combinations of them, so every row of lies in and hence ; since each operation is reversible by another elementary operation, the reverse inclusion holds too.
For the null space, row operations do not change the solution set of , which is the definition of — the operations correspond to left multiplication by an invertible matrix , and has the same solutions as .
That the column space changes is shown by an example: row-reduces to , and is the line while is the -axis. What is preserved is which columns are pivot columns, and hence the dimension of the column space, as the next theorem records.∎
Method 5.62 (Bases for the three subspaces). Row-reduce to an echelon form .
- Column space: take the columns of the original in the pivot positions. Never the columns of .
- Row space: take the nonzero rows of .
- Null space: solve , write the general solution with one free variable at a time, and read off the resulting vectors.
Proof. For the column space: the dependence relations among the columns are precisely the vectors of , and row reduction does not change ; so a set of columns of is independent exactly when the corresponding columns of are. In the pivot columns are independent and every non-pivot column is a combination of the pivot columns to its left. Transporting both facts back to shows the pivot columns of are independent and span .
For the row space: by the previous theorem, and the nonzero rows of an echelon matrix are independent — in any relation, look at the leftmost pivot position occurring among the rows with nonzero coefficient; only one row is nonzero in that column, so its coefficient must be , and induction finishes it.
For the null space: setting one free variable to and the others to produces vectors whose free-variable slots form the standard basis, so they are independent, and every solution is the corresponding combination of them.∎
Example 5.63 (All three subspaces of one matrix). For
find bases for , and , and their dimensions.
Solution. Row-reduce. Row minus row gives ; subtracting row makes it zero. Clearing above the second pivot:
Pivots in columns and , so .
: the original columns and , namely and . Dimension .
: the nonzero rows of , namely and . Dimension .
: column is free. With , the equations and give , so the solution is and is a basis. Dimension .
Check: has entries , , ✓. Also , the number of columns, as the Rank Theorem below demands.□
Example 5.64 (Reading a column space off a consistency question). For which is in the column space of ?
Solution. is the span of and . Asking whether lies in it is asking whether has a solution. The first two coordinates force and , and the third then reads .
So , and for any other the system is inconsistent. Geometrically is the plane in , and lies on it.□
Pitfall. A basis for comes from the columns of , but a basis for comes from the rows of the reduced matrix. The asymmetry is not arbitrary: row operations preserve the row space but move the column space, so the reduced rows are still in the row space while the reduced columns need not be in the column space.
5.10Rank, nullity and the four fundamental subspaces
Definition 5.65 (Rank and nullity). For an matrix , the rank is and the nullity is .
Theorem 5.66 (Rank Theorem). For any matrix ,
Proof. Row-reduce to an echelon form with pivots. By the basis recipe, , since the pivot columns of form a basis. Also by the recipe, equals the number of free variables, one basis vector per free column. Every one of the columns is either a pivot column or a free column, and never both, so , which is the claim.∎
Theorem 5.67 (Row rank equals column rank). For any matrix , ; equivalently .
Proof. Row-reduce to echelon form with pivots. The nonzero rows of form a basis of , and there are exactly of them, so . The pivot columns of form a basis of , and there are also exactly of them. Both dimensions equal the number of pivots, hence each other.∎
This is a genuinely surprising theorem. The row space and the column space usually live in different spaces — and — and consist of entirely different vectors; there is no reason from the outside that they should have the same dimension. The number of pivots is a single quantity that both computations happen to count, and the rank is best thought of as that number: the number of genuinely independent equations in the system, which is simultaneously the number of genuinely independent output directions.
Corollary 5.68 (The four fundamental subspaces). Let be of rank . Then
The row space and null space live in and their dimensions add to ; the column space and left null space live in and their dimensions add to .
Proof. The first three are the two previous theorems. For the fourth, apply the Rank Theorem to , which has columns: , and by the row-rank theorem.∎
Theorem 5.69 (Fundamental theorem of linear algebra, orthogonality part). For a real matrix ,
Proof. says exactly that each row of has dot product zero with , that is, is orthogonal to every row, hence (by bilinearity of the dot product) to every combination of rows. Conversely a vector orthogonal to all rows satisfies . So . Applying this to , whose rows are the columns of , gives the second identity.∎
Combined with the dimension count, this says and : each ambient space splits into a part the matrix handles faithfully and a part it annihilates. The orthogonality is developed properly in the chapter on orthogonality; the dimension bookkeeping above needs nothing beyond this chapter.
Intuition. A matrix of rank is, at bottom, an -dimensional machine wearing an costume. It takes an -dimensional input, immediately discards an -dimensional slice of it (the null space), passes the surviving dimensions through faithfully, and deposits them in an -dimensional slice of the -dimensional output space. Everything else in — the other dimensions — is simply unreachable.
Theorem 5.70 (The Invertible Matrix Theorem, extended). For an matrix the following are equivalent:
- is invertible;
- has only the trivial solution;
- the columns of are linearly independent;
- the columns of span ;
- the columns of form a basis of ;
- ;
- ;
- ;
- ;
- .
Proof. (2) (3) is the definition of independence applied to the columns, since is the combination of columns with coefficients . (2) (9) is the definition of nullity. (9) (8) is the Rank Theorem with columns. (8) (6): is a subspace of of dimension , and a subspace has full dimension if and only if it is the whole space. (6) (4) is the definition of the column space, and (3) with (4) is (5). (7) (8) by the row-rank theorem and the same full-dimension argument in . Finally (1) (2) and (1) (10) were proved in the chapters on matrix inverses and determinants.∎
Notice how much of that proof is pure dimension counting. The clause "a subspace of full dimension is the whole space" is used three times, and it is exactly the subspace-dimension theorem proved earlier in this chapter.
Example 5.71 (Rank and nullity from a shape). is a matrix whose null space has dimension . Find , , , and decide whether is consistent for every .
Solution. Rank Theorem with columns: .
, by row rank equals column rank.
Consistency for every would require , i.e. rank . The rank is , so is a -dimensional subspace of and there exist for which the system is inconsistent.□
Example 5.72 (Rank of a product and of an outer product). Let and be nonzero. What is , and what is the nullity of ?
Solution. The matrix is with -th column . Every column is a multiple of , so , giving . Since some and , some column is nonzero, so .
By the Rank Theorem the nullity is . Concretely, , which vanishes exactly when — the hyperplane orthogonal to , of dimension ✓.□
Example 5.73 (Using dimension to prove an equality of spaces). Let be with and let . Prove without computing anything, and deduce that has exactly one solution for every .
Solution. is a subspace of with . By the subspace-dimension theorem, a subspace of equal dimension is the whole space, so . Hence every lies in and the system is consistent.
For uniqueness, the Rank Theorem gives , so and any two solutions differ by a null vector, hence coincide. Exactly one solution for every — which is statement (1) of the Invertible Matrix Theorem in disguise.□
Summary. For an matrix of rank : and are subspaces of of dimensions and ; and are subspaces of of dimensions and . The system is consistent for all iff , and has at most one solution iff .
- Checking closure but not the zero vector, or vice versa. A subspace needs *and* closure under both operations. The fastest disqualifier is almost always the missing zero vector.
- Assuming a set with an addition is a vector space. All eight axioms must hold for the operations you were handed. Axiom 5, , is the one that fails in the deceptive examples, and the additive identity need not be the number .
- **Writing . ** It is : the basis has elements.
- Confusing spanning with independence. A spanning set may be redundant; an independent set may be too small. A basis is exactly both at once, and "I found independent vectors, so the dimension is " is only valid once you know they span, or once you know already.
- **Taking a basis for from the reduced matrix.** Use the pivot *positions* to select columns of the original . The row space is the opposite: use the nonzero rows of the reduced matrix.
- **Calling a direct sum without checking . ** And with three or more summands, pairwise trivial intersections are not enough.
- Forgetting that coordinates depend on the basis. is a statement about a pair, not about alone, and has the -vectors written in as its columns, not the other way round.
- Treating independence in a function space pointwise. must hold at every point of the domain; agreement at one convenient point proves nothing.
- Thinking a union of subspaces is a subspace. It is one only in the degenerate case where one contains the other.