Evanalysis
6.5Embedded interactionEstimated reading time: 18 min

6.5 Basis and dimension

Understand a basis as a just-right spanning set, then use dimension to judge what can and cannot happen in a vector space.

Course contents

MATH1030: Linear algebra I

Linear algebra notes.

37 sections

A basis is where the chapter comes together. Earlier notes taught you how to build vectors from other vectors, how to test whether a set is a subspace, and how to recognize linear dependence. This note combines those ideas into one question:

When do we have exactly enough vectors to describe a space without keeping any redundant directions?

Intuition first: enough directions, but not extra baggage

If a set of vectors spans a space, then it gives you enough directions to build every vector in that space.

If the set is also linearly independent, then none of those directions is wasted. No vector in the set can already be made from the others.

So a basis is the "just right" situation:

  • enough vectors to reach every target in the space;
  • not so many vectors that one of them is unnecessary.

That is why a basis is often the most useful coordinate system for a space. Once you choose a basis, every vector can be described in terms of those basis vectors.

Definition

Basis

A set of vectors {u1,u2,,um}\{u_1, u_2, \ldots, u_m\} is a basis for a vector space VV if both conditions hold:

  1. u1,u2,,umu_1, u_2, \ldots, u_m are linearly independent.
  2. Span{u1,u2,,um}=VSpan\{u_1, u_2, \ldots, u_m\} = V.

The two conditions do different jobs.

  • The spanning condition says the set is large enough.
  • The independence condition says the set is not larger than necessary.

If you forget either condition, you can misidentify a basis.

Pause and vary the coefficients in a spanning example. Watch how changing the generators changes the set of vectors you can reach.

Read and try

Build one vector from a span

The live explorer lets you vary coefficients and watch the resulting vector move inside the span.

u

(1, 0)

v

(0, 1)

α

β

Result

αu + βv = (1, 0)

Every output vector is built from the horizontal and vertical directions.

The standard basis is the model example

The first basis most students meet is the standard basis of R3R^3:

e1=[100],e2=[010],e3=[001].e_1 = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}, \quad e_2 = \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}, \quad e_3 = \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}.

These vectors are important because each one isolates one coordinate direction.

Worked example

Why the standard basis of R3R^3 really is a basis

To show that {e1,e2,e3}\{e_1, e_2, e_3\} is a basis for R3R^3, you must check the two basis conditions.

First, they span R3R^3. If

x=[abc],x = \begin{bmatrix} a \\ b \\ c \end{bmatrix},

then

x=ae1+be2+ce3.x = a e_1 + b e_2 + c e_3.

So every vector in R3R^3 can be built from e1,e2,e3e_1, e_2, e_3.

Second, they are linearly independent. If

α1e1+α2e2+α3e3=0,\alpha_1 e_1 + \alpha_2 e_2 + \alpha_3 e_3 = 0,

then comparing coordinates gives

α1=0,α2=0,α3=0.\alpha_1 = 0,\quad \alpha_2 = 0,\quad \alpha_3 = 0.

So the only linear relation is the trivial one.

Since both conditions hold, {e1,e2,e3}\{e_1, e_2, e_3\} is a basis for R3R^3.

This example also explains why basis coordinates are useful. Once the basis is fixed, the coefficients a, b, and c tell you exactly how to rebuild the vector.

Why the number of basis vectors matters

The notes stress a fact that is easy to say and very important to use:

Theorem

Every basis of the same space has the same size

If B1B_1 and B2B_2 are both bases of the same vector space VV, then B1B_1 and B2B_2 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

Too many vectors in a spanned space force dependence

Suppose {v1,,vm}\{v_1,\ldots,v_m\} spans a vector space VV. Then any collection of more than m vectors in VV is linearly dependent.

Here is the idea. If u1,,unu_1,\ldots,u_n are vectors in VV with n>mn > m, then each uju_j can be written as a linear combination of v1,,vmv_1,\ldots,v_m. A linear relation

c1u1++cnun=0c_1u_1+\cdots+c_nu_n=0

then becomes a homogeneous system with m equations and n unknowns. Since there are more unknowns than equations, a non-trivial solution exists. That non-trivial solution gives a non-trivial linear relation among the uju_j, so the uju_j are dependent.

This also explains why two different bases of the same space must have the same size. If one basis had more vectors than the other, the larger one would be a linearly dependent set inside a space spanned by the smaller one, contradicting the definition of basis.

Dimension is a count of independent directions

Definition

Dimension

The dimension of a vector space VV, written dim(V), is the number of vectors in any basis of VV.

Dimension tells you how many genuinely independent directions the space has.

  • dim(Rm)=mdim(R^m) = m
  • dim(Mmn)=mndim(M_{mn}) = mn
  • dim(Pn)=n+1dim(P_n) = n + 1
  • the space of all real polynomials has infinite dimension, because no finite list can span all powers 1,x,x2,1,x,x^2,\ldots.

The zero space is the exceptional case:

dim({0})=0.dim(\{0\}) = 0.

That makes sense because the zero space has no nonzero direction at all.

A basis does not have to look like the standard one

A basis is not required to use the standard coordinate vectors. Many different sets can serve as a basis for the same space, as long as they span the space and stay linearly independent.

Worked example

A basis for a plane inside R3R^3

Let

W={[xy0]:x,yR}.W = \left\{ \begin{bmatrix} x \\ y \\ 0 \end{bmatrix} : x, y \in R \right\}.

This is the plane z=0z = 0 inside R3R^3.

Consider

u1=[100],u2=[010].u_1 = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}, \qquad u_2 = \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}.

Every vector in WW has the form

[xy0]=xu1+yu2,\begin{bmatrix} x \\ y \\ 0 \end{bmatrix} = x u_1 + y u_2,

so u1u_1 and u2u_2 span WW.

They are also linearly independent, because

α1u1+α2u2=0\alpha_1 u_1 + \alpha_2 u_2 = 0

forces α1=α2=0\alpha_1 = \alpha_2 = 0.

Therefore {u1,u2}\{u_1, u_2\} is a basis for WW, and

dim(W)=2.dim(W) = 2.

So dimension does not count how many entries a vector happens to have. It counts how many independent directions the space itself contains.

How dimension becomes a shortcut

Once you know the dimension of a space, many basis questions become shorter.

If dim(V)=mdim(V) = m, then:

  • any m linearly independent vectors in VV automatically form a basis;
  • any m vectors in VV that span VV automatically form a basis;
  • fewer than m vectors cannot span VV;
  • more than m 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 u1,,unu_1,\ldots,u_n are vectors in a subspace WW. Consider the three statements:

  1. dim(W)=ndim(W)=n.
  2. u1,,unu_1,\ldots,u_n are linearly independent.
  3. Span{u1,,un}=WSpan\{u_1,\ldots,u_n\}=W.

If any two of these statements are true, then the third is automatically true, and {u1,,un}\{u_1,\ldots,u_n\} is a basis for WW.

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

Using dimension to avoid a second calculation in R3R^3

Let

u1=[122],u2=[234],u3=[387].u_1=\begin{bmatrix}1\\2\\2\end{bmatrix},\quad u_2=\begin{bmatrix}2\\3\\4\end{bmatrix},\quad u_3=\begin{bmatrix}3\\8\\7\end{bmatrix}.

We want to show that these three vectors form a basis for R3R^3.

First test linear independence. The equation

c1u1+c2u2+c3u3=0c_1u_1+c_2u_2+c_3u_3=0

has coefficient matrix

[123238247].\begin{bmatrix} 1 & 2 & 3\\ 2 & 3 & 8\\ 2 & 4 & 7 \end{bmatrix}.

Row reduction gives an echelon form with a pivot in every column, for example

[123012001].\begin{bmatrix} 1 & 2 & 3\\ 0 & 1 & -2\\ 0 & 0 & 1 \end{bmatrix}.

Therefore the homogeneous equation has only the trivial solution, and u1,u2,u3u_1,u_2,u_3 are linearly independent.

Since dim(R3)=3dim(R^3)=3, three linearly independent vectors in R3R^3 automatically span R3R^3. Hence the vectors form a basis. The point is that the spanning part is not ignored; it is supplied by the dimension theorem.

Try a few typical dependence patterns before you use that shortcut.

Read and try

Test one set for dependence

The live checker compares small vector sets and explains whether a nontrivial linear relation exists.

Verdict

Independent

The only way to solve c1e1 + c2e2 = 0 is c1 = c2 = 0, so this pair is linearly independent.

Key relation

No nontrivial linear relation appears.

A practical checklist for basis questions

When you are asked whether a set is a basis, work in this order:

  1. Identify the space you are trying to span.
  2. Count how many vectors you were given.
  3. Check linear independence, or check spanning.
  4. Use dimension to finish the argument when the count matches.

For example, in R3R^3, three independent vectors already form a basis. You do not need a second long spanning calculation after that.

The same idea also gives two important repair operations.

Theorem

Extension and reduction consequences

If dim(V)=m>0dim(V)=m>0, then:

  1. no set of fewer than m vectors can span VV;
  2. every linearly independent set with fewer than m vectors can be extended to a basis of VV;
  3. every spanning set with more than m vectors can be reduced to a basis of VV by deleting redundant vectors.

These consequences are not separate tricks. They all say the same thing: dimension is the exact size of a just-right list. A list that is too short cannot cover the whole space; an independent list that is too short can still accept more directions; a spanning list that is too long must contain unnecessary vectors.

Null spaces: a rank-nullity basis test

For a homogeneous system, the dimension shortcut becomes especially concrete. Let AA be a p×qp \times q matrix with rank r. Then

dim(N(A))=qr.dim(N(A)) = q-r.

So vectors u1,,unu_1,\ldots,u_n form a basis for N(A) exactly when all three checks hold:

  1. each vector is actually in the null space, so Auj=0Au_j=0;
  2. the number of proposed vectors is correct, so n=qrn=q-r;
  3. the proposed vectors are linearly independent.

This avoids proving the full set equality N(A)=Span{u1,,un}N(A)=Span\{u_1,\ldots,u_n\} directly.

Worked example

Testing a proposed basis for a null space

Let

A=[120111113157],W=N(A),A= \begin{bmatrix} 1&2&0&1\\ 1&1&1&-1\\ 3&1&5&-7 \end{bmatrix}, \qquad W=N(A),

and

u1=[1111],u2=[5311].u_1=\begin{bmatrix}1\\-1\\1\\1\end{bmatrix}, \qquad u_2=\begin{bmatrix}5\\-3\\-1\\1\end{bmatrix}.

First check membership. Direct multiplication gives Au1=0Au_1=0 and Au2=0Au_2=0, so both vectors lie in WW.

Next compute the dimension of WW. A row-reduced form of AA is

[102301120000],\begin{bmatrix} 1&0&2&-3\\ 0&1&-1&2\\ 0&0&0&0 \end{bmatrix},

so rank(A)=2rank(A)=2. Since AA has four columns,

dim(N(A))=42=2.dim(N(A))=4-2=2.

Finally check independence. Put the proposed vectors into a matrix:

U=[u1 u2]=[15131111].U=[u_1\ u_2] = \begin{bmatrix} 1&5\\ -1&-3\\ 1&-1\\ 1&1 \end{bmatrix}.

Row reduction gives a pivot in each column, so u1,u2u_1,u_2 are linearly independent. We now have membership, the correct dimension count, and independence. Therefore u1,u2u_1,u_2 form a basis for N(A).

The failure modes are just as important:

  • if some uju_j does not satisfy Auj=0Au_j=0, the list cannot be a basis for N(A);
  • if the list has fewer or more than qrq-r 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

Pivot columns give a minimal spanning set

Let

W=Span{u1,,uq}Rn,U=[u1 u2  uq].W=\operatorname{Span}\{u_1,\ldots,u_q\}\subseteq R^n, \qquad U=[u_1\ u_2\ \cdots\ u_q].

Row-reduce UU. If the pivot columns of the reduced matrix occur in positions d1,,drd_1,\ldots,d_r, then

{ud1,,udr}\{u_{d_1},\ldots,u_{d_r}\}

is a basis for WW, and dim(W)=rdim(W)=r.

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

Extracting a basis from a generating list

Let W=Span{u1,u2,u3}W=Span\{u_1,u_2,u_3\}, where

u1=[012],u2=[127],u3=[2312].u_1=\begin{bmatrix}0\\-1\\2\end{bmatrix}, \quad u_2=\begin{bmatrix}1\\-2\\7\end{bmatrix}, \quad u_3=\begin{bmatrix}-2\\3\\-12\end{bmatrix}.

Put the vectors into the columns of UU:

U=[0121232712][101012000].U= \begin{bmatrix} 0&1&-2\\ -1&-2&3\\ 2&7&-12 \end{bmatrix} \sim \begin{bmatrix} 1&0&1\\ 0&1&-2\\ 0&0&0 \end{bmatrix}.

The pivot columns are columns 1 and 2, so

{u1,u2}\{u_1,u_2\}

is a basis for WW, and dim(W)=2dim(W)=2. The non-pivot column also tells us the redundancy relation:

u3=u12u2.u_3=u_1-2u_2.

Subspaces with the same dimension

Dimension also controls when one subspace can equal another. If VV and WW are subspaces of the same ambient space and VWV \subseteq W, then

dim(V)dim(W).dim(V) \le dim(W).

Moreover,

dim(V)=dim(W)if and only ifV=W.dim(V)=dim(W) \quad\text{if and only if}\quad V=W.

The containment hypothesis matters. Equal dimension alone does not force two subspaces to be equal. For example, two different lines through the origin in R2R^2 both have dimension 1, but neither line contains the other. The theorem applies when one subspace is already known to sit inside the other.

Worked example

Using dimension to prove equality of subspaces

Let

V=Span{[100],[010]}V=Span\left\{ \begin{bmatrix}1\\0\\0\end{bmatrix}, \begin{bmatrix}0\\1\\0\end{bmatrix} \right\}

and let

W={[xy0]:x,yR}.W=\left\{ \begin{bmatrix}x\\y\\0\end{bmatrix}:x,y\in R \right\}.

Every vector in VV has third coordinate zero, so VWV \subseteq W. We also know from the earlier plane example that dim(W)=2dim(W)=2. Since the two displayed generators of VV are linearly independent, dim(V)=2dim(V)=2 as well.

Thus VV is a subspace of WW and both have dimension 2. The comparable-subspace theorem gives V=WV=W.

Common mistake

Common mistake

Dimension is not just the number of coordinates

A subspace of R3R^3 can have dimension 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 \{(1,0), (2,0)\} be a basis for R2R^2?

Think about both basis conditions, not just the number of vectors.

Solution

Answer

Quick check

Suppose dim(V)=3dim(V) = 3 and you already found three linearly independent vectors in VV. What remains to prove?

Use the dimension shortcut from this note.

Solution

Answer

Exercises

Quick check

Do the vectors u1=(1,1,0)u_1 = (1,1,0), u2=(1,0,1)u_2 = (1,0,1), and u3=(0,1,1)u_3 = (0,1,1) form a basis for R3R^3?

Try to test independence first. If they are independent, dimension does the rest.

Solution

Guided solution

Read this first

This note depends on 6.4 Linear dependence and independence and 6.3 Linear combinations and span.

Section mastery checkpoint

Answer each question correctly to complete this section checkpoint. Correct progress: 0%.

Skills: basis, dimension, polynomial-space

How many vectors must a basis of the polynomial space P2P_2 have?

Attempts used: 0

Attempts remaining: Unlimited attempts

Preview does not consume an attempt.

Submit records a graded attempt.

Skills: basis, dimension, minimal-spanning-set, rref

If the pivot columns of the RREF of U=[u1...u5]U=[u_1 ... u_5] are columns 1, 3, and 4, which original vectors form the extracted basis for Span{u1,...,u5}\operatorname{Span}\{u_1,...,u_5\}?

Attempts used: 0

Attempts remaining: Unlimited attempts

Preview does not consume an attempt.

Submit records a graded attempt.

Key terms in this unit

Premium learning add-ons

Core notes stay free. Advanced exercises, video explanations, and premium exports are available through paid plans.