Change of basis (source code)

= Change of basis
{wiki}

A <change of basis> rewrites a <vector> using a different <ordered basis> of the same <vector space>. The <vector> stays fixed; its <coordinate vector> changes because the measuring directions change. Both <bases> must describe every <vector> uniquely, so a <change of basis> is reversible.

Start with the <Cartesian basis> $e_1=(1,0)$, $e_2=(0,1)$, and choose the new <basis vectors> $u=(1,1)$ and $v=(1,-1)$. For the <vector> $z=(2,0)$,
$$
z=2e_1+0e_2=u+v,\qquad
[z]_{\rm old}=\begin{pmatrix}2\\0\end{pmatrix},\qquad
[z]_{\rm new}=\begin{pmatrix}1\\1\end{pmatrix}.
$$
The second <coordinate vector> says to travel once along $u$ and once along $v$. Their vertical contributions cancel, leaving exactly the original horizontal arrow. The diagram shows two descriptions of that same arrow, with the same origin and endpoint.

\Image[/change-of-basis-coordinates.png]
{title=The same <vector> expressed in two <bases>: $2e_1=u+v$}

Choosing a useful <basis> can reveal simple structure hidden by the old <coordinate vectors>. Here the new <basis> describes common and opposing contributions. For two equal measurements $(5,5)$, the new <coordinate vector> is $(5,0)$: only the common contribution is present. In larger examples, a suitable <basis> can concentrate important information into a few <coefficients>. Strang's lecture on <change of basis> develops this principle through applications: the reversible <change of basis> preserves information, while subsequently discarding small <coefficients> loses information.https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/resources/lecture-31-change-of-basis-image-compression/[Strang, Lecture 31: Change of basis; image compression]{ref}