A spanning list represents every vector in a space, but a dependent list can give several coefficient lists for the same vector. Requiring independence as well as spanning makes each representation unique. A basis combines these two conditions.
Definition 3.5.1
(Basis)
A set of vectors is a basis for a vector space if both conditions hold:
- are linearly independent.
- .
Here the scalars are real and the displayed bases are finite. Fixing an order gives unique coordinates: spanning provides an expression for , and if , subtraction gives . Independence forces for every . Thus existence and uniqueness come from different parts of the definition.
Spanning and independence answer different questions
The two basis conditions do different jobs: spanning supplies every target, while independence removes redundant representations. Dimension records the common size of a basis; the counting proof comes next.
Compare a pair of scalar-multiple generators with an independent pair, and identify the span in each case.
The standard basis is the model example
The first basis most students meet is the standard basis of :
These vectors are important because each one isolates one coordinate direction.
Worked example 3.5.2
(Why the standard basis of really is a basis)
To show that is a basis for , you must check the two basis conditions.
First, they span . If
then
So every vector in can be built from .
Second, they are linearly independent. If
then comparing coordinates gives
So the only linear relation is the trivial one.
Since both conditions hold, is a basis for .
Once the standard basis is fixed, the coefficients , , and rebuild the vector uniquely.
Finite models beyond coordinate columns
A vector space is a set with addition and scalar multiplication satisfying the usual abelian-group and distributive axioms over a field . Columns are one model. Polynomials of degree at most , denoted , and linear maps between spaces are others. The zero polynomial is included in although its degree is not ordinarily defined.
A subspace contains zero and is closed under sums and scalar multiples. A list spans if every vector is a linear combination of its entries; it is independent if only the zero coefficients give zero. A basis is both. A finite spanning list can be reduced to a basis by deleting dependent entries; an independent list can be extended to a basis by adding vectors outside its span until the given finite spanning list is spanned.
Exchange lemma. An independent list of vectors in the span of vectors has . To see this, express the first independent vector in the spanning list, use a nonzero coefficient to replace one spanning vector by it, and repeat. At each stage independence ensures the next independent vector has a nonzero coefficient on an as-yet unreplaced spanning vector. There must be at least such slots. Comparing two bases in both directions proves that their lengths agree; this common length is .
Consequently, in dimension , any independent vectors form a basis, as do any spanning vectors. Counting a list is useful only after its independence or spanning has been justified.
Standard finite models and the polynomial boundary
Here is a nonnegative integer and are positive integers. For , consists of the empty tuple and its standard basis is empty.
For , let have entry one at position and zero elsewhere. Every equals , and a zero combination has each coefficient zero by its corresponding entry. Thus these vectors form a basis and .
For real matrices, let have a single one in position . Every matrix equals . The entry of a zero combination is its coefficient on , so the matrices are independent as well as spanning. Therefore .
For , , use the usual equality of polynomial coefficients. Every polynomial is uniquely ; hence spans and is independent, and . For any finite list of arbitrary real polynomials, choose a common nonnegative degree bound , also allowing the zero polynomial. Every combination has no term above degree , whereas does. Thus no finite list spans the space of all real polynomials. Here “infinite-dimensional” means precisely the absence of a finite spanning list; no infinite-basis theorem is being asserted.
Finite basis existence and extension, without a counting assumption
Let be a real vector space supplied with a finite spanning list . First prove that every independent list has length at most . After insertions, maintain a spanning list consisting of and surviving old vectors. Expand in this list. Some coefficient on a surviving old vector is nonzero; otherwise would be in the span of the earlier , contradicting independence. Solve for that old vector and replace it by . The new list spans the same space and keeps every earlier insertion. If , after steps the first independent vectors already span , contradicting independence of . This proves the bound, including .
Every subspace has a finite basis. Start with the empty independent list. If its current span is not , choose one vector of outside that span. A relation with nonzero coefficient on the new vector would express it in the old span, so the enlarged list remains independent. The proved bound permits at most additions; therefore the process stops with an independent spanning list for . If , it stops immediately with the empty basis. Starting instead with any given independent list in proves that list extends to a basis of . Only a bounded finite selection is used. Finally, if two bases have sizes , use each as the finite spanning list in the bound to obtain and . Thus basis size, called dimension, is well-defined. This supplies the existence, extension and dimension facts used in rank–nullity.
Why the number of basis vectors matters
Different bases can use different vectors. To define dimension, we must first show that their lengths cannot differ:
Theorem 3.5.3
(Every basis of the same space has the same size)
If and are finite bases of the same real vector space , then they contain the same number of vectors.
This statement is what makes dimension well-defined. Without it, the phrase "the number of vectors in a basis" would depend on which basis you picked, and dimension would not be a stable idea.
The reason behind the theorem is the following counting principle.
Theorem 3.5.4
(Too many vectors in a spanned space force dependence)
Suppose spans a vector space . Then any collection of more than vectors in is linearly dependent.
Proof
(Count coefficients before defining dimension)
The goal is to produce a nontrivial relation among vectors , using only the fact that vectors span . Write
The coefficient matrix has rows and columns. Elimination gives at most pivots, so the homogeneous system has a free variable and a nonzero solution . For that solution,
This is the required nontrivial relation. We imposed the coefficient equations as a sufficient condition for the vector sum to vanish. We did not assume the spanning vectors were independent, so we must not infer conversely that every vanishing sum has zero coefficients relative to that list. When , the span is the zero space and any nonempty list in it contains only zero vectors, hence is dependent directly.
Now let the two finite bases have sizes . The first spans and the second is independent, so . Interchanging their roles gives , hence . This uses the earlier homogeneous-system theorem, not dimension itself; therefore defining dimension by basis size is not circular.
Dimension is a count of independent directions
Definition 3.5.5
(Dimension)
The dimension of a vector space , written , is the number of vectors in any basis of .
Dimension tells you how many genuinely independent directions the space has.
- the space of all real polynomials has infinite dimension, because no finite list can span all powers .
The zero space is the exceptional case:
Its basis is the empty list: its only linear combination is the empty sum, defined as zero, and it has no nontrivial coefficient relation. The singleton spans the zero space but is dependent, so it is not a basis.
A subspace has its own dimension
A vector can have three entries while belonging to a space with only two independent directions. The next example separates the ambient coordinate count from the dimension of the subspace.
Worked example 3.5.6
(A basis for a plane inside )
Let
This is the plane inside .
Consider
Every vector in has the form
so and span .
They are also linearly independent, because
forces .
Therefore is a basis for , and
So dimension does not count how many entries a vector happens to have. It counts how many independent directions the space itself contains.
Finite basis counting in a real vector space
Let be a real vector space with a finite basis of length . All lists below are finite. The span of the empty list is the zero space, using the empty sum as zero.
First recall the coefficient counting argument, which does not require the spanning list to be independent. If span and with , choose coefficients such that . The matrix has at most pivots, so has a nonzero solution. Then
Thus the are dependent. When , every is zero and a nonempty list is dependent directly. In particular, no independent list in has length greater than .
If an independent list does not span , choose outside its span. In a relation , a nonzero would express as a combination of the . Hence , and independence gives all . Appending therefore preserves independence. A list of independent vectors must already span: otherwise this construction would give independent vectors, contradicting the preceding bound. Starting with any independent list and appending outside vectors must stop by length ; stopping means spanning, so the final list is a basis retaining the original list.
Conversely, suppose a list of vectors spans . If it were dependent, choose a nontrivial zero relation and an index whose coefficient is nonzero. Solve for that vector and delete it. Substitution shows that the remaining vectors still span . The original basis of length would then be dependent by coefficient counting, a contradiction. Thus the list is independent and is a basis. More generally, repeatedly deleting a vector at a nonzero position in a dependence relation preserves the span and strictly shortens a finite spanning list. The procedure stops with an independent spanning list. For a singleton zero list, deletion leaves the empty list and its span is still the zero space.
These arguments prove both dimension shortcuts and the extension and reduction assertions for an arbitrary finite-dimensional real ; no ambient-coordinate realization of is required. Fewer than vectors cannot span, since the given basis would contradict coefficient counting for such a list.
They also give the subspace assertion without assuming in advance that a subspace has a basis. For a subspace, start with the empty independent list and append vectors of outside the current span. The same bound forces termination, producing a basis of with at most members. Hence . If equality holds, that basis of is an independent list of length in , so it spans and . The converse is immediate.
How dimension becomes a shortcut
Once you know the dimension of a space, many basis questions become shorter.
If , then:
- any linearly independent vectors in automatically form a basis;
- any vectors in that span automatically form a basis;
- fewer than vectors cannot span ;
- more than vectors cannot all remain linearly independent.
This is why dimension is powerful. It turns a long two-part basis test into a one-part check when the number of vectors already matches the dimension.
A useful way to package the shortcut is the following three-way criterion. Suppose are vectors in a subspace . Consider the three statements:
- .
- are linearly independent.
- .
If any two of these statements are true, then the third is automatically true, and is a basis for .
This is often the cleanest way to write a solution. Instead of proving both independence and spanning from scratch, you first identify the dimension and then prove whichever of independence or spanning is easier.
Worked example 3.5.7
(Using dimension to avoid a second calculation in )
Let
We want to show that these three vectors form a basis for .
First test linear independence. The equation
has coefficient matrix
Row reduction gives an echelon form with a pivot in every column, for example
Therefore the homogeneous equation has only the trivial solution, and are linearly independent.
Since , three linearly independent vectors in automatically span . Hence the vectors form a basis. The point is that the spanning part is not ignored; it is supplied by the dimension theorem.
A nontrivial zero relation detects redundancy in the given list.
Extending and reducing lists
Theorem 3.5.8
(Extension and reduction consequences)
If , then:
- no set of fewer than vectors can span ;
- every linearly independent set with fewer than vectors can be extended to a basis of ;
- every spanning set with more than vectors can be reduced to a basis of by deleting redundant vectors.
A basis is also an inclusion-minimal spanning set: deleting any member loses spanning, since otherwise that member would be a combination of the others. Conversely, a dependent spanning list can be shortened by the redundancy theorem. A basis is inclusion-maximal among independent lists inside : every further vector already lies in its span. Conversely, if an independent list does not span , appending a vector outside its span preserves independence. These are inclusion statements, not merely guesses from list length.
For reduction, the deletion procedure terminates directly for a finite spanning list. If the original spanning set is infinite, first express each member of a fixed finite basis using finitely many members of that set. The union of those finitely many finite supports is a finite spanning subset. Delete redundant vectors from that subset until it is independent, and retain this basis from the original set. Thus no infinite deletion algorithm or closure under infinite sums is being assumed.
Null spaces: a rank-nullity basis test
The nullity formula below is already proved by the free-coordinate basis construction. There is the number of coefficient pivots; the later column-space chapter identifies that count with the image dimension. Thus this calculation does not assume the abstract rank–nullity theorem before its proof.
For a homogeneous system, the dimension shortcut becomes especially concrete. Let be a matrix with rank . Then
An RREF with pivots has free coordinates. Setting one free coordinate to one and the others to zero gives one null-space vector for each free coordinate. Every solution is their combination, and their free coordinates force the coefficients of any zero combination to vanish. This gives the dimension formula, including the empty basis when . Here rank is the pivot count; 3.6 Column space, row space, and rank identifies it with the dimensions of the row and column spaces.
So vectors form a basis for exactly when all three checks hold:
- each vector is actually in the null space, so ;
- the number of proposed vectors is correct, so ;
- the proposed vectors are linearly independent.
This avoids proving the full set equality directly.
Worked example 3.5.9
(Testing a proposed basis for a null space)
Let
and
First check membership. Direct multiplication gives and , so both vectors lie in .
Next compute the dimension of . A row-reduced form of is
so . Since has four columns,
Finally check independence. Put the proposed vectors into a matrix:
Row reduction gives a pivot in each column, so are linearly independent. We now have membership, the correct dimension count, and independence. Therefore form a basis for .
The failure modes are just as important:
- if some does not satisfy , the list cannot be a basis for ;
- if the list has fewer or more than vectors, the size is wrong;
- if the list has the correct size but is dependent, it still fails to be a basis.
Extracting a minimal spanning set
Sometimes the input is not a clean proposed basis. You may be given a long list of vectors and asked for the dimension of its span. The efficient method is to extract a basis from the original list.
Theorem 3.5.10
(Pivot columns give a minimal spanning set)
Let
Row-reduce . If the pivot columns of the reduced matrix occur in positions , then
is a basis for , and .
The positions are read from a row-reduced form, but the basis vectors themselves come from the original list. This is the same rule used for column space.
Worked example 3.5.11
(Extracting a basis from a generating list)
Let , where
Put the vectors into the columns of :
The pivot columns are columns and , so
is a basis for , and . The non-pivot column also tells us the redundancy relation:
Subspaces with the same dimension
Dimension also controls when one subspace can equal another. Suppose is finite-dimensional, is a subspace of , and both use the same real scalars. Then
Moreover,
The containment hypothesis matters. Equal dimension alone does not force two subspaces to be equal. For example, two different lines through the origin in both have dimension 1, but neither line contains the other. The theorem applies when one subspace is already known to sit inside the other.
To see the equality implication, take a basis of . It is an independent list inside of size , so the dimension criterion makes it a basis of too. Its span is both spaces. The finite-dimensional hypothesis is necessary for this counting argument; the earlier infinite polynomial space does not license extending this criterion to arbitrary infinite-dimensional inclusions.
Worked example 3.5.12
(Using dimension to prove equality of subspaces)
Let
and let
Every vector in has third coordinate zero, so . We also know from the earlier plane example that . Since the two displayed generators of are linearly independent, as well.
Thus is a subspace of and both have dimension 2. The comparable-subspace theorem gives .
Common mistake
Common mistake
(Dimension is not just the number of coordinates)
A subspace of can have dimension 0, 1, 2, or 3. The ambient space tells you how many entries vectors have; the dimension tells you how many independent directions the subspace itself has.
Another common mistake is to check spanning and stop there. A spanning set can still fail to be a basis if one vector is redundant.
Quick checks
Quick check
(Can be a basis for ?)
Think about both basis conditions, not just the number of vectors.
Solution · Answer
No. The two vectors point in the same direction, so they are linearly dependent. They also fail to span the vertical direction. Therefore they are not a basis for .
Quick check
(Suppose and you already found three linearly independent vectors in . What remains to prove?)
Use the dimension shortcut from this note.
Solution · Answer
Nothing essential remains. In a 3-dimensional space, any three linearly independent vectors automatically form a basis, so they already span .
Exercises
Quick check
(Do the vectors , , and form a basis for ?)
Try to test independence first. If they are independent, dimension does the rest.
Solution · Guided solution
Set
Comparing coordinates gives
Subtract the first two equations to get , so . Then the third equation becomes , so , and therefore too.
So the three vectors are linearly independent. Because has dimension 3, they automatically form a basis for .
Prerequisites
This note depends on 3.4 Linear dependence and independence and 3.3 Linear combinations and span.
Prerequisite proof routes
The following sections record, for each prerequisite result used above, where its proof is given.
Proof of the finite real matrix product laws
The associative, distributive and scalar laws for compatible finite real matrices are proved in 2.1 Matrix multiplication, with the size and scalar hypotheses stated there.
Finite elimination terminates and preserves the solution set
That finite elimination with nonzero pivots terminates and preserves the solution set is proved in 1.4 Gaussian elimination and RREF.
Classification and the homogeneous freedom
The classification of real systems, with the right-hand side transformed together with the coefficients, is proved in 1.5 Solution-set types.
The corresponding inverse criterion for square matrices is proved in 2.3 Invertible matrices, using elementary-matrix inverses and coefficient pivots; it does not use determinants.
Further study
Counterexample mode
The two-of-three criterion needs the vectors to lie in the subspace
The three-way criterion in the section on dimension as a shortcut is stated for vectors that lie in . Without that hypothesis, statements 1 and 2 can hold while statement 3 fails. Let
The plane example gives , so statement 1 holds with . The combination is zero only when , so statement 2 holds. But , because its third entry is , and every vector of has the form , so is not in the span. Statement 3 fails, and the span is not even contained in . The proof that independent vectors span breaks at the counting step: appending gives three independent vectors, but they do not all lie in , so the bound does not apply to them; they lie in , where three independent vectors are allowed. Replacing by restores the hypothesis, and the criterion then correctly gives a basis of .