# Basis and coordinates

This is very much a "motivation" page and a discussion of the topic.

See Change of basis matrix for the more maths aspect.

## What is a coordinate

Suppose we have a Basis, a finite one, $\{b_1,...,b_n\}$, a point [ilmath]p[/ilmath] is given by [ilmath]\sum^n_{k=1}a_ib_i[/ilmath] and it is said to have coordinates $(a_1,...,a_n)$ - because the basis set must be linearly independent, there is only one such $(a_1,...,a_n)$ - hence "coordinate"

## First example

Let us suppose we have two people working on squared paper, one of them is working on nice normal squared paper, the other one has found squared paper with squares half the length.

Immediately one sees that the point [ilmath](0,1)[/ilmath] in our space is [ilmath](0,2)[/ilmath] in theirs.

We will call their space "prime" space, so the coordinate [ilmath](x,y)[/ilmath] is on our paper, and [ilmath](x,y)'[/ilmath] or [ilmath](x',y')[/ilmath] is on their paper.

It is immediately obvious that $(x,y)=(2x,2y)'$ but is this a linear transform? Well recall to be linear $T(ax+by)=aT(x)+bT(y)$

Let us try it $(ax_1+bx_2,ay_1+by_1)=(2ax_1+2bx_2,2ay_1+2by_2)'=a(2x_1,2y_1)'+b(2x_2,2y_2)'$

This looks linear. So what is the change of basis matrix? Well without knowing that we can see quite obviously that:

$\begin{pmatrix}2 & 0 \\ 0 & 2\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}2x\\2y\end{pmatrix}$

### Formal definitions

• Let $S$ be our squared paper
• Let $S'$ be their squared paper
• Let $L:S\rightarrow S'$ be the transform that maps points on our paper to their paper.

Then the matrix form of L, denoted $[L]_S^{S'}=\begin{pmatrix}2&0\\0&2\end{pmatrix}$

Notice the notation $[L]^\text{to}_\text{from}$

### Inverse

It is clear from simple thought that to go from [ilmath]S'[/ilmath] to [ilmath]S[/ilmath] the transform is simply $(x,y)'=(\frac{1}{2}x,\frac{1}{2}y)$ and it is easy to show that this is linear. Let us call this map [ilmath]K[/ilmath] and define it as follows:

$K:S'\rightarrow S$ - then $[K]_{S'}^S=\begin{pmatrix}\frac{1}{2}&0\\0&\frac{1}{2}\end{pmatrix}$

This notation seems a little heavy and redundant (for example what would $[K]_A^B$ mean? We will come to that later)

### Combining things together

We now have the functions:

• $L:S\rightarrow S'$
• $K:S'\rightarrow S$

These are linear isomorpisms (they're bijective and linear) and just like functions we can compose them.

$[L]_S^{S'}[K]_{S'}^S$ is the transform that takes a point in [ilmath]S[/ilmath] to [ilmath]S'[/ilmath] followed by another transform that takes that point in [ilmath]S'[/ilmath] to a point in [ilmath]S[/ilmath]

If you multiply these matrices (which I simply cannot be bothered to write) you will get the identity matrix, that is $([L]_S^{S'}[K]_{S'}^S)(x,y)=(x,y)$

## Introducing a third person

What we have so far, including third person. There is an error within the [ilmath]S[/ilmath] space, the blue thick lines representing basis vectors should be double their depicted length

The bold lines are the "basis" vectors, notice the unit square differs in all of these.

Rather than working out the transform from [ilmath]C[/ilmath] to [ilmath]S'[/ilmath] or whatever we can simply notice:

$\begin{pmatrix}a&\times \\ b&\times\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix}=\begin{pmatrix}a\\b\end{pmatrix}$

Recall the definition of coordinate, $\begin{pmatrix}1\\0\end{pmatrix}$ is the point $b_1$ (where [ilmath]b_1[/ilmath] is the first basis vector)

So this transform takes the first basis vector in one space to $\begin{pmatrix}a\\b\end{pmatrix}$ in another.

We will use $(x,y)''$to denote a point in [ilmath]C[/ilmath]

### Coordinates again

It is clear from the diagram that $(0,1)=(0,2)'=(1,1)''$

### Interpreting the determinant

Notice the unit square in [ilmath]S[/ilmath] - it's 4 of [ilmath]S'[/ilmath]'s squares big in area, notice that $\text{Det}(\begin{pmatrix}2&0\\0&2\end{pmatrix})=4$, this is indeed the geometric interpreteration of the determinant!

Using [ilmath]\ell^2_\text{Space} [/ilmath] to denote unit area in Space we see that

$1\ell^2_S=4\ell^2_{S'}=2\ell_C^2$

Visually there are 4 half squares in the unit square in [ilmath]C[/ilmath], which is 2 full squares (keep in mind one square on my paper is one square in [ilmath]S'[/ilmath]) so yes, 4 full squares = 1 unit square in [ilmath]S[/ilmath] = is 2 unit squares in [ilmath]C[/ilmath]

This can take a while to get used to but is really quite a nice and easy thing to see

#### Inverse

If $1\ell_S^2=4\ell^2_{S'}$ then surely we have $1\ell^2_{S'}=\frac{1}{4}\ell^2_{S}$ and indeed we do, this is the geometric interpretation of: $\text{Det}(A^{-1})=\frac{1}{\text{Det}(A)}$ and the core of the theorem that:

• A matrix is invertible if and only if it has non-zero determinant

### Computing the change of basis

So using $\begin{pmatrix}a&\times \\ b&\times\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix}=\begin{pmatrix}a\\b\end{pmatrix}$ we wish to find a map

• $[G]_S^C$
• $G:S\rightarrow C$

Either of these will do.

It is clear that $(0,1)\mapsto(1,1)$ and $(1,0)\mapsto(1,-1)$ so we quickly get the matrix $[G]_S^C=\begin{pmatrix}1&1\\-1&1\end{pmatrix}$ we can of course compose this just like before, for example $[K]_{S'}^S[G]_S^C:S'\rightarrow C$ this takes a point in $S'\mapsto S\mapsto C$

## Notation

In all cases above we actually had maps on $\mathbb{R}^2$, for example $S$ was just $\mathbb{R}^2$ with a certain basis. This means we should have really written $L:\mathbb{R}^2\rightarrow\mathbb{R}^2$ not $L:S\rightarrow S'$ however this is less descriptive.

For two basis sets [ilmath]A[/ilmath] and [ilmath]B[/ilmath] do not be afraid to write $L:\mathbb{R}^2_A\rightarrow\mathbb{R}^2_B$ but don't be eager to, notice that our three functions, [ilmath]L,K[/ilmath] and [ilmath]G[/ilmath] don't actualy do anything, they map a point to the same point, just expressed in a different basis.

This is where the $[\cdot]^B_A$ notation comes in handy.

### L is actually the identity

Yes that function $L(x,y)\mapsto(2x,2y)'$ is actually $[Id]_S^{S'}$ this suggests that any invertible linear map is actually just a change of basis betwee two things. Furthermore that the columns of the matrix are what each basis element is taken to. As stated above with $\begin{pmatrix}a&\times \\ b&\times\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix}=\begin{pmatrix}a\\b\end{pmatrix}$

### So why is there room for a letter in $[\cdot]_A^B$

Well although it is true that every invertible linear transform is a change of basis from one basis to some other - we don't have to care what it is. For suppose we wish to scale all points by 3, this has the matrix $\begin{pmatrix}3&0 \\ 0&3\end{pmatrix}$, we will call this transform $S_3$ for "scale-3".

Then:

• $S_3:\mathbb{R}^2\rightarrow\mathbb{R}^2$
• $[S_3]_E^E=\begin{pmatrix}3&0\\0&3\end{pmatrix}$ where [ilmath]E[/ilmath] is some basis on [ilmath]\mathbb{R}^2[/ilmath] - and it is certainly not the identity.

Note $[\cdot]_B$ is simply short hand for $[\cdot]_B^B$

## A basis need not be orthogonal

Consider:

What we have so far, including third person. There is an error within the [ilmath]S[/ilmath] space, the blue thick lines representing basis vectors should be double their depicted length

And again recall: $\begin{pmatrix}a&\times \\ b&\times\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix}=\begin{pmatrix}a\\b\end{pmatrix}$

We can see $(1,0)^G\mapsto(\frac{1}{4},1)$ (where $(x,y)^G$ denotes a coordinate given with respect to the green basis) and $(0,1)^G\mapsto(\frac{1}{2},1)$

This gives: $[Id]^S_G=\begin{pmatrix}\frac{1}{4}&\frac{1}{2}\\1&1\end{pmatrix}$

It is geometrically significant that the determinant of this transform is $-\frac{1}{4}$, notice how $(0,0)^G\rightarrow(1,0)^G\rightarrow(1,1)^G$ goes "clockwise" in the plane, where as $(0,0)\rightarrow(1,0)\rightarrow(1,1)$ is going anti-clockwise - this transform has the effect of "turning the unit area inside out" if you will, and making it 1/4 of its former size.