Basis And Dimension: Formula, Rules & Examples

Basis and dimension describe the independent directions needed to build every vector in a vector space.
A basis is a set of vectors that is both:
linearly independent
and:
spanning
The dimension of a finite-dimensional vector space is the number of vectors in any basis for that space.
For example, the standard basis of:
R²
is:
e₁ = (1,0)
e₂ = (0,1)
Every vector:
(x,y)
can be written uniquely as:
(x,y) = x(1,0) + y(0,1)
Therefore:
dim(R²) = 2
Likewise:
R³
has dimension 3 because three independent coordinate directions are required to represent every vector in the space.
What Is a Basis?
A basis is a collection of vectors that contains exactly enough independent information to generate the entire vector space.
For a set:
B = {v₁,v₂,…,vₙ}
to be a basis of vector space V, two conditions must hold.
First:
span(B) = V
Second:
v₁,v₂,…,vₙ are linearly independent
If either condition fails, the set is not a basis.
What Does Span Mean?
The span of vectors:
v₁,v₂,…,vₙ
is the set of all their linear combinations:
c₁v₁ + c₂v₂ + … + cₙvₙ
where the coefficients:
c₁,c₂,…,cₙ
come from the underlying scalar field.
For example, in:
R²
the vectors:
(1,0)
and:
(0,1)
span the entire plane because:
(x,y) = x(1,0)+y(0,1)
for every real pair (x,y).
What Does Linear Independence Mean?
Vectors:
v₁,v₂,…,vₙ
are linearly independent if:
c₁v₁+c₂v₂+…+cₙvₙ = 0
implies:
c₁=c₂=…=cₙ=0
The only way to produce the zero vector must be the trivial combination.
If some nonzero coefficients also produce zero, the vectors are linearly dependent.
Basis Formula
There is no single arithmetic formula that generates every basis. Instead, the defining conditions are:
Span{v₁,…,vₙ} = V
and:
c₁v₁+…+cₙvₙ=0 ⇒ c₁=…=cₙ=0
When both are true:
B={v₁,…,vₙ} is a basis of V
For finite-dimensional V:
dim(V) = number of vectors in a basis
Standard Basis of R²
The standard basis is:
e₁=(1,0)
e₂=(0,1)
Any vector:
v=(a,b)
can be written:
v = ae₁ + be₂
For example:
(4,-3)
becomes:
4(1,0) – 3(0,1)
Therefore the two standard basis vectors span R².
They are also independent.
So:
dim(R²)=2
Standard Basis of R³
The standard basis is:
e₁=(1,0,0)
e₂=(0,1,0)
e₃=(0,0,1)
Any vector:
(a,b,c)
has representation:
ae₁+be₂+ce₃
Therefore:
dim(R³)=3
The three coordinate directions are independent and span the full three-dimensional space.
Basis Does Not Have to Be the Standard Basis
Consider:
v₁=(1,1)
v₂=(1,-1)
These vectors are not the standard coordinate vectors, but they can still form a basis of:
R²
Check independence:
c₁(1,1)+c₂(1,-1)=(0,0)
This gives:
c₁+c₂=0
c₁-c₂=0
Adding:
2c₁=0
so:
c₁=0
and therefore:
c₂=0
They are independent.
Two independent vectors in R² automatically span R².
Therefore:
{(1,1),(1,-1)} is a basis of R²
Coordinates Depend on the Basis
A vector has different coordinate representations under different bases.
Consider:
v=(4,2)
with basis:
B={(1,1),(1,-1)}
Find:
a(1,1)+b(1,-1)=(4,2)
This gives:
a+b=4
a-b=2
Add:
2a=6
so:
a=3
Then:
b=1
Therefore the coordinates of v relative to B are:
[v]B = (3,1)
even though its standard coordinates are:
(4,2)
The vector has not changed; only its coordinate description has.
Dimension of a Line Through the Origin
A line through the origin in:
R²
or:
R³
is a one-dimensional vector subspace.
For example:
L = {(2t,3t): t ∈ R}
Every vector in L is:
t(2,3)
So:
{(2,3)}
is a basis.
Therefore:
dim(L)=1
Only one independent direction is needed.
Dimension of a Plane Through the Origin
A plane through the origin in:
R³
typically has dimension:
2
For example:
V = Span{(1,0,1),(0,1,1)}
The two vectors are independent.
Therefore they form a basis for the plane they span:
dim(V)=2
The plane lies inside three-dimensional space but itself requires only two independent coordinate directions.
Zero Vector Space
The vector space containing only:
{0}
has no nonzero directions.
Its basis is the empty set.
Therefore:
dim({0})=0
The zero vector itself is not used as a basis vector because any set containing the zero vector is linearly dependent.
Why the Zero Vector Cannot Be in a Basis
Suppose a proposed basis contains:
0
Then:
1(0) + 0v₂ + … + 0vₙ = 0
uses a nonzero coefficient on the zero vector.
Therefore the set fails the linear-independence condition.
So:
A basis never contains the zero vector
unless one is discussing the empty basis of the zero-dimensional vector space, where no vectors are included at all.
Too Few Vectors
In:
R³
a set containing only two vectors cannot span all of:
R³
because at most two independent directions are available.
For example:
{(1,0,0),(0,1,0)}
can generate vectors of form:
(a,b,0)
but cannot generate:
(0,0,1)
Therefore it spans only a plane.
Too Many Vectors
A basis of:
R²
contains exactly two vectors.
Any set of three or more vectors in R² must be linearly dependent.
Likewise, any set of more than three vectors in:
R³
must be dependent.
In an n-dimensional vector space:
Any set with more than n vectors is linearly dependent
Independent Sets Can Be Extended
If:
V
has finite dimension n, any linearly independent set containing fewer than n vectors can be extended to a basis.
For example, in:
R³
the vector:
(1,0,0)
is independent by itself.
Add:
(0,1,0)
and:
(0,0,1)
to obtain a basis.
This reflects the idea that a basis fills in all missing independent directions.
Spanning Sets Can Be Reduced
A spanning set may contain redundant vectors.
For example:
{(1,0),(0,1),(1,1)}
spans:
R²
but:
(1,1)=(1,0)+(0,1)
So the third vector adds no new direction.
Removing it leaves:
{(1,0),(0,1)}
which is a basis.
A basis is therefore a minimal spanning set and, equivalently, a maximal independent set.
Example: Determine Whether Two Vectors Form a Basis of R²
Consider:
v₁=(2,3)
v₂=(4,6)
Notice:
v₂=2v₁
Therefore they are linearly dependent.
They span only one line.
So:
{(2,3),(4,6)} is not a basis of R²
Even though there are two vectors, their directions are redundant.
Determinant Test in R²
For:
v₁=(a,c)
and:
v₂=(b,d)
place them as columns:
A = [[a,b],[c,d]]
They form a basis of:
R²
exactly when:
det(A) ≠ 0
For a 2×2 matrix:
det(A)=ad-bc
For:
(1,1)
and:
(1,-1)
matrix:
[[1,1],[1,-1]]
Determinant:
-1-1
= -2
Since:
-2 ≠ 0
the columns are independent and form a basis.
The specialist matrix determinant page develops determinant calculations more fully.
Matrix Rank and Dimension
The matrix rank is the dimension of the column space and also the dimension of the row space.
If matrix A has rank:
r
then:
dim(Col(A)) = r
and:
dim(Row(A)) = r
This gives an efficient route from row reduction to basis and dimension.
Pivot Columns and a Basis for the Column Space
Suppose row reduction shows pivot positions in columns:
1 and 3
of the original matrix.
Then the corresponding original columns form a basis for:
Col(A)
The important word is:
original
Row operations change column relationships, so a basis for the original column space should normally use pivot columns from the original matrix, not the reduced matrix.
Example Matrix
Consider:
A = [[1,2,3],[0,1,1],[1,3,4]]
The third row is:
row 1 + row 2
so not every row is independent.
Row reduction can reveal the pivot structure.
If the matrix has:
2 pivots
then:
rank(A)=2
and:
dim(Col(A))=2
Only two independent column directions are required.
The computational mechanics belong to row reduction.
Reduced Row Echelon Form
Reduced row echelon form makes independent and dependent variables easier to identify.
The number of pivot columns equals:
rank
and therefore the dimension of the column space.
The nonzero rows of an echelon form also provide a basis for the row space.
This makes row reduction a practical method for extracting several bases from one matrix.
Null Space and Dimension
The null space of matrix A is:
Null(A) = {x : Ax=0}
Its dimension is called:
nullity(A)
For an:
m×n
matrix:
rank(A) + nullity(A) = n
This is the rank-nullity theorem.
The number n is the dimension of the matrix’s input space.
Rank-Nullity Example
Suppose:
A
has:
5 columns
and:
rank(A)=3
Then:
nullity(A)=5−3
=2
Therefore:
dim(Null(A))=2
There are two independent free directions among solutions to:
Ax=0
Basis of a Null Space
To find a basis of:
Null(A)
solve:
Ax=0
using row reduction.
Express the solution in terms of free variables.
Then separate the coefficient vectors associated with each free variable.
Those vectors span the null space and are independent when constructed in the standard parameterized form.
The number of resulting basis vectors equals the nullity.
Polynomial Vector Spaces
Basis and dimension are not limited to coordinate vectors.
Consider:
P₂
the space of polynomials with degree at most 2.
A standard basis is:
{1,x,x²}
Any polynomial:
a+bx+cx²
can be written uniquely as:
a(1)+b(x)+c(x²)
Therefore:
dim(P₂)=3
Dimension of Pₙ
For:
Pₙ
the polynomial space of degree at most n, a standard basis is:
{1,x,x²,…,xⁿ}
There are:
n+1
basis vectors.
Therefore:
dim(Pₙ)=n+1
For example:
dim(P₄)=5
Matrix Spaces
Consider:
M₂₂
the vector space of all:
2×2
real matrices.
A standard basis is:
[[1,0],[0,0]]
[[0,1],[0,0]]
[[0,0],[1,0]]
[[0,0],[0,1]]
There are four independent matrix directions.
Therefore:
dim(M₂₂)=4
More generally:
dim(M_mn)=mn
for the space of all m×n matrices over the same scalar field.
Function Spaces
Some function spaces can also have finite bases.
For example, functions of form:
a cos x + b sin x
form a two-dimensional vector space.
A basis is:
{cos x, sin x}
Therefore:
dimension = 2
More general spaces of functions may be infinite-dimensional.
Infinite-Dimensional Spaces
Not every vector space has a finite basis.
For example, the space of all real polynomials has basis:
{1,x,x²,x³,…}
which continues indefinitely.
Therefore the polynomial space containing polynomials of arbitrary finite degree is:
infinite-dimensional
The phrase “dimension” still applies, but no finite integer counts all basis elements.
Basis Representation Is Unique
If:
B={v₁,…,vₙ}
is a basis, every vector:
v∈V
has exactly one representation:
v=c₁v₁+…+cₙvₙ
Why unique?
If two different coefficient sets produced the same vector, subtracting the two expressions would create a nontrivial linear combination equal to zero.
That would contradict linear independence.
So the basis provides a unique coordinate system.
Basis Change
Suppose vector v has coordinates:
[v]B
under basis B
and:
[v]C
under another basis C.
A change-of-basis matrix converts between the coordinate representations.
This is a matrix transformation, not a change in the underlying vector.
The broader linear transformation framework explains why matrices naturally represent changes between coordinate systems.
Linear Transformations and Bases
Once bases are selected for the domain and codomain, a linear transformation can be represented by a matrix.
If:
T:V→W
and:
B
is a basis of V, then the action of T on the basis vectors determines the transformation everywhere because any vector is a linear combination of those basis vectors.
This is one reason bases are so powerful: a linear map is completely determined by what it does to a basis.
Dimension and Linear Transformations
For:
T:V→W
the rank-nullity relationship becomes:
dim(V) = dim(Null(T)) + dim(Image(T))
The image dimension is the transformation’s rank.
This describes how the input-space directions divide into:
directions sent to zero
and:
independent directions that survive in the output.
Eigenvectors and Bases
If a matrix has enough independent eigenvectors, those eigenvectors can form a basis.
In such a basis, the transformation may become much simpler because each basis vector satisfies:
Av=λv
Instead of mixing coordinate directions, the transformation merely scales each eigenvector direction.
This is the central idea behind diagonalization.
Basis and Dot Products
A basis need not be orthogonal.
However, orthogonal or orthonormal bases are often computationally convenient.
For vectors u and v, the dot product identifies orthogonality:
u·v=0
For an orthonormal basis:
eᵢ·eⱼ=0
when:
i≠j
and:
||eᵢ||=1
Coordinates can then be recovered using dot products particularly easily.
Orthonormal Basis Coordinates
If:
{e₁,…,eₙ}
is an orthonormal basis and:
v
is a vector, then:
v = (v·e₁)e₁ + … + (v·eₙ)eₙ
The coordinate in direction eᵢ is simply:
v·eᵢ
This is closely related to the geometric idea of vector projection.
Cross Product and Basis Orientation
In:
R³
the cross product can construct a vector perpendicular to two nonparallel vectors.
If:
u
and:
v
are independent vectors in a plane, then:
u×v
provides a third direction perpendicular to that plane.
When nonzero:
{u,v,u×v}
can span three-dimensional space.
This connects basis construction with three-dimensional geometry.
Calculus Connection: Coordinate Spaces
The mapped area under a curve and area between curves live naturally in a two-dimensional coordinate space.
A graph:
y=f(x)
uses two coordinate directions:
x
and:
y
The ambient space:
R²
has dimension 2.
The calculus problem measures a geometric region inside that space, while basis and dimension describe the algebraic structure of the coordinate environment.
Arc Length and Dimension
Arc length calculus also reflects dimensional structure.
For a curve in:
R²
the local velocity vector has two components:
(dx/dt,dy/dt)
and its magnitude is:
√[(dx/dt)²+(dy/dt)²]
In:
R³
there are three components.
The number of coordinate components reflects the dimension of the surrounding Euclidean space.
Chain Rule and Linear Maps
The mapped chain rule becomes especially important in several dimensions because derivatives can be represented by matrices.
For transformations:
F:Rⁿ→Rᵐ
and:
G:Rᵏ→Rⁿ
the derivative of the composition acts like matrix multiplication:
D(F∘G) = DF · DG
The dimensions of the underlying spaces determine whether those derivative matrices can be multiplied.
Thus basis and dimension help organize the multivariable form of the chain rule.
Continuity vs. Dimension
Continuity is a calculus and analysis property describing how function values behave under small input changes.
Dimension is an algebraic property describing how many independent basis directions a vector space has.
A function may be continuous between spaces of different dimensions.
For example:
T:R³→R²
may be continuous and linear, but its domain and codomain dimensions remain:
3 and 2
respectively.
The concepts interact in advanced mathematics but should not be confused.
How to Test a Candidate Basis
Suppose you have n candidate vectors in:
Rⁿ
A practical method is to place them as columns of a square matrix:
A=[v₁ v₂ … vₙ]
Then check one equivalent condition:
det(A)≠0
or:
rank(A)=n
or:
RREF(A)=I
Any of these establishes linear independence and spanning simultaneously.
Example: Basis Test in R³
Consider:
v₁=(1,0,1)
v₂=(0,1,1)
v₃=(1,1,0)
Create:
A = [[1,0,1],[0,1,1],[1,1,0]]
Calculate determinant:
det(A)
Expanding gives:
-2
Since:
-2≠0
the matrix is invertible.
Therefore the columns are independent and span:
R³
So:
{v₁,v₂,v₃} is a basis of R³
Example of Dependence in R³
Consider:
v₁=(1,2,3)
v₂=(2,4,6)
v₃=(0,1,1)
Because:
v₂=2v₁
the set is dependent immediately.
It therefore cannot be a basis of:
R³
even before examining the third vector.
Finding Dimension From a Spanning Set
Suppose:
V=Span{v₁,v₂,v₃,v₄}
After row reduction, only:
3
of the vectors are independent.
Then a basis can be selected containing those three independent vectors.
Therefore:
dim(V)=3
Dimension counts independent directions, not the raw number of vectors initially listed.
Finding Dimension From Equations
Suppose:
V={(x,y,z)∈R³ : x+y+z=0}
Solve for one variable:
z=-x-y
Then:
(x,y,z)
=(x,y,-x-y)
Separate:
=x(1,0,-1)+y(0,1,-1)
Thus:
V=Span{(1,0,-1),(0,1,-1)}
The two vectors are independent.
Therefore:
dim(V)=2
A single independent linear constraint reduced dimension from 3 to 2.
Two Independent Constraints
Suppose:
V⊆R⁴
is defined by two independent homogeneous linear equations.
If the coefficient matrix has rank:
2
then rank-nullity gives:
nullity=4−2
=2
Therefore:
dim(V)=2
This is often faster than explicitly constructing all vectors first.
Common Mistake: Counting Vectors Without Checking Independence
Three vectors in:
R³
do not automatically form a basis.
They could lie in the same plane or even the same line.
Always check independence.
Common Mistake: Checking Only Independence
A set can be independent but still fail to span the full target space.
For example:
{(1,0,0),(0,1,0)}
is independent in:
R³
but does not span:
R³
Therefore it is not a basis of R³.
It is instead a basis of the plane:
z=0
Common Mistake: Checking Only Span
A spanning set may contain redundant vectors.
For example:
{(1,0),(0,1),(1,1)}
spans:
R²
but is dependent.
So it is not a basis.
Common Mistake: Including the Zero Vector
Any set containing the zero vector is dependent.
Therefore:
0 cannot be a basis vector
Common Mistake: Confusing Ambient Dimension With Subspace Dimension
A plane through the origin inside:
R³
has ambient space dimension:
3
but the plane itself has dimension:
2
A line in:
R³
has dimension:
1
Dimension belongs to the vector space or subspace being considered, not merely to the coordinate system containing it.
Common Mistake: Using Reduced Matrix Columns for the Original Column Space
Row operations preserve row relationships but can change the actual column space.
To find a basis for:
Col(A)
identify pivot positions using row reduction, then select the corresponding columns from the original matrix.
How to Check a Basis
A candidate basis should pass both questions:
Are the vectors linearly independent?
Do they span the required space?
In:
Rⁿ
with exactly n candidate vectors, proving either full independence or full spanning is enough because the two conditions become equivalent.
Matrix rank, determinant, and row reduction provide efficient tests.
Frequently Asked Questions
What is a basis?
A basis is a linearly independent set that spans the entire vector space.
What is dimension?
Dimension is the number of vectors in any basis of a finite-dimensional vector space.
What is the dimension of R²?
2
What is the dimension of R³?
3
What is the standard basis of R²?
{(1,0),(0,1)}
What is the standard basis of R³?
{(1,0,0),(0,1,0),(0,0,1)}
Can a vector space have more than one basis?
Yes. A finite-dimensional vector space has infinitely many possible bases in most ordinary cases, but every basis has the same number of vectors.
Can a basis contain the zero vector?
No.
Can three vectors form a basis of R²?
No. Any three vectors in a two-dimensional vector space are linearly dependent.
Can two vectors form a basis of R³?
No. Two vectors cannot span all three independent directions of R³.
What is the dimension of P₂?
3
with standard basis:
{1,x,x²}
What is the dimension of 2×2 matrices?
4
How does matrix rank relate to dimension?
Rank equals the dimension of the matrix’s column space and row space.
What is rank-nullity?
For an m×n matrix:
rank(A)+nullity(A)=n
Final Example
Find a basis and dimension for:
V={(x,y,z)∈R³ : x+2y−z=0}
Solve the constraint for:
z
We get:
z=x+2y
Therefore every vector in V has form:
(x,y,x+2y)
Separate the free variables:
(x,y,x+2y)
=x(1,0,1)+y(0,1,2)
So:
V=Span{(1,0,1),(0,1,2)}
Check independence.
Suppose:
a(1,0,1)+b(0,1,2)=(0,0,0)
The first coordinate gives:
a=0
The second gives:
b=0
Therefore the vectors are independent.
So they form a basis:
B={(1,0,1),(0,1,2)}
There are two basis vectors.
Therefore:
dim(V)=2
The central basis and dimension rules are:
Basis = linearly independent + spanning
Dimension = number of vectors in a basis
rank(A) = dim(Col(A))
rank(A)+nullity(A)=number of columns
A basis removes redundancy while preserving every direction needed to describe the space, and dimension records exactly how many independent directions remain.



