# Change of basis

In linear algebra, a basis for a vector space of dimension *n* is a sequence of *n* vectors (α_{1}, …, α_{n}) with the property that every vector in the space can be expressed uniquely as a 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 terminology of vector spaces is used below and the symbol *R* can be taken to mean the field of real numbers, the results discussed hold whenever *R* is a commutative ring and *vector space* is everywhere replaced with *free R-module*.

## Contents

## Preliminary notions

The standard basis for *R ^{n}* is the ordered sequence (

**e**

_{1}, …,

**e**

_{n}), where

**e**

_{j}is the element of

*R*with 1 in the

^{n}*j*th place and 0s elsewhere.

If *T* : *R ^{n}* →

*R*is a linear transformation, the

^{m}*m*×

*n*

**matrix of**

*T*is the matrix

**t**whose

*j*th column is

*T*(

**e**

_{j}) for

*j*= 1, …,

*n*. In this case we have

*T*(

**x**) =

**tx**for all

**x**in

*R*, where we regard

^{n}**x**as a column vector and the multiplication on the right side is matrix multiplication. It is a basic fact in linear algebra that the vector space Hom(

*R*,

^{n}*R*) of all linear transformations from

^{m}*R*to

^{n}*R*is naturally isomorphic to the space

^{m}*R*

^{m × n}of

*m*×

*n*matrices over

*R*; that is, a linear transformation

*T*:

*R*→

^{n}*R*is for all intents and purposes equivalent to its matrix

^{m}**t**.

We will also make use of the following simple observation.

**Theorem** Let *V* and *W* be vector spaces, let {α_{1}, …, α_{n}} be a basis for *V*, and let {γ_{1}, …, γ_{n}} be any *n* vectors in *W*. Then there exists a unique linear transformation *T* : *V* → *W* with *T*(α_{j}) = γ_{j} for *j* = 1, …, *n*.

This unique *T* is defined by *T*(*x*_{1}α_{1} + … + *x _{n}*α

_{n}) =

*x*

_{1}γ

_{1}+ … +

*x*γ

_{n}_{n}. Of course, if {γ

_{1}, …, γ

_{n}} happens to be a basis for

*W*, then

*T*is bijective as well as linear; in other words,

*T*is an isomorphism. If in this case we also have

*W*=

*V*, then

*T*is said to be an automorphism.

Now let *V* be a vector space over *R* and suppose {α_{1}, …, α_{n}} is a basis for *V*. By definition, if ξ is a vector in *V* then ξ = *x*_{1}α_{1} + … + *x _{n}*α

_{n}for a unique choice of scalars

*x*

_{1}, …,

*x*in

_{n}*R*called the

**coordinates of**ξ

**relative to the ordered basis**{α

_{1}, …, α

_{n}}. The vector

**x**= (

*x*

_{1}, …,

*x*) in

_{n}*R*is called the

^{n}**coordinate tuple of**ξ (relative to this basis). The unique linear map φ :

*R*→

^{n}*V*with φ(

**e**

_{j}) = α

_{j}for

*j*= 1, …,

*n*is called the

**coordinate isomorphism**for

*V*and the basis {α

_{1}, …, α

_{n}}. Thus φ(

**x**) = ξ if and only if ξ =

*x*

_{1}α

_{1}+ … +

*x*α

_{n}_{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 ξ, in the vector space *V*, change when we select another basis.

### Two dimensions

This means that given a matrix *M* whose columns are the vectors of the new basis of the space (new basis matrix), the new coordinates for a column vector *v* are given by the matrix product *M*^{−1}*v*. For this reason, it is said that normal 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

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):

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

### General case

Suppose {α_{1}, …, α_{n}} and {α′_{1}, …, α′_{n}} are two ordered bases for *V*. Let φ_{1} and φ_{2} be the corresponding coordinate isomorphisms (linear maps) from *R ^{n}* to

*V*, i.e. φ

_{1}(

**e**

_{j}) = α

_{j}and φ

_{2}(

**e**

_{j}) = α′

_{j}for

*j*= 1, …,

*n*.

If **x** = (*x*_{1}, …, *x*_{n}) is the coordinate *n*-tuple of ξ with respect to the first basis, so that ξ = φ_{1}(**x**), then the coordinate tuple of ξ with respect to the second basis is φ_{2}^{−1}(ξ) = φ_{2}^{−1}(φ_{1}(**x**)). Now the map φ_{2}^{−1} ∘ φ_{1} is an automorphism on *R ^{n}* and therefore has a matrix

**p**. Moreover, the

*j*th column of

**p**is φ

_{2}

^{−1}∘ φ

_{1}(

**e**

_{j}) = φ

_{2}

^{−1}(α

_{j}), that is, the coordinate

*n*-tuple of α

_{j}with respect to the second basis {α′

_{1}, …, α′

_{n}}. Thus

**y**= φ

_{2}

^{−1}(φ

_{1}(

**x**)) =

**px**is the coordinate

*n*-tuple of ξ with respect to the basis {α′

_{1}, …, α′

_{n}}.

## The matrix of a linear transformation

Now suppose *T* : *V* → *W* is a linear transformation, {α_{1}, …, α_{n}} is a basis for *V* and {β_{1}, …, β_{m}} is a basis for *W*. Let φ and ψ be the coordinate isomorphisms for *V* and *W*, respectively, relative to the given bases. Then the map *T*_{1} = ψ^{−1} ∘ *T* ∘ φ is a linear transformation from *R ^{n}* to

*R*, and therefore has a matrix

^{m}**t**; its

*j*th column is ψ

^{−1}(

*T*(α

_{j})) for

*j*= 1, …,

*n*. This matrix is called the matrix of

*T*with respect to the ordered bases {α

_{1}, …, α

_{n}} and {β

_{1}, …, β

_{m}}. If η =

*T*(ξ) and

**y**and

**x**are the coordinate tuples of η and ξ, then

**y**= ψ

^{−1}(T(φ(

**x**))) =

**tx**. Conversely, if ξ is in

*V*and

**x**= φ

^{−1}(ξ) is the coordinate tuple of ξ with respect to {α

_{1}, …, α

_{n}}, and we set

**y**=

**tx**and η = ψ(

**y**), then η = ψ(

*T*

_{1}(

**x**)) =

*T*(ξ). That is, if ξ is in

*V*and η is in

*W*and

**x**and

**y**are their coordinate tuples, then

**y**=

**tx**if and only if η =

*T*(ξ).

**Theorem** Suppose *U*, *V* and *W* are vector spaces of finite dimension and an ordered basis is chosen for each. If *T* : *U* → *V* and *S* : *V* → *W* are linear transformations with matrices **s** and **t**, then the matrix of the linear transformation *S* ∘ *T* : *U* → *W* (with respect to the given bases) is **st**.

### Change of basis

Now we ask what happens to the matrix of *T* : *V* → *W* when we change bases in *V* and *W*. Let {α_{1}, …, α_{n}} and {β_{1}, …, β_{m}} be ordered bases for *V* and *W* respectively, and suppose we are given a second pair of bases {α′_{1}, …, α′_{n}} and {β′_{1}, …, β′_{m}}. Let φ_{1} and φ_{2} be the coordinate isomorphisms taking the usual basis in *R ^{n}* to the first and second bases for

*V*, and let ψ

_{1}and ψ

_{2}be the isomorphisms taking the usual basis in

*R*to the first and second bases for

^{m}*W*.

Let *T*_{1} = ψ_{1}^{−1} ∘ *T* ∘ φ_{1}, and *T*_{2} = ψ_{2}^{−1} ∘ *T* ∘ φ_{2} (both maps taking *R ^{n}* to

*R*), and let

^{m}**t**

_{1}and

**t**

_{2}be their respective matrices. Let

**p**and

**q**be the matrices of the change-of-coordinates automorphisms φ

_{2}

^{−1}∘ φ

_{1}on

*R*and ψ

^{n}_{2}

^{−1}∘ ψ

_{1}on

*R*.

^{m}The relationships of these various maps to one another are illustrated in the following commutative diagram.

Since we have *T*_{2} = ψ_{2}^{−1} ∘ *T* ∘ φ_{2} = (ψ_{2}^{−1} ∘ ψ_{1}) ∘ *T*_{1} ∘ (φ_{1}^{−1} ∘ φ_{2}), and since composition of linear maps corresponds to matrix multiplication, it follows that

**t**_{2}=**q****t**_{1}**p**^{−1}.

Given that the change of basis has once the basis matrix and once its inverse, this objects are said to be 1-co, 1-contra-variant.

## The matrix of an endomorphism

An important case of the matrix of a linear transformation is that of an endomorphism, that is, a linear map from a vector space *V* to itself: that is, the case that *W* = *V*. We can naturally take {β_{1}, …, β_{n}} = {α_{1}, …, α_{n}} and {β′_{1}, …, β′_{m}} = {α′_{1}, …, α′_{n}}. The matrix of the linear map *T* is necessarily square.

### Change of basis

We apply the same change of basis, so that **q** = **p** and the change of basis formula becomes

**t**_{2}=**p****t**_{1}**p**^{−1}.

In this situation the invertible matrix **p** is called a change-of-basis matrix for the vector space *V*, and the equation above says that the matrices **t**_{1} and **t**_{2} are similar.

## 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

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 is defined by

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

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 to then the Gram matrix transforms by the matrix congruence

## 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.

## See also

- Coordinate vector
- integral transform, the continuous analogue of change of basis.
- Active and passive transformation

## External links

- MIT Linear Algebra Lecture on Change of Basis, from MIT OpenCourseWare
- Khan Academy Lecture on Change of Basis, from Khan Academy