Change of basis

In linear algebra, a basis for a vector space is a linearly independent set spanning the vector space. This article deals mainly with finite-dimensional vector spaces, but many of the theorems are also valid for infinite-dimensional vector spaces. A basis for a vector space of dimension *n* is a set of *n* vectors (*α*1, …, *α**n*), called **basis vectors**, with the property that every vector in the space can be expressed as a unique linear combination of the basis vectors. The matrix representations of operators are also determined by the chosen basis. Since it is often desirable to work with more than one basis for a vector space, it is of fundamental importance in linear algebra to be able to easily transform coordinate-wise representations of vectors and operators taken with respect to one basis to their equivalent representations with respect to another basis. Such a transformation is called a **change of basis**.

Although the symbol **R** used below can be taken to mean the field of real numbers, the results are valid if **R** is replaced by any field **F**. Although the terminology of vector spaces is used below, the results discussed hold whenever **R** is a commutative ring and *vector space* is everywhere replaced with *free R-module*.

## Ideas

Say we have a finite-dimensional vector space *V* with the dimension of *V* being *n*. Then suppose there are bases *B*1 = {***e***1, ..., ***e****n*}, *B*2 = {***f***1, ...., ***f****n*}

f

1

=

a

1
,
1

e

1

a

1
,
2

e

2

…

a

1
,
n

e

n

f

2

=

a

2
,
1

e

1

a

2
,
2

e

2

…

a

2
,
n

e

n

⋮

f

n

=

a

n
,
1

e

1

a

n
,
2

e

2

…

a

n
,
n

e

n

{\displaystyle {\begin{matrix}\mathbf {f} \_{1}&=&a\_{1,1}\mathbf {e} \_{1}+a\_{1,2}\mathbf {e} \_{2}+\ldots +a\_{1,n}\mathbf {e} \_{n}\\\mathbf {f} \_{2}&=&a\_{2,1}\mathbf {e} \_{1}+a\_{2,2}\mathbf {e} \_{2}+\ldots +a\_{2,n}\mathbf {e} \_{n}\\\vdots &&\\\mathbf {f} \_{n}&=&a\_{n,1}\mathbf {e} \_{1}+a\_{n,2}\mathbf {e} \_{2}+\ldots +a\_{n,n}\mathbf {e} \_{n}\\\end{matrix}}}

Clearly, we can create a matrix from these equations:

# M

(

a

11

a

12

⋯

a

1
n

a

21

a

22

⋯

a

2
n

⋮

⋮

⋱

⋮

a

n
1

a

n
2

⋯

a

n
n

)

{\displaystyle M={\begin{pmatrix}a\_{11}&a\_{12}&\cdots &a\_{1n}\\a\_{21}&a\_{22}&\cdots &a\_{2n}\\\vdots &\vdots &\ddots &\vdots \\a\_{n1}&a\_{n2}&\cdots &a\_{nn}\end{pmatrix}}}

This is known as a *change-of-basis matrix*.

If we have a vector ***v*** with coordinates in *B*1, we can change the vector to have coordinates in *B*2 by multiplication with *M*, ie, *M* ***v***. We can see that this is the case in seeing that [***v***]*B*1=*b*1***e***1+...+*b**n****e****n* and the change-of-basis matrix is clearly linear.

## Preliminary notions

### Transformation matrix

The standard basis for

R
n

{\displaystyle R^n}

 is the ordered sequence

E

n

=
{

e

1

,
⋯
,

e

n

}

{\displaystyle E\_{n}=\{e\_{1},\cdots ,e\_{n}\}}

, where

e
j

{\displaystyle e\_j}

 is the element of

R
n

{\displaystyle R^n}

 with

1

{\displaystyle 1}

 in the

j

th

{\displaystyle j^{\text{th}}}

 place and

0

{\displaystyle 0}

s elsewhere. For example, the standard basis for

R

2

{\displaystyle R^{2}}

 would be

E
2

=

{

(

1

0

)

,

(

0

1

)

}

{\displaystyle E\_2 = \left\{ \begin{pmatrix} 1\\ 0\end{pmatrix}, \begin{pmatrix} 0\\ 1\end{pmatrix} \right\}}

If

T
:

R

n

→

R

m

{\displaystyle T:R^{n}\rightarrow R^{m}}

 is a linear transformation, then

T
(
x
# )

M

T

⋅
x

{\displaystyle T(x)=M\_{T}\cdot x}

, where

x

{\displaystyle x}

 is a column vector
where

M

T

=

[

T
(

e

1

)
⋯
T
(

e

j

)
⋯
T
(

e

n

)

]

∈

R

m
×
n

{\displaystyle M\_{T}={\begin{bmatrix}T(e\_{1})\cdots T(e\_{j})\cdots T(e\_{n})\end{bmatrix}}\in R^{m\times n}}

It is a basic fact in linear algebra that a linear transformation

T
:

R

n

→

R

m

{\displaystyle T:R^{n}\rightarrow R^{m}}

 is for all intents and purposes equivalent to its matrix

M
T

{\displaystyle M\_T}

.

### Uniqueness of linear transformations

We will also make use of the following observation.

#### Theorem

Let

V

{\displaystyle V}

 and

W

{\displaystyle W}

 be vector spaces, let

# B
{

α

1

,
⋯
,

α

n

}

{\displaystyle B=\{\alpha \_{1},\cdots ,\alpha \_{n}\}}

 be a basis for

V

{\displaystyle V}

, and let

# C
{

γ

1

,
⋯
,

γ

n

}

{\displaystyle C=\{\gamma \_{1},\cdots ,\gamma \_{n}\}}

 be any

n

{\displaystyle n}

 vectors in

W

{\displaystyle W}

. Then there exists a *unique linear transformation*

T
:
V
→
W

{\displaystyle T:V\rightarrow W}

 with

T
(

α

j

# )

γ

j

{\displaystyle T(\alpha \_{j})=\gamma \_{j}\quad }

, for

# j
1
,
⋯
,
n

{\displaystyle j=1,\cdots ,n}

.
This unique

T

{\displaystyle T}

 is defined by

T
(

x

1

α

1

⋯

x

n

α

n

# )
T
(

x

1

α

1

)
⋯
T
(

x

n

α

n

# )

x

1

T
(

α

1

)
⋯

x

n

T
(

α

n

# )

x

1

γ

1

⋯

x

n

γ

n

{\displaystyle T(x\_{1}\alpha \_{1}+\cdots +x\_{n}\alpha \_{n})=T(x\_{1}\alpha \_{1})+\cdots +T(x\_{n}\alpha \_{n})=x\_{1}T(\alpha \_{1})+\cdots +x\_{n}T(\alpha \_{n})=x\_{1}\gamma \_{1}+\cdots +x\_{n}\gamma \_{n}}

Of course, if

# C
{

γ

1

,
⋯
,

γ

n

}

{\displaystyle C=\{\gamma \_{1},\cdots ,\gamma \_{n}\}}

 happens to be a basis for

W

{\displaystyle W}

, then

T

{\displaystyle T}

 is bijective as well as linear; in other words,

T

{\displaystyle T}

 is an isomorphism. If in this case we also have

# W
V

{\displaystyle W=V}

, then

T

{\displaystyle T}

 is said to be an automorphism.

##### Coordinate isomorphism

Now let

V

{\displaystyle V}

 be a vector space over

R

{\displaystyle R}

 and suppose

# B
{

α

1

,
⋯
,

α

n

}

{\displaystyle B=\{\alpha \_{1},\cdots ,\alpha \_{n}\}}

 is a basis for

V

{\displaystyle V}

. By definition, if

ξ

{\displaystyle \xi}

 is a vector in

V

{\displaystyle V}

, then

# ξ

x

1

α

1

⋯

x

n

α

n

{\displaystyle \xi =x\_{1}\alpha \_{1}+\cdots +x\_{n}\alpha \_{n}}

 for a unique choice of scalars

x

1

,
⋯
,

x

n

∈
R

{\displaystyle x\_{1},\cdots ,x\_{n}\in R}

 called the *coordinates of

ξ

{\displaystyle \xi}

 relative to the ordered basis

B

{\displaystyle B}*. The vector

# x
(

x

1

,
⋯
,

x

n

)

T

∈

R

n

{\displaystyle x=(x\_{1},\cdots ,x\_{n})^{T}\in R^{n}}

 is called the *coordinate tuple of

ξ

{\displaystyle \xi}

 relative to

B

{\displaystyle B}*.

The unique linear map

ϕ
:

R

n

→
V

{\displaystyle \phi :R^{n}\rightarrow V}

 with

ϕ
(

e

j

# )

α

j

{\displaystyle \phi (e\_{j})=\alpha \_{j}}

 for

# j
1
,
⋯
,
n

{\displaystyle j=1,\cdots ,n}

 is called the **coordinate isomorphism** for

V

{\displaystyle V}

 and the basis

# B
{

α

1

,
⋯
,

α

n

}

{\displaystyle B=\{\alpha \_{1},\cdots ,\alpha \_{n}\}}

. Thus

ϕ
(
x
# )
ξ

{\displaystyle \phi (x)=\xi }

 if and only if

# ξ

x

1

α

1

⋯

x

n

α

n

{\displaystyle \xi =x\_{1}\alpha \_{1}+\cdots +x\_{n}\alpha \_{n}}

.

### Matrix of a set of vectors

A set of vectors can be represented by a matrix of which each column consists of the components of the corresponding vector of the set. As a basis is a set of vectors, a basis can be given by a matrix of this kind. Later it will be shown that the change of basis of any object of the space is related to this matrix. For example, vectors change with its inverse (and they are therefore called contravariant objects).

## Change of coordinates of a vector

First we examine the question of how the coordinates of a vector

ξ

{\displaystyle \xi}

 in the vector space

V

{\displaystyle V}

 change when we select another basis.

### Two dimensions

This means that given a matrix

M

{\displaystyle M}

 whose columns are the vectors of the new basis of the space (new basis matrix), the new coordinates for a column vector

v

{\displaystyle v}

 are given by the matrix product

M

−
1

v

{\displaystyle M^{-1}v}

. For this reason, it is said that ordinary vectors are contravariant objects.

Any finite set of vectors can be represented by a matrix in which its columns are the coordinates of the given vectors. As an example in dimension 2, a pair of vectors obtained by rotating the standard basis counterclockwise for 45°. The matrix whose columns are the coordinates of these vectors is

# M

[

1

2

−
1

2

1

2

1

2

]

{\displaystyle M={\begin{bmatrix}{\frac {1}{\sqrt {2}}}&{\frac {-1}{\sqrt {2}}}\\{\frac {1}{\sqrt {2}}}&{\frac {1}{\sqrt {2}}}\end{bmatrix}}}

If we want to change any vector of the space to this new basis, we only need to left-multiply its components by the inverse of this matrix.

### Three dimensions

For example, let R be a new basis given by its Euler angles. The matrix of the basis will have as columns the components of each vector. Therefore, this matrix will be (See Euler angles article):

R

=

[

c

α

c

γ

−

s

α

c

β

s

γ

−

c

α

s

γ

−

s

α

c

β

c

γ

s

β

s

α

s

α

c

γ

c

α

c

β

s

γ

−

s

α

s

γ

c

α

c

β

c

γ

−

s

β

c

α

s

β

s

γ

s

β

c

γ

c

β

]

.

{\displaystyle \mathbf {R} ={\begin{bmatrix}\mathrm {c} \_{\alpha }\,\mathrm {c} \_{\gamma }-\mathrm {s} \_{\alpha }\,\mathrm {c} \_{\beta }\,\mathrm {s} \_{\gamma }&-\mathrm {c} \_{\alpha }\,\mathrm {s} \_{\gamma }-\mathrm {s} \_{\alpha }\,\mathrm {c} \_{\beta }\,\mathrm {c} \_{\gamma }&\mathrm {s} \_{\beta }\,\mathrm {s} \_{\alpha }\\\mathrm {s} \_{\alpha }\,\mathrm {c} \_{\gamma }+\mathrm {c} \_{\alpha }\,\mathrm {c} \_{\beta }\,\mathrm {s} \_{\gamma }&-\mathrm {s} \_{\alpha }\,\mathrm {s} \_{\gamma }+\mathrm {c} \_{\alpha }\,\mathrm {c} \_{\beta }\,\mathrm {c} \_{\gamma }&-\mathrm {s} \_{\beta }\,\mathrm {c} \_{\alpha }\\\mathrm {s} \_{\beta }\,\mathrm {s} \_{\gamma }&\mathrm {s} \_{\beta }\,\mathrm {c} \_{\gamma }&\mathrm {c} \_{\beta }\end{bmatrix}}.}

Again, any vector of the space can be changed to this new basis by left-multiplying its components by the inverse of this matrix.

# A
{

α

1

,
…
,

α

n

}

{\displaystyle A=\{\alpha \_{1},\dots ,\alpha \_{n}\}}

 and

# B
{

β

1

,
…
,

β

n

}

{\displaystyle B=\{\beta \_{1},\dots ,\beta \_{n}\}}

 are two ordered bases for an *n*-dimensional vector space *V* over a field *K*.
Let

ϕ

A

=

A

−
1

{\displaystyle \phi \_{A}=A^{-1}}

 and

ϕ

B

=

B

−
1

{\displaystyle \phi \_{B}=B^{-1}}

 be the corresponding coordinate isomorphisms (linear maps) from *K**n* to *V*, i.e.

ϕ

A

(

e

i

# )

α

i

{\displaystyle \phi \_{A}(e\_{i})=\alpha \_{i}\quad }

 and

ϕ

B

(

e

i

# )

β

i

{\displaystyle \quad \phi \_{B}(e\_{i})=\beta \_{i}\quad }

 for *i* = 1, …, *n*,
If

# x
(

x
1

,
…
,

x
n

)

{\displaystyle x=(x\_1,\dots,x\_n)}

 is the coordinate *n*-tuple of a vector *v* in *V* with respect to the basis *A*, so that

# v

ϕ

A

(
x
)

{\displaystyle v=\phi \_{A}(x)}

and

# y
(

y

1

,
…
,

y

n

)

{\displaystyle y=(y\_{1},\dots ,y\_{n})}

 is the coordinate *n*-tuple of a vector *v* in *V* with respect to the basis *B*, so that

# v

ϕ

B

(
y
)

{\displaystyle v=\phi \_{B}(y)}

 then

# y

ϕ

B

−
1

(
v
# )

ϕ

B

−
1

(

ϕ

A

(
x
)
# )
C
x

{\displaystyle y=\phi \_{B}^{-1}(v)=\phi \_{B}^{-1}(\phi \_{A}(x))=Cx}

,
The matrix *C* is called the **transition matrix** from *A* to *B*.

Moreover, the *i*th column of *C* is

ϕ

B

−
1

∘

ϕ

A

(

e

i

# )

ϕ

B

−
1

(

α

i

)

{\displaystyle \phi \_{B}^{-1}\circ \phi \_{A}(e\_{i})=\phi \_{B}^{-1}(\alpha \_{i})}

, that is, the coordinate tuple of *αi* with respect to *B*.

## The matrix of a linear transformation

Given a matrix

M

{\displaystyle M}

 whose columns are the vectors of the new basis of the space (new basis matrix), the new coordinates for a column vector

v

{\displaystyle v}

 are given by the matrix product

M

−
1

v

{\displaystyle M^{-1}v}

.

From Wikipedia:Matrix similarity:

Given a linear transformation:

# y
T
x

{\displaystyle y = Tx}

,
it can be the case that a change of basis can result in a simpler form of the same transformation.

y
′

=
S

x
′

{\displaystyle y' = Sx'}

,
where x' and y' are in the new basis.

x
′

=
P
x

{\displaystyle x' = P x}

y
′

=
P
y

{\displaystyle y' = P y}

and P is the change-of-basis matrix.
To derive T in terms of the simpler matrix, we use:

y
′

=
S

x
′

P
y

=
S
P
x

P

−
1

P
y

=

P

−
1

S
P
x

y

=

(

P

−
1

S
P

)

# x
T
x

{\displaystyle \begin{align}
y' &= Sx' \\
Py &= SPx \\
P^{-1}Py &= P^{-1}SPx \\
y &= \left(P^{-1}SP\right)x = Tx
\end{align}}

Thus, the matrix in the original basis is given by

# T

P

−
1

S
P

{\displaystyle T = P^{-1}SP}

Therefore

# S
P
T

P

−
1

{\displaystyle S = PTP^{-1}}

In effect, the similarity transform operates in three steps: change to a new basis (P), perform the simple transformation (S), and change back to the old basis (P−1).

## The matrix of a bilinear form

A *bilinear form* on a vector space *V* over a field **R** is a mapping *V* × *V* → **R** which is linear in both arguments. That is, *B* : *V* × *V* → **R** is bilinear if the maps

v
↦
B
(
v
,
w
)

{\displaystyle v\mapsto B(v,w)}

v
↦
B
(
w
,
v
)

{\displaystyle v\mapsto B(w,v)}

are linear for each *w* in *V*. This definition applies equally well to modules over a commutative ring with linear maps being module homomorphisms.

The Gram matrix *G* attached to a basis

α

1

,
…
,

α

n

{\displaystyle \alpha \_{1},\dots ,\alpha \_{n}}

 is defined by

G

i
,
j

=
B
(

α

i

,

α

j

)
.

{\displaystyle G\_{i,j}=B(\alpha \_{i},\alpha \_{j}).}

If

# v

∑

i

x

i

α

i

{\displaystyle v=\sum \_{i}x\_{i}\alpha \_{i}}

 and

# w

∑

i

y

i

α

i

{\displaystyle w=\sum \_{i}y\_{i}\alpha \_{i}}

 are the expressions of vectors *v*, *w* with respect to this basis, then the bilinear form is given by

B
(
v
,
w
# )

v

T

G
w
.

{\displaystyle B(v,w)=v^{\mathsf {T}}Gw.}

The matrix will be symmetric if the bilinear form *B* is a symmetric bilinear form.

### Change of basis

If *P* is the invertible matrix representing a change of basis from

α

1

,
…
,

α

n

{\displaystyle \alpha \_{1},\dots ,\alpha \_{n}}

 to

α

1

′

,
…
,

α

n

′

{\displaystyle \alpha '\_{1},\dots ,\alpha '\_{n}}

then the Gram matrix transforms by the matrix congruence

G
′

=

P

T

G
P
.

{\displaystyle G'=P^{\mathsf {T}}GP.}

## Important instances

In abstract vector space theory the change of basis concept is innocuous; it seems to add little to science. Yet there are cases in associative algebras where a change of basis is sufficient to turn a caterpillar into a butterfly, figuratively speaking:

* In the split-complex number plane there is an alternative "diagonal basis". The standard hyperbola *xx* − *yy* = 1 becomes *xy* = 1 after the change of basis. Transformations of the plane that leave the hyperbolae in place correspond to each other, modulo a change of basis. The contextual difference is profound enough to then separate Lorentz boost from squeeze mapping. A panoramic view of the literature of these mappings can be taken using the underlying change of basis.
* With the 2 × 2 real matrices one finds the beginning of a catalogue of linear algebras due to Arthur Cayley. His associate James Cockle put forward in 1849 his algebra of *coquaternions* or split-quaternions, which are the same algebra as the 2 × 2 real matrices, just laid out on a different matrix basis. Once again it is the concept of change of basis that synthesizes Cayley's matrix algebra and Cockle's coquaternions.
* A change of basis turns a 2 × 2 complex matrix into a biquaternion.