Given a spanning set or a described subspace, the learner can extract or construct a basis, state the dimension with justification, compute the coordinates of a vector with respect to a stated basis, and decide whether a candidate set is a basis using the counting shortcut where it applies.
Orientation
A plane through the origin in can be described by any number of different pairs of vectors lying in it. Nothing about the plane picks one pair out.
What is fixed is the number two. No description of that plane ever needs three vectors, and none manages with one. The count belongs to the plane rather than to any way of writing it down, and that is what dimension means.
Getting there takes a definition, a set that spans and is independent, and one theorem, that any two such sets have the same size. The theorem is what makes dimension well defined, and once it is available, checking a candidate basis usually takes one test instead of two.
Figure
One plane spanned by two different bases
different bases, same span and same dimension
A plane through the origin in , drawn with two different pairs of vectors lying in it. Either pair spans the plane; neither is picked out by the plane itself.
That is the situation the definition has to handle. A basis is a choice, and there are infinitely many valid ones. What no choice can change is the number two: one vector spans only a line and cannot reach the whole plane, and any third vector in the plane is already a combination of the first two, so it adds nothing.
Dimension is that invariant count. The theorem that every basis of a space has the same size is what makes the word well defined, and this picture is the case where it is easiest to believe: the plane is two-dimensional no matter who describes it.
Definition
Two conditions pulling in opposite directions
The two conditions defining a basis are not two arbitrary requirements. They pull against each other, and a basis is where they meet.
Spanning wants
Independence wants
Direction of pressure
more vectors
fewer vectors
Failure mode
something unreachable
something redundant
Fix
add a vector
remove a vector
Adding any vector to a spanning set keeps it spanning; removing one may break it. Removing any vector from an independent set keeps it independent; adding one may break it. So a basis is simultaneously a minimal spanning set and a maximal independent set, and either description can be taken as the definition.
Why uniqueness of coordinates needs both. Suppose . Subtracting gives , and independence forces for every . Without independence a vector has many representations; without spanning some vector has none. Unique coordinates for every vector is exactly the conjunction.
Order matters for coordinates, not for the basis. A basis is a set, so and are the same basis. But the coordinate vector depends on which is listed first, so any use of coordinates fixes an order. The usual convention is to write a basis as an ordered list and treat the ordering as part of the data.
What a basis is not. It is not canonical: a space of dimension over an infinite field has infinitely many bases, and no theorem prefers one. The standard basis of is a convention, convenient because its coordinates are the entries themselves. For a subspace there is no standard basis at all, which is why extracting one is a task rather than a lookup.
Procedure
Extracting a basis, and finding coordinates
Extracting a basis from a spanning set in .
Write the vectors as the columns of a matrix.
Row reduce to reduced row echelon form.
Note which columns contain pivots.
The basis is the original vectors in the pivot positions.
Step 4 is where this goes wrong most often. The reduced matrix's columns are not the original vectors and generally do not lie in the same span; row operations preserve which columns are dependent on which, not the columns themselves. So the pivot positions are read off the reduced form and the vectors are taken from the original list.
The number of pivots is the dimension of the span, and each non-pivot column is a combination of the pivot columns to its left, with the coefficients readable from the reduced form, which is how an explicit dependence relation is obtained.
Finding a basis for a subspace described by equations. Solve the system, write the general solution in terms of the free variables, and collect the coefficient vector of each free variable. Those vectors are independent by construction, each has a 1 where the others have 0, and they span the solution set, so they form a basis. The dimension is the number of free variables.
Computing coordinates with respect to a basis . Solve , which in means row reducing the augmented matrix . The solution is unique when is a basis, which is the guarantee that makes the question well posed. Always reconstruct and check it equals : it is one multiplication and it catches every arithmetic slip.
The counting shortcut. When is already known and a candidate set has exactly elements, checking either independence or spanning suffices. The other follows. Independence is almost always the cheaper test, since it is one row reduction with no right-hand side. The shortcut is invalid if the count is wrong, or if the dimension was assumed rather than established.
In spaces that are not . Fix a basis, replace every vector by its coordinate list, and run the same procedures. A basis of turns polynomials into triples; a basis of the matrices turns matrices into quadruples. The computation is identical, and only the translation at each end is new.
Worked example
Extracting a basis, then coordinates
The set. In , take
and find a basis for .
Step 1: columns of a matrix.
Step 2: reduce. Subtracting twice row 1 from row 2 and row 1 from row 3, then clearing upward, gives
Step 3: pivots. Columns 1 and 3.
Step 4: the basis. The original vectors in those positions:
so the span has dimension 2. A plane through the origin in .
Column 2 of the reduced form is , meaning , and indeed . Column 4 is , meaning , and . Both redundant vectors are accounted for explicitly rather than merely discarded.
Notice the reduced matrix's own columns, and , are not in the span of the original vectors: every has third coordinate equal to its second minus its first plus something, and in particular fails -type membership tests the originals satisfy. This is why step 4 takes the original vectors.
---
Coordinates in a different basis. In take and find the coordinates of .
Solve :
So the coordinates are .
Check by reconstruction..
The same vector has coordinates in the standard basis and in . The vector did not change; the frame did.
---
A basis for a subspace given by an equation. Take , the plane from the vector-spaces unit.
Solving for : , with and free. The general element is
so spans . They are independent, neither is a multiple of the other, so they form a basis and .
That matches the earlier claim that , now with the number 2 attached and justified rather than observed.
A different basis for the same plane. Solving for instead gives with free, and the basis . Both vectors satisfy , they are independent, and there are two of them. Two different bases, the same plane, the same dimension, which is the theorem in the next block, seen in one instance.
Theorem
Every basis of a space has the same size
Exchange lemma. If is spanned by vectors, then any independent subset of has at most elements.
Proof sketch. Let span and let be independent. Since spans, is a combination of the , and some coefficient is nonzero because . Swap that out for : the new set still spans, since the discarded can be recovered from and the others. Repeat, introducing one at a time. At each stage the set still spans and still has elements.
If the process would exhaust every , leaving spanning , so would be a combination of them, contradicting independence. Hence .
Theorem. Any two bases of a finite-dimensional have the same number of elements.
Proof. Let have elements and have . spans and is independent, so by the lemma. spans and is independent, so . Therefore .
**This is what licenses the word dimension.** Without it, "the dimension of " would be a property of a chosen basis rather than of , and two people describing the same plane could disagree about whether it is two-dimensional. The theorem says they cannot.
The four consequences. For :
Any vectors are dependent. They would be an independent set exceeding the size of a spanning set of size .
No vectors span. A spanning set of size would cap independent sets at , contradicting the existence of a basis of size .
independent vectors span. If not, some lies outside their span, and adjoining it gives independent vectors, impossible.
spanning vectors are independent. If not, one is redundant and can be removed, leaving vectors that span, impossible.
The last two are the counting shortcut. Each converts a count plus one condition into a full basis verification, and each is a direct consequence of the theorem rather than a separate fact to remember.
Where the argument stops. Everything above assumes some spanning set is finite. In the space of all polynomials, is independent and infinite, no finite set spans, and no counting argument applies, which is what infinite-dimensional means, and why theorems about finite dimension must say so.
Example
Dimensions away from
Polynomials., of degree at most , has basis and dimension . Note the off-by-one: is three-dimensional, because the constant term is a coordinate like any other.
A different basis of is . To find the coordinates of in it, solve
Matching coefficients from the top: from ; then gives ; then gives . So the coordinates are .
Checking: .
The same polynomial has coordinates in the standard basis and in this one.
Matrices. has basis , the matrices with a single 1, and dimension 4.
The symmetric matrices form a subspace with basis
of dimension 3. The constraint removes exactly one degree of freedom from four. In that basis has coordinates , reading the diagonal entries and then the shared off-diagonal one.
Solutions of a differential equation. The real solutions of form a vector space with basis and dimension 2. This is why a general solution is written with two arbitrary constants: the count of constants is the dimension, and a second-order linear equation has a two-dimensional solution space.
Functions, in general. The real-valued functions on have no finite basis. Neither do all polynomials, where is independent and infinite. Dimension as a number is a finite-dimensional notion, and most function spaces of analytical interest fall outside it.
The common thread. In every finite case the dimension counts degrees of freedom: coefficients you may choose independently. Three for a quadratic, four for a matrix, three when symmetry ties two entries together, two for the arbitrary constants of a second-order equation.
Non-example
Four ways a basis argument fails
Taking the reduced columns as the basis. After reducing to find pivots in columns 1 and 3, the learner reports the reduced matrix's columns and . Row operations change the columns; they preserve only which columns depend on which. The answer must be the original vectors in the pivot positions, and the reduced columns generally do not lie in the span at all.
Concluding a basis from independence alone. "These two vectors in are independent, so they are a basis of ." Independence caps the count; it does not reach it. Two independent vectors in a three-dimensional space span a plane, and the shortcut applies only when the number of vectors equals the known dimension.
Using the shortcut with an assumed dimension. " looks two-dimensional, and here are two independent vectors in it, so they are a basis." The count-plus-one-condition rule needs the dimension established beforehand. If were three-dimensional the two vectors would span only a proper subspace, and nothing in the argument would have detected it.
Treating coordinates as intrinsic. "The vector is ." A coordinate list means nothing without its basis: in the standard basis and in name the same vector. Reporting coordinates without naming the basis, or comparing coordinates computed in different bases, produces statements that cannot be checked.
What unites them. The first is a procedural slip with a conceptual cause: not knowing what row reduction preserves. The middle two mistake a necessary condition for a sufficient one. The last forgets that coordinates are a description relative to a choice, which is the same observation that makes change of basis a subject at all.