A dependent set of vectors describes its span wastefully, and removing the waste leaves something whose size turns out not to depend on how the removing was done.
The previous lesson defined the span of a set of vectors as everything reachable from it by adding and scaling, and defined independence as the absence of redundancy. This lesson names the objects those spans are, gives each one a minimal description, and proves that any two minimal descriptions have the same length.
Subspaces
A subspace of is a non-empty set of vectors that is closed under both operations: if and are in then so is , and if is in then so is for every scalar . Those two conditions are all of it, and they immediately force a third: taking shows every subspace contains .
The point of the definition is that a subspace is a place where the whole of linear algebra still works. You cannot fall out of it by doing arithmetic, so it can be treated as a small vector space in its own right.
Some sets qualify and some do not, and the failures are more instructive. The line through the origin in the direction is a subspace: multiples of add to multiples of . The line is not, since it misses the origin, and also because and are on it while their sum is not. The first quadrant, all with and , is closed under addition but not under scaling, since times leaves it, and that single failure disqualifies it. The set of vectors of length at most one fails for the same reason: doubling escapes it. Curved sets and bounded sets are never subspaces, and neither is anything that avoids the origin.
Two families of subspaces matter, and they will turn out to be the same family. First, every span is a subspace, directly from the definition, since a combination of combinations is a combination. Second, the solution set of a homogeneous system, one whose right hand side is , is a subspace: if and both satisfy every equation with zero on the right, so does and so does , because each equation is built from adding and scaling. That is why homogeneous systems behave so much better than inhomogeneous ones, and why the solution set of is a plane through the origin while the solution set of is a parallel plane that is not a subspace at all.
Example. Is the set of with a subspace of ?
Yes. If and both satisfy it, then adding the two equations shows the componentwise sum satisfies it too, and multiplying one equation by shows times a solution is a solution. The set is the solution set of a homogeneous equation, so it is a plane through the origin.
Now you. Is the set of with , that is, the two coordinate axes together, a subspace of ?
Answer
No. It is closed under scaling, since scaling a point on an axis keeps it on that axis, but not under addition: and are both in the set while is not, because . Closure under both operations is required, and a set can pass one test and fail the other.
Basis
A basis of a subspace is a set of vectors that is independent and spans . The two requirements pull in opposite directions and meet in the middle: spanning demands enough vectors to reach everything, independence forbids any that are not needed. A basis is therefore a description of with nothing missing and nothing wasted.
The standard basis of is , and so on. It spans because , and it is independent because that same combination is zero only when every is zero. It is the basis that ordinary coordinates use, and its dominance is a convention rather than a fact about space, which is exactly the point of a later lesson.
Other bases of the same space are everywhere. In , the pair and is a basis: independent, since neither is a multiple of the other, and spanning, since any is . So is and . There are infinitely many bases of the plane, and no reason internal to the mathematics to prefer one.
The property that makes a basis worth having is uniqueness of coordinates. If is a basis of , every vector in can be written as a combination of them in exactly one way. Existence is the spanning half. Uniqueness comes from independence: suppose and also . Subtracting gives , and independence forces every coefficient to vanish, so for each . The two representations were the same one.
Those unique numbers are the coordinates of with respect to the basis. Ordinary coordinates are the special case where the basis is the standard one, and the familiar statement that a point in the plane is a pair of numbers is really the statement that the plane has a basis of size two.
Example. Find a basis for the plane and give its dimension.
Solve the equation: is determined once and are chosen, since . Taking , gives , and taking , gives . Both satisfy the equation: and . Every solution is , so they span, and neither is a multiple of the other, so they are independent. The plane has a basis of two vectors.
Now you. Find a basis for the set of in which all three components are equal.
Answer
Such a vector is , so the single vector spans the set, and one non-zero vector is always independent. The basis is and the set is a line through the origin.
Dimension is well defined
Both bases of the plane given above have two elements, and both bases in the examples had the size the geometry suggested. That is not luck, and it needs proof, because a basis is a choice and there are infinitely many choices available.
Claim. If a subspace is spanned by vectors, then any vectors in are dependent.
The proof reuses the counting argument from the previous lesson. Let span , and take any in . Each is a combination of the , say with coefficients . Now ask for a dependence, . Substituting and collecting the terms belonging to each , the combination equals whenever every one of the quantities is zero. That is a homogeneous system of equations in unknowns. Elimination pins down at most unknowns, so at least one is free, and choosing it non-zero gives a non-trivial solution. The are dependent.
The consequence is immediate. If and are both bases of , with and elements, then spans and is independent, so by the claim, and reversing the roles gives . Hence : every basis of has the same number of elements, and that number is the dimension of , written .
Dimension is now a fact about the space rather than about anyone's description of it. A line through the origin has dimension one, a plane through the origin has dimension two, has dimension because the standard basis has elements, and the subspace has dimension zero, its basis being the empty set.
Spaces that are not arrows
Nothing in the definitions of subspace, basis and dimension mentioned arrows or coordinates. They used addition, scalar multiplication and the eight rules, so they apply verbatim to every vector space, and the useful ones are frequently not sets of arrows at all.
The polynomials of degree at most five form a vector space: adding two of them gives another, scaling one gives another, and the zero polynomial is the zero vector. A basis is , since every such polynomial is a unique combination of these, so the dimension is six, one more than the degree. The coordinates of in that basis are , which is exactly the list of coefficients: a polynomial is a vector whose components happen to be written next to powers of .
The two by two matrices form a four-dimensional space, with a basis of the four matrices having a single entry equal to one. This is worth noticing because it means matrices are themselves vectors, and any statement proved about spans and independence applies to a collection of matrices.
The solutions of a differential equation like form a vector space, since a sum of solutions solves it and so does a multiple. A basis is and , so the dimension is two, and that is the real reason a second order equation carries exactly two arbitrary constants: the solution set is a two-dimensional subspace of the space of functions, and the constants are coordinates in it. The same idea explains the phrase "general solution" in every differential equations course.
Example. What is the dimension of the space of polynomials of degree at most three that vanish at ?
The full space has dimension four, with basis . Vanishing at zero means the constant term is zero, which removes exactly one basis element, leaving . Those three are independent and span the set, so the dimension is three. Note the pattern: one linear condition removed one dimension, exactly as one equation cut down to a plane.
Now you. Is the set of polynomials of degree at most three with a subspace, and if so what is its dimension?
Answer
It is a subspace: if and then and . The condition is one linear equation on the four coefficients, so it removes one dimension, leaving three. A basis is , and , each of which vanishes at .
Trimming and extending
Two workhorse facts follow, and both are proved by the same move.
Every spanning set contains a basis. If a spanning set is dependent, one of its vectors is a combination of the others, so deleting it leaves the span unchanged. Repeat. The set is finite, so the process stops, and it stops exactly when no vector is redundant, which is independence.
Every independent set in can be extended to a basis of . If an independent set does not yet span , some in is out of reach, and adding it keeps the set independent, since a dependence involving would express in terms of the others and put it in reach. Repeat. By the claim above the set can never exceed elements, so the process stops, and it stops exactly when the set spans.
Together these give a useful shortcut: in a space of dimension , any independent vectors automatically span, and any vectors that span are automatically independent. Once the count is right, one of the two conditions is enough to check.
Example. Express in the basis , of the plane .
First check the vector belongs there: , so it does. Solve . The second component gives , so ; the third gives , so ; and the first is then the check, . The coordinates are , so a vector with three ordinary components has just two coordinates in this basis, which is the dimension of the plane it lives in.
Now you. Express in the basis , of .
Answer
Solving and gives and . Check: . The same arrow that has standard coordinates has coordinates here, and nothing about the arrow changed.
Honest limits
Coordinates depend entirely on the basis, and a vector does not carry its coordinates around with it. The last example is the whole warning: and are the same arrow described by two people using different rulers. Software and textbooks alike suppress the basis because it is almost always the standard one, and the suppression becomes a bug the moment two bases are in play, which is what the lesson on change of basis is about.
The theory above assumes a finite spanning set exists. Spaces without one, such as all continuous functions on an interval, are infinite-dimensional, and there the word basis is used in a weaker sense involving convergent infinite sums, which needs analysis rather than algebra. Fourier series are that theory in action, and nothing in this course applies to them without care.
Finally, dimension is exact and discontinuous. Three vectors that lie in a plane span a two-dimensional space; nudge one of them by out of the plane and the span is suddenly all of , though it is a very thin sort of three dimensions. Numerical work replaces dimension with a threshold on how thin, which the lesson on rank returns to.
There are objects, there are coordinates, and there is a well-defined notion of size. What is entirely missing is anything that moves: so far every vector has sat still. The next lesson introduces maps that respect both operations, and finds that such a map is completely pinned down by what it does to a basis.