Evanalysis
6.8Estimated reading time: 14 min

6.8 Basis extension and change of basis

Turn the basis theorems into usable tools: extend independent lists, replace old basis vectors, and compare coordinates across two bases.

Course contents

MATH1030: Linear algebra I

Linear algebra notes.

The previous notes explain what a basis is and how dimension is used. This note adds the structural theorems that make the theory reliable.

There are three questions behind the results:

  1. If a subspace is nonzero, must it have a basis?
  2. If we already have a basis, when can we replace some old basis vectors by new independent vectors?
  3. If two different bases describe the same subspace, how do their coordinate systems talk to each other?

The answers are not just formal background. They explain why dimension is well-defined, why independent lists can be extended, why spanning lists can be trimmed, and why diagonalization later is really a change of coordinates.

Why existence is not automatic

For familiar spaces such as RnR^n, it is easy to write down the standard basis. For an arbitrary subspace WRnW \subseteq R^n, a basis is less obvious. The subspace might be given by equations, by a span, or by a condition such as x1+x2+x3=0x_1+x_2+x_3=0.

The first theorem says that the situation is still controlled.

Theorem

Existence of a basis for subspaces of RnR^n

Every nonzero subspace WW of RnR^n has a basis. More precisely, there are vectors

u1,,upWu_1,\ldots,u_p\in W

such that 1pn1\le p\le n, the list is linearly independent, and

W=Span{u1,,up}.W=\operatorname{Span}\{u_1,\ldots,u_p\}.

The proof is a controlled selection process.

Start with any nonzero vector u1Wu_1\in W. If every vector in WW is already a multiple of u1u_1, then {u1}\{u_1\} is a basis. If not, choose u2Wu_2\in W that is not a multiple of u1u_1. Then u1,u2u_1,u_2 are linearly independent.

Continue in the same way. At step j, if the current list u1,,uju_1,\ldots,u_j does not span WW, choose a new vector uj+1Wu_{j+1}\in W outside the current span. The new list stays linearly independent because the new vector was chosen not to be a linear combination of the old ones.

This process cannot go on forever: no more than n vectors in RnR^n can be linearly independent. Therefore it must stop, and when it stops the chosen vectors span WW. They are independent by construction, so they form a basis.

Worked example

A basis produced by the selection idea

Let

W={[xyz]R3:x+y+z=0}.W=\left\{ \begin{bmatrix}x\\y\\z\end{bmatrix}\in R^3:x+y+z=0 \right\}.

Choose

u1=[110]W.u_1=\begin{bmatrix}1\\-1\\0\end{bmatrix}\in W.

This one vector does not span all of WW, because

u2=[101]Wu_2=\begin{bmatrix}1\\0\\-1\end{bmatrix}\in W

is not a scalar multiple of u1u_1. Therefore u1,u2u_1,u_2 are linearly independent.

Now every vector in WW can be written as

[xyz]=x[101]+y[011],\begin{bmatrix}x\\y\\z\end{bmatrix} = x\begin{bmatrix}1\\0\\-1\end{bmatrix} +y\begin{bmatrix}0\\1\\-1\end{bmatrix},

or, using our chosen list,

[xyz]=y[110]+(x+y)[101],\begin{bmatrix}x\\y\\z\end{bmatrix} = -y\begin{bmatrix}1\\-1\\0\end{bmatrix} +(x+y)\begin{bmatrix}1\\0\\-1\end{bmatrix},

because z=xyz=-x-y. Hence u1,u2u_1,u_2 span WW and form a basis. This also gives dim(W)=2dim(W)=2.

The replacement idea

The basis-existence proof grows an independent list. The replacement theorem explains the complementary operation: insert new independent vectors into an old basis while deleting the correct old vectors.

Theorem

Replacement theorem

Let WW be a subspace of RnR^n. Suppose

t1,,tqt_1,\ldots,t_q

is a basis for WW, and suppose

u1,,upWu_1,\ldots,u_p\in W

are linearly independent. Then:

  1. pqp\le q;
  2. the vectors u1,,upu_1,\ldots,u_p, together with some qpq-p of the old basis vectors t1,,tqt_1,\ldots,t_q, form another basis for WW.

This theorem is the precise version of the slogan:

independent vectors can replace the same number of old basis vectors.

The proof begins with the one-vector case. Suppose t1,,tqt_1,\ldots,t_q is a basis and

u=α1t1++αqtq,u0.u=\alpha_1t_1+\cdots+\alpha_qt_q,\qquad u\ne 0.

At least one coefficient is nonzero. If α10\alpha_1\ne 0, then

t1=1α1uα2α1t2αqα1tq.t_1=\frac{1}{\alpha_1}u -\frac{\alpha_2}{\alpha_1}t_2-\cdots -\frac{\alpha_q}{\alpha_1}t_q.

So the list

u,t2,,tqu,t_2,\ldots,t_q

spans the same space as the old basis. It is also independent. If the first nonzero coefficient is not α1\alpha_1, relabel the old basis vectors and do the same argument.

The full replacement theorem repeats this one-vector replacement step. Each new independent vector replaces one old basis vector, and independence prevents the process from getting stuck.

Dimension consequences

The replacement theorem gives the rigorous reason why dimension works.

Theorem

All bases of the same finite-dimensional subspace have the same size

If BB and CC are both bases for the same subspace WRnW\subseteq R^n, then BB and CC contain the same number of vectors.

Indeed, apply the replacement theorem twice. If BB has p vectors and CC has q vectors, then the independence of BB inside a space with basis CC gives pqp\le q. Reversing the roles gives qpq\le p. Therefore p=qp=q.

Several useful statements follow immediately.

Theorem

Counting rules inside a q-dimensional subspace

Let dim(W)=qdim(W)=q.

  1. Any linearly independent list in WW has at most q vectors.
  2. Any list of more than q vectors in WW is linearly dependent.
  3. A linearly independent list in WW can be extended to a basis of WW.
  4. A spanning list for WW can be reduced to a basis of WW by deleting redundant vectors.

These are not separate tricks. They all express the same fact: a basis is the exact size of a nonredundant spanning list.

Ordered bases and coordinate vectors

A basis as a set tells us which vectors are available. An ordered basis also fixes their order. Order matters for coordinates.

If

B=(b1,,bp)B=(b_1,\ldots,b_p)

is an ordered basis for WW, then every xWx\in W has a unique expression

x=α1b1++αpbp.x=\alpha_1b_1+\cdots+\alpha_pb_p.

The coordinate vector of x relative to BB is

[x]B=[α1αp].[x]_B= \begin{bmatrix} \alpha_1\\ \vdots\\ \alpha_p \end{bmatrix}.

Changing the order of the basis changes the coordinate vector, even if the underlying basis vectors are the same.

Change-of-basis theorem

Now suppose the same p-dimensional subspace WW has two ordered bases:

U=(u1,,up),V=(v1,,vp).U=(u_1,\ldots,u_p),\qquad V=(v_1,\ldots,v_p).

Write the basis matrices

U=[u1  up],V=[v1  vp].\mathcal U=[u_1\ \cdots\ u_p], \qquad \mathcal V=[v_1\ \cdots\ v_p].

Theorem

Change-of-basis theorem

There is a unique invertible p×pp\times p matrix SS such that

U=VS.\mathcal U=\mathcal V S.

The columns of SS are the coordinate vectors of the uju_j's in the ordered basis VV. If

x=Ua=Vb,x=\mathcal U a=\mathcal V b,

then the coordinate vectors satisfy

b=Sa.b=Sa.

Read this carefully. The matrix SS does not move the vector x in the ambient space. It converts the coordinate column from the UU-basis language into the VV-basis language:

[x]V=S[x]U.[x]_V=S[x]_U.

Because SS is invertible, the reverse conversion is

[x]U=S1[x]V.[x]_U=S^{-1}[x]_V.

If W=RnW=R^n, then U\mathcal U and V\mathcal V are square invertible matrices, and the formula becomes especially concrete:

S=V1U.S=\mathcal V^{-1}\mathcal U.

For a proper subspace, V\mathcal V is usually not square, so you should find each column of SS by solving

Vsj=uj.\mathcal V s_j=u_j.

Worked example: changing coordinates in a plane

Let

u1=[211],u2=[011],v1=[110],v2=[101].u_1=\begin{bmatrix}2\\1\\1\end{bmatrix}, \quad u_2=\begin{bmatrix}0\\-1\\1\end{bmatrix}, \quad v_1=\begin{bmatrix}1\\1\\0\end{bmatrix}, \quad v_2=\begin{bmatrix}1\\0\\1\end{bmatrix}.

Let W=Span{u1,u2}W=Span\{u_1,u_2\}. One checks that both (u1,u2)(u_1,u_2) and (v1,v2)(v_1,v_2) are ordered bases for the same plane WW.

The vector equalities

u1=v1+v2,u2=v1+v2u_1=v_1+v_2,\qquad u_2=-v_1+v_2

combine into the matrix equality

U=V[1111].\mathcal U=\mathcal V \begin{bmatrix} 1&-1\\ 1&1 \end{bmatrix}.

Therefore

S=[1111]S= \begin{bmatrix} 1&-1\\ 1&1 \end{bmatrix}

is the change-of-basis matrix from the ordered basis UU to the ordered basis VV.

For example, if

[x]U=[32],[x]_U= \begin{bmatrix}3\\2\end{bmatrix},

then

[x]V=S[x]U=[1111][32]=[15].[x]_V =S[x]_U = \begin{bmatrix} 1&-1\\ 1&1 \end{bmatrix} \begin{bmatrix}3\\2\end{bmatrix} = \begin{bmatrix}1\\5\end{bmatrix}.

So

x=3u1+2u2=v1+5v2.x=3u_1+2u_2=v_1+5v_2.

The actual vector has not changed. Only its coordinates have changed.

How to compute a change-of-basis matrix

Use this workflow.

  1. Decide the direction of conversion. If you want [x]V[x]_V from [x]U[x]_U, you need U=VS\mathcal U=\mathcal V S.
  2. For each uju_j, solve Vsj=uj\mathcal V s_j=u_j.
  3. Put the solution columns together:
S=[s1  sp].S=[s_1\ \cdots\ s_p].

If V\mathcal V is square and invertible, this is just

S=V1U.S=\mathcal V^{-1}\mathcal U.

If V\mathcal V is not square, solve the systems directly. The solution exists and is unique because the vjv_j's form a basis for the same subspace.

Common mistakes

Common mistake

Using the inverse direction by accident

If U=VS\mathcal U=\mathcal V S, then SS sends UU-coordinates to VV-coordinates: [x]V=S[x]U[x]_V=S[x]_U. The inverse S1S^{-1} sends VV-coordinates back to UU-coordinates.

Common mistake

Forgetting that the bases are ordered

The ordered basis (b1,b2)(b_1,b_2) and the ordered basis (b2,b1)(b_2,b_1) give different coordinate vectors. A change-of-basis matrix compares ordered bases, not just unordered sets.

Common mistake

Trying to invert a non-square basis matrix for a proper subspace

If WW is a plane inside R3R^3, a basis matrix has size 3×23\times2, so it is not invertible as a square matrix. Solve Vsj=uj\mathcal V s_j=u_j column by column instead.

Quick checks

Quick check

If dim(W)=4dim(W)=4, can five vectors in WW be linearly independent?

Use the replacement-theorem counting rule.

Solution

Answer

Quick check

If U=VS\mathcal U=\mathcal V S, which coordinate vector is S[x]US[x]_U equal to?

Track the equality x=U[x]U=V[x]Vx=\mathcal U[x]_U=\mathcal V[x]_V.

Solution

Answer

Exercises

Quick check

Let B=(b1,b2,b3)B=(b_1,b_2,b_3) be a basis for WW, and let u=b1+2b2b3u=b_1+2b_2-b_3. Which old vector can be replaced immediately by u?

Look for a nonzero coefficient in the expression of u using the old basis.

Solution

Guided solution

Quick check

Use the example matrix S=[1111]S=\begin{bmatrix}1&-1\\1&1\end{bmatrix} to convert [x]U=(4,1)T[x]_U=(4,-1)^T into [x]V[x]_V.

Multiply S[x]US[x]_U.

Solution

Guided solution

Read this first

This note depends on 6.5 Basis and dimension and 6.4 Linear dependence and independence.

Section mastery checkpoint

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

Skills: basis, dimension, replacement-theorem

Suppose dim(W)=4dim(W)=4. Which statement is forced by the replacement theorem?

Attempts used: 0

Attempts remaining: Unlimited attempts

Preview does not consume an attempt.

Submit records a graded attempt.

Skills: change-of-basis, coordinates, matrix-multiplication

If U=VSU=VS and [x]U=(4,1)T[x]_U=(4,-1)^T with S=[[1,1],[1,1]]S=[[1,-1],[1,1]], what is the first coordinate of [x]V[x]_V?

Attempts used: 0

Attempts remaining: Unlimited attempts

Preview does not consume an attempt.

Submit records a graded attempt.

Syntax guidance: Enter a single number.

Key terms in this unit