\documentclass[11pt]{article}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{latexsym}
\usepackage{verbatim}
\usepackage[pdftex]{graphicx}
\usepackage{url}
\usepackage{cancel}
\usepackage[table]{xcolor}
\usepackage[all,arc]{xy}
\usepackage{color, colortbl}
\usepackage{mathrsfs}
\usepackage{hyperref}
\hypersetup{colorlinks=true}
\setlength{\oddsidemargin}{.25in}
\setlength{\evensidemargin}{.25in}
\setlength{\textwidth}{6in}
\setlength{\topmargin}{-0.4in}
\setlength{\textheight}{8.5in}

\input{preamble.tex}

\begin{document}

\lecture{2: Change of Basis}{Week 2}

On Friday of last week, we asked the following question: given the matrix $A = \begin{bmatrix} 1 & 1\\ 1 & 0 \\ \end{bmatrix}$, is there a quick way to calculate large powers of this matrix?  Our answer to this question turned out to be yes!  We did this by writing
\begin{align*}
\begin{bmatrix} 1 & 1\\ 1 & 0\\ \end{bmatrix} &=  \begin{bmatrix}  \frac{\varphi}{\sqrt{1+\varphi^2}} &-\frac{1}{\sqrt{1+\varphi^2}}\\\frac{1}{\sqrt{1+\varphi^2}}  & \frac{\varphi}{\sqrt{1+\varphi^2}} \\ \end{bmatrix} \cdot \begin{bmatrix} \varphi  & 0\\0  &  (-\frac{1}{\varphi})\\ \end{bmatrix} \cdot \begin{bmatrix}\frac{\varphi}{\sqrt{1+\varphi^2}}  & \frac{1}{\sqrt{1+\varphi^2}} \\-\frac{1}{\sqrt{1+\varphi^2}}   & \frac{\varphi}{\sqrt{1+\varphi^2}} \\ \end{bmatrix}, \\
\end{align*}
which is particularly nice because it writes $A$ in the form $UDU^{-1}$, where $D$ is a diagonal matrix (i.e.\ its only nonzero entries are on its diagonal.)  This lets us find $A^k$ very quickly, as it is just 
\begin{align*}
UD\cancel{U^{-1} }\cdot \cancel{U}D\cancel{U^{-1} }\cdot\ldots \cdot\cancel{U}DU^{-1} = UD^k U^{-1},
\end{align*}
which is very easy to calculate!

In general, this problem --- given a matrix $A$, how can we calculate $A^n$ quickly --- is something that mathematicians and scientists run into constantly.  We came up with a solution for one specific matrix on Friday; but how can we do this in general?  

There are a lot of techniques people have came up with when examining this problem.  One particularly useful idea is the following concept of a ``change of basis,'' which we study in the next section!
\section{Change of Basis}

Here's a quick motivational question: suppose that we're working in $\mathbb{R}^2$.  What \textbf{is} the vector $(2,3)$?  
\begin{center}
\includegraphics[width=1.5in]{math108b_lecture2_xyplane.pdf}
\end{center}

Ok: this seems dumb.  But there is a real question here: what do we mean when we write down the vector $(2,3)$?  Well: usually we mean that we have the vector in the $xy$-plane whose $x$-co\"ordinate is 2, and whose $y$-co\"ordinate is 3.  In other words, when we're thinking about $\mathbb{R}^2$, we already have a \textbf{built-in basis} in mind for it --- specifically, the standard basis $\vec{e_1} = \mathbf{x} = (1,0), \vec{e_2} = \mathbf{y} = (0,1)$.  Using this standard basis, we interpret things like $(2,3)$ as meaning ``two copies of $\vec{e_1}$, plus three copies of $\vec{e_2}$.''

Which makes sense!  However, over the course of Math 108A, we saw \textbf{tons} of different bases for $\mathbb{R}^n$.  Why don't we sometimes use some of \textbf{those} bases instead?  

This idea leads us to the following definition:
\begin{defn}
Take any vector space $F^n$.   (Almost always in this course, $F$ will almost always denote $\mathbb{R}$, or sometimes $\mathbb{C}$.) As well, take some basis $B = \{\vec{b_1}, \ldots \vec{b_n} \}$ for $F^n$.  Take an ordered set of $n$ elements from $F$, say $(v_1, \ldots v_n)$.  We can interpret this as a \textbf{vector using the basis $B$} by associating it as follows to a vector in $F^n$:
\begin{align*}
(v_1, \ldots v_n)_{\textrm{ a vector using the basis }B} = v_1 \vec{b_1} + v_2 \vec{b_2} + \ldots +v_n \vec{b_n}.
\end{align*}
\end{defn}

In this sense, we've been interpreting vectors for the past quarter as ``vectors under the standard basis $\vec{e_1},\ldots \vec{e_n}$.'' In general, unless we explicitly write otherwise, we will work with these standard vectors; i.e.\ only interpret a vector as existing in some other base if we give it a subscript describing what base it is in!

To illustrate the idea, we run a quick example:
\begin{example}
Take $\mathbb{R}^4$ with the basis 
\begin{align*}
B = \{ \vec{b_1} = (1,1,0,0), \vec{b_2} = (0,1,1,0),\vec{b_3} =  (0,0,1,1), \vec{b_4} = (0,0,0,1)\}.
\end{align*}
(Again, note that because we haven't subscripted these vectors with some other basis, we are interpreting these four vectors in the ``standard'' fashion: i.e. $(1,1,0,0)$ denotes the object $\vec{e_1} + \vec{e_2}$ in $\mathbb{R}^4$.)

Consider the vector $(1,2,3,4)_{\textrm{ a vector using the basis }B}$.  In the standard basis, what is this vector?
\end{example}
\begin{answer}
So: by definition, we have
\begin{align*}
(1,2,3,4)_{\textrm{ a vector using the basis }B} &= 1 \vec{b_1} + 2\vec{b_2} + 3\vec{b_3} + 4\vec{b_4}\\
&= \overbrace{1 \cdot (1,1,0,0) + 2(0,1,1,0) + 3(0,0,1,1,) + 4(0,0,0,1)}^{\textrm{now working in the standard basis}}\\
&= (1,3,5,7).
\end{align*}
So the vector $(1,2,3,4)_{\textrm{ a vector using the basis }B}$ corresponds to the vector $(1,3,5,7)$ in the standard basis.
\end{answer}

\begin{example}
Take $\mathbb{R}^3$, and the vector $(1,2,3)$.  Write this vector with respect to the basis 
\begin{align*}
B = \{ \vec{b_1} = (1,0,0), \vec{b_2} = (1,1,0),\vec{b_3} =  (0,1,1)\}.
\end{align*}
\end{example}
\begin{answer}
So: we start by finding a way to express $(1,2,3)$ as a sum of things in our basis:
\begin{align*}
(1,2,3) &= 2(1,0,0) -1(1,1,0) + 3(0,1,1).
\end{align*}
Consequently, we can write
\begin{align*}
(1,2.3) &= (2, -1, 3)_B.
\end{align*}
\end{answer}

The above two examples worked in an ad-hoc sense; given a vector written in one basis, we were able to write it in another with little work.  There is a more efficient way, however!  Given a basis $B = \{\vec{b_1}, \ldots \vec{b_n}\}$ for some space $F^n$, consider the following matrix:

\begin{align*}
\begin{bmatrix} 
\vdots & \vdots &  \ldots & \vdots \\
\vec{b_1}  & \vec{b_2} & \ldots &\vec{b_n} \\
\vdots & \vdots &\ldots & \vdots \\
\end{bmatrix}.
\end{align*}

Suppose we take a vector of the form $(x_1, \ldots x_n)$, and multiply this vector by our matrix: what do we get?  Well:
\begin{align*}
\begin{bmatrix} 
\vdots & \vdots &  \ldots & \vdots \\
\vec{b_1}  & \vec{b_2} & \ldots &\vec{b_n} \\
\vdots & \vdots &\ldots & \vdots \\
\end{bmatrix} \cdot \begin{bmatrix} x_1 \\ \vdots \\ x_n \end{bmatrix} = x_1 \vec{b_1} + \ldots + x_n\vec{b_n}.
\end{align*}
In other words:
\begin{align*}
\begin{bmatrix} 
\vdots & \vdots &  \ldots & \vdots \\
\vec{b_1}  & \vec{b_2} & \ldots &\vec{b_n} \\
\vdots & \vdots &\ldots & \vdots \\
\end{bmatrix} \cdot \begin{bmatrix} x_1 \\ \vdots \\ x_n \end{bmatrix} = (x_1, \ldots x_n)_B.
\end{align*}
This matrix allows us to convert vectors written in the standard notation to vectors written with respect to the base $B$!  Similarly, notice that if we multiply both the left- and right-hand-sides above by $\begin{bmatrix} 
\vdots & \vdots &  \ldots & \vdots \\
\vec{b_1}  & \vec{b_2} & \ldots &\vec{b_n} \\
\vdots & \vdots &\ldots & \vdots \\
\end{bmatrix}^{-1}$, we get
\begin{align*}
(x_1, \ldots x_n) &= \begin{bmatrix} 
\vdots & \vdots &  \ldots & \vdots \\
\vec{b_1}  & \vec{b_2} & \ldots &\vec{b_n} \\
\vdots & \vdots &\ldots & \vdots \\
\end{bmatrix}^{-1} \cdot  \left(x_1 \vec{b_1} + \ldots + x_n\vec{b_n}\right) \\
&= \begin{bmatrix} 
\vdots & \vdots &  \ldots & \vdots \\
\vec{b_1}  & \vec{b_2} & \ldots &\vec{b_n} \\
\vdots & \vdots &\ldots & \vdots \\
\end{bmatrix}^{-1} \cdot  (x_1, \ldots x_n)_B.
\end{align*}
Therefore, we can use the inverse of this matrix to translate vectors written in the base $B$ to vectors written with the standard basis!  We call these matrices \textbf{change of basis matrices}; they're rather useful, and will come up often in this course.

The main reason we care about this idea is not because it gives us a new way to look at vectors, but rather because it gives us a new way to look at things that \textbf{act on vectors}: i.e.\ \textbf{matrices!}  Think back to last quarter, when we discussed how to turn a \textbf{linear transformation} into a \textbf{matrix}:


\begin{defn}
Take a linear map $T: F^n \to F^n$.  (Again, $F$ will almost always denote $\mathbb{R}$, or sometimes $\mathbb{C}$.) Let the vectors $\vec{e_1}, \ldots \vec{e_n}$ denote the standard basis vectors for $F^n$: i.e.\ $\vec{e_1} = (1,0,\ldots 0), \vec{e_2} = (0,1,0\ldots0), \ldots \vec{e_n} = (0,0\ldots0,1)$.  

Take all of the vectors $T(\vec{e_i})$ in $F^n$, where $i$ ranges from $1$ to $n$.  We can use these vectors to represent $T$ as an $n \times n$ \textbf{matrix} as follows:
\begin{align*}
T \longrightarrow T_{\textrm{matrix}}  = 
\begin{bmatrix} 
\vdots & \vdots &  \ldots & \vdots \\
T(\vec{e_1})  & T(\vec{e_2}) & \ldots & T(\vec{e_n}) \\
\vdots & \vdots &\ldots & \vdots \\
\end{bmatrix},
\end{align*}

Similarly, given some $n \times n$ matrix 
\begin{align*}
A = 
\begin{bmatrix} 
a_{1,1} & a_{1,2} & \ldots & a_{1,n} \\
a_{2,1} & a_{2,2} & \ldots & a_{2,n} \\
\vdots & \vdots & \ddots & \vdots \\
a_{n,1} & a_{n,2} & \ldots & a_{n,n} \\
\end{bmatrix},
\end{align*}
 we can interpret $A$ as a \textbf{linear map} $A_{\textrm{map}}:F^n$ to $F^n$ as follows:
\begin{itemize}
\item For any of the standard basis vectors $\vec{e_i}$, we define $A_{\textrm{map}}(\vec{e_i})$ to simply be the vector $(a_{1,i}, \ldots a_{n,i})$.
\item For any other vector $(x_1, \ldots x_n) \in F^n$, we define $A_{\textrm{map}}(x_1, \ldots x_n)$ to simply be the corrresponding linear combination of the $\vec{e_i}$'s: i.e.\
\begin{align*}
A_{\textrm{map}}:(x_1, \ldots x_n) := x_1 \cdot A_{\textrm{map}}(\vec{e_1}) + \ldots + x_n A_{\textrm{map}}(\vec{e_n}).
\end{align*}
\end{itemize}
\end{defn}

In the above work, we basically chose to represent a linear transformation as a matrix by looking at where it sent the \textbf{standard basis vectors} $\vec{e_1}, \ldots \vec{e_n}$.  However: again, if we're looking at $\mathbb{R}^n$ or $\mathbb{C}^n$, there are \textbf{many} different choices of basis that we can come up with that are not the standard basis!  So: can we represent a linear transformation as a matrix using these other bases?

The answer is yes!  We provide a definition and a few examples below:

\begin{defn}
Take a linear map $T: F^n \to F^n$.  (Again, $F$ will almost always denote $\mathbb{R}$, or sometimes $\mathbb{C}$.) As well, take some basis $B = \{\vec{b_1}, \ldots \vec{b_n}\}$ for $F^n$.  

Take all of the vectors $T(\vec{b_i})$ in $F^n$, where $i$ ranges from $1$ to $n$.  For each one of these vectors, because $B$ is a basis, we can find constants $t_{1,i}, \ldots t_{n,i}$ such that 
\begin{align*}
T(\vec{b_i}) = t_{1,i} \vec{b_1} + \ldots t_{n,i} \vec{b_n}.
\end{align*}
Take these sums, and use them to represent $T$ as an $n \times n$ \textbf{matrix} as follows:
\begin{align*}
T \longrightarrow T_{\textrm{matrix with respect to the basis }B}  = 
\begin{bmatrix} 
t_{1,1} & t_{2,1} &  \ldots & t_{n,1} \\
\vdots & \vdots & \ldots & \vdots  \\
t_{1,n} & t_{2,n} &\ldots & t_{n,n} \\
\end{bmatrix}_B,
\end{align*}

Similarly, given some $n \times n$ matrix $A$ with entries in $F$, we can interpret it as a linear transformation with respect to this basis $B$!  In other words, suppose we have
\begin{align*}
A_{\textrm{matrix with respect to the base }B} = 
\begin{bmatrix} 
a_{1,1} & a_{1,2} & \ldots & a_{1,n} \\
a_{2,1} & a_{2,2} & \ldots & a_{2,n} \\
\vdots & \vdots & \ddots & \vdots \\
a_{m,1} & a_{m,2} & \ldots & a_{n,n} \\
\end{bmatrix}_B = \begin{bmatrix} 
\vdots & \vdots &  \ldots & \vdots \\
\vec{a_{c_1}}  & \vec{a_{c_2}} & \ldots &\vec{a_{c_n}} \\
\vdots & \vdots &\ldots & \vdots \\
\end{bmatrix}_B,
\end{align*}
where $\vec{a_{c_i}}$ is the $i$-th column vector of $A$.  Then we can interpret $A$ as a \textbf{linear map} $A_{\textrm{map}}:F^n$ to $F^n$ as follows:
\begin{itemize}
\item For any of the basis vectors $\vec{b_i}$, we define $A_{\textrm{map}}(\vec{b_i})$ to simply be the vector $\vec{a_{c_i}}$.
\item Take any other vector $\vec{x}\in F^n$.  Because $B$ is a basis, we can write $\vec{x}$ as a unique linear combination of the elements of $B$: i.e.\
\begin{align*}
\vec{x} = c_1 \vec{b_1} + \ldots + c_n \vec{b_n}.
\end{align*}
Then, because we sent each $\vec{b_i}$ to the column $\vec{a_{c_i}}$ we should define $A_{\textrm{map}}(\vec{x})$ to simply be the corresponding linear combination of the $\vec{a_{c_i}}$'s: i.e.\
\begin{align*}
A_{\textrm{map, from a matrix written with basis }B}:(\vec{x}) := c_1 \vec{a_{c_1}} + \ldots + c_n \vec{a_{c_n}}.
\end{align*}
\end{itemize}
\end{defn}


  In general, if we have a matrix written with respect to any basis other than a standard basis, we will clearly denote this by giving it a subscript labeling it as a matrix written with respect to some other basis.  If you see a matrix without any such subscript, you can assume that it is a matrix written with respect to the standard basis.

To illustrate the ideas here, we work a pair of examples:

\begin{example}
Consider the following linear transformation $T$ from $\mathbb{R}^4 \to \mathbb{R}^4$:
\begin{align*}
T(a,b,c,d) = (a+b, a+c, a+d, a)
\end{align*}

Write this linear transformation as a matrix with respect to the standard basis, and also with respect to the basis $B = \{ \vec{b_1} = (1,0,0,0),\vec{b_2} = (1,1,0,0),\vec{b_3} = (0,1,1,0), \vec{b_4} =(0,0,1,1)\}$.
\end{example}
\begin{answer}
To write this linear map as a matrix with respect to the standard basis, we just need to find the following:
\begin{align*}
T \longrightarrow T_{\textrm{matrix}}  = 
\begin{bmatrix} 
\vdots & \vdots &  \ldots & \vdots \\
T(\vec{e_1})  & T(\vec{e_2}) & \ldots & T(\vec{e_n}) \\
\vdots & \vdots &\ldots & \vdots \\
\end{bmatrix} = \begin{bmatrix} 1 & 1 & 0 & 0\\ 1 & 0 & 1 & 0\\ 1 & 0 & 0 & 1\\ 1& 0 & 0 & 0 \end{bmatrix}.
\end{align*}

Writing this in terms of the basis $B$ is slightly tricker.  We first need to calculate the vectors $T(\vec{b_1}), \ldots T(\vec{b_n})$:
\begin{align*}
T((1,0,0,0)) &= (1,1,1,1) ,\\
T((1,1,0,0)) &= (2,1,1,1),\\
T((0,1,1,0)) &= (1,1,0,0),\\
T((0,0,1,1)) &= (0,1,1,0).\\
\end{align*}
Now, for each vector, we need to write it as a sum of elements in the basis:
\begin{align*}
T((1,0,0,0)) &= (1,1,1,1)  = (1,1,0,0) + (0,0,1,1) = \vec{b_2} + \vec{b_4},\\
T((1,1,0,0)) &= (2,1,1,1) = (1,0,0,0)+ (1,1,0,0) + (0,0,1,1) = \vec{b_1} + \vec{b_2} + \vec{b_4},\\
T((0,1,1,0)) &= (1,1,0,0) = \vec{b_2},\\
T((0,0,1,1)) &= (0,1,1,0) = \vec{b_3}.\\
\end{align*}
As a consequence, we can write the $T(\vec{b_i})$'s as vectors under the basis $B$:
\begin{align*}
T(\vec{b_1}) &= (0,1,0,1)_{\textrm{ a vector using the basis }B} ,\\
T(\vec{b_2}) &= (1,1,0,1)_{\textrm{ a vector using the basis }B} ,\\
T(\vec{b_3}) &= (0,1,0,0)_{\textrm{ a vector using the basis }B} ,\\
T(\vec{b_4}) &= (0,0,1,0)_{\textrm{ a vector using the basis }B} .\\
\end{align*}
From here, we can now turn $T$ into a $4 \times 4$ matrix $T$ with respect to the basis $B$, by just using the above vectors as our columns:
\begin{align*}
T_{\textrm{matrix with respect to the base }B} = 
\begin{bmatrix} 
0 & 1 & 0 & 0\\
1 & 1 & 1 & 0 \\
0 & 0& 0 & 1\\
1 & 1 & 0 & 0\\
\end{bmatrix}_B.
\end{align*}

Success!
\end{answer}

As the above example indicates, sometimes writing a matrix in some other base doesn't really make it look any prettier or nicer.  However, in other situations it really can!  Consider the example we worked with last Friday:
\begin{example}
Take the matrix $\begin{bmatrix} 1 & 1\\ 1 & 0\end{bmatrix}$, and write it using the basis 
\begin{align*}
B = \left\{ \vec{b_1} = \left( \frac{\varphi}{\sqrt{1 + \varphi^2}}, \frac{1}{\sqrt{1 + \varphi^2}}\right), \vec{b_2} = \left( \frac{1}{\sqrt{1 + \varphi^2}}, -\frac{\varphi}{\sqrt{1 + \varphi^2}}\right) \right\}.
\end{align*}
\end{example}
\begin{answer}
So: our first step is to turn this matrix into the linear transformation $T(x,y) = (x+y, x)$.  From here, we can proceed as we did in the earlier example.  Start by determining where this linear transformation takes the elements of our basis:
\begin{align*}
T \left( \frac{\varphi}{\sqrt{1 + \varphi^2}}, \frac{1}{\sqrt{1 + \varphi^2}}\right) &= \left( \frac{\varphi+ 1}{\sqrt{1 + \varphi^2}}, \frac{\varphi}{\sqrt{1 + \varphi^2}} \right).\\
T \left( \frac{1}{\sqrt{1 + \varphi^2}}, -\frac{\varphi}{\sqrt{1 + \varphi^2}}\right) &= \left( \frac{1-\varphi}{\sqrt{1 + \varphi^2}}, \frac{1}{\sqrt{1 + \varphi^2}} \right).\\
\end{align*}
Now, notice that because (as proven on Wednesday) $\varphi^2 = \varphi + 1$ and $\varphi^2 - \varphi = 1$, we have
\begin{align*}
 \left( \frac{\varphi+ 1}{\sqrt{1 + \varphi^2}}, \frac{\varphi}{\sqrt{1 + \varphi^2}} \right) &=  \left( \frac{\varphi^2}{\sqrt{1 + \varphi^2}}, \frac{\varphi}{\sqrt{1 + \varphi^2}} \right) \\
&= \varphi \left( \frac{\varphi}{\sqrt{1 + \varphi^2}}, \frac{1}{\sqrt{1 + \varphi^2}}\right)\\
&= \varphi \cdot \vec{b_1}, \textrm{ and}\\
 \left( \frac{1-\varphi}{\sqrt{1 + \varphi^2}}, \frac{1}{\sqrt{1 + \varphi^2}} \right) &=  \left( \frac{\frac{\varphi-\varphi^2}{\varphi}}{\sqrt{1 + \varphi^2}}, \frac{1}{\sqrt{1 + \varphi^2}} \right)\\
&=  \left( \frac{\frac{-1}{\varphi}}{\sqrt{1 + \varphi^2}}, \frac{1}{\sqrt{1 + \varphi^2}} \right)\\
&= \frac{-1}{\varphi} \left( \frac{1}{\sqrt{1 + \varphi^2}}, -\frac{\varphi}{\sqrt{1 + \varphi^2}}\right)\\
&= -\frac{1}{\varphi} \cdot \vec{b_2}.
\end{align*}

Therefore, we can write $T(\vec{b_1}) = \varphi \vec{b_1}$ and  $T(\vec{b_2}) = -\frac{1}{\varphi} \vec{b_2}$.  This means that we can write the matrix associated to this linear transformation as
\begin{align*}
T_{\textrm{matrix with respect to the basis }B} = \begin{bmatrix} \varphi & 0 \\ 0 & -\frac{1}{\varphi} \end{bmatrix}_B.
\end{align*}

So in other words, we have that
\begin{align*}
\begin{bmatrix}1 & 1\\ 1 & 0\\ \end{bmatrix}, \begin{bmatrix} \varphi & 0 \\ 0 & -\frac{1}{\varphi} \end{bmatrix}_B.
\end{align*}
correspond to the same linear transformations!
\end{answer}

In this situation, writing our matrix in another base is incredibly useful!  In this second base, matrix exponentiation is \textbf{really really easy}: because our matrix is diagonal, we have
\begin{align*}
\left(\begin{bmatrix} \varphi & 0 \\ 0 & -\frac{1}{\varphi} \end{bmatrix}_B\right)^n &= \overbrace{ \begin{bmatrix} \varphi & 0 \\ 0 & -\frac{1}{\varphi} \end{bmatrix}_B \cdot \ldots \cdot \begin{bmatrix} \varphi & 0 \\ 0 & -\frac{1}{\varphi} \end{bmatrix}_B \cdot \begin{bmatrix} \varphi & 0 \\ 0 & -\frac{1}{\varphi} \end{bmatrix}_B}^{n\textrm{ times}}\\
 &= \overbrace{ \begin{bmatrix} \varphi & 0 \\ 0 & -\frac{1}{\varphi} \end{bmatrix}_B \cdot \ldots \cdot \begin{bmatrix} \varphi & 0 \\ 0 & -\frac{1}{\varphi} \end{bmatrix}_B}^{n-2\textrm{ times}} \cdot \begin{bmatrix} \varphi^2 & 0 \\ 0 & \left(-\frac{1}{\varphi}\right)^2 \end{bmatrix}_B\\
 &= \overbrace{ \begin{bmatrix} \varphi & 0 \\ 0 & -\frac{1}{\varphi} \end{bmatrix}_B \cdot \ldots \cdot \begin{bmatrix} \varphi & 0 \\ 0 & -\frac{1}{\varphi} \end{bmatrix}_B}^{n-3\textrm{ times}} \cdot \begin{bmatrix} \varphi^2 & 0 \\ 0 & \left(-\frac{1}{\varphi}\right)^3 \end{bmatrix}_B\\
&\qquad \qquad\qquad \vdots\\
&= \begin{bmatrix} \varphi^n & 0 \\ 0 & \left(-\frac{1}{\varphi}\right)^n \end{bmatrix}_{B.}
\end{align*}

Punchline: in certain bases, it's really easy to raise a matrix to a large power!  That's great --- except we often don't want to have to work in strange bases all the time.  We like the standard basis!  

This then raises the last problem that we're going to consider in this section: on one hand, we've seen that it is sometimes nice to work in other bases.   But we don't want to have to do all of our work in other bases: it would be nice if we had some way to translate matrices back and forth between two different bases!  I.e. it's really useful to be able to think of the linear map in the example above as $\begin{bmatrix}1 & 1\\ 1 & 0\\ \end{bmatrix}$ in lots of situations when we're doing small manipulations, but also useful to think of it as $ \begin{bmatrix} \varphi & 0 \\ 0 & -\frac{1}{\varphi} \end{bmatrix}_B$ when we want to raise it to large powers!

So: how can we do this?  In other words: suppose I give you a matrix in some basis $B$.  How can you translate it back to the standard basis?

The answer here: the \textbf{change of basis} matrices from before!
\begin{prop}
Suppose we have some space $F^n$ with a basis $B = \{\vec{b_1}, \ldots \vec{b_n}\}$.  Suppose we have a $n \times n$ matrix $A$ written in this base $B$: i.e.\
\begin{align*}
A_{\textrm{matrix with respect to the base }B} = 
\begin{bmatrix} 
a_{1,1} & a_{1,2} & \ldots & a_{1,n} \\
a_{2,1} & a_{2,2} & \ldots & a_{2,n} \\
\vdots & \vdots & \ddots & \vdots \\
a_{n,1} & a_{n,2} & \ldots & a_{n,n} \\
\end{bmatrix}_B .
\end{align*}

Then, we can ``turn'' $A_B$ into a matrix written with the standard basis, that corresponds to the same linear transformation, as follows:
\begin{align*}
A_{\textrm{written in the standard basis}} = 
\begin{bmatrix} 
\vdots & \vdots &  \ldots & \vdots \\
\vec{b_1}  & \vec{b_2} & \ldots &\vec{b_n} \\
\vdots & \vdots &\ldots & \vdots \\
\end{bmatrix} \cdot
\begin{bmatrix} 
a_{1,1} & a_{1,2} & \ldots & a_{1,n} \\
a_{2,1} & a_{2,2} & \ldots & a_{2,n} \\
\vdots & \vdots & \ddots & \vdots \\
a_{n,1} & a_{n,2} & \ldots & a_{n,n} \\
\end{bmatrix}_B \cdot \begin{bmatrix} 
\vdots & \vdots &  \ldots & \vdots \\
\vec{b_1}  & \vec{b_2} & \ldots &\vec{b_n} \\
\vdots & \vdots &\ldots & \vdots \\
\end{bmatrix}^{-1}_.
\end{align*}
\end{prop}

\begin{answer}
Take any vector $(x_1, \ldots x_n)$ written in the standard basis.  Suppose that we want to apply the linear transformation corresponding to $A_B$ to this vector.  The first thing we have to do is convert it to the basis $B$: we do this by multiplying it on the left by the change of basis matrix \footnotesize  $\begin{bmatrix} 
\vdots & \vdots &  \ldots & \vdots \\
\vec{b_1}  & \vec{b_2} & \ldots &\vec{b_n} \\
\vdots & \vdots &\ldots & \vdots \\
\end{bmatrix}^{-1}$ \normalsize, as discussed earlier.  Once this is done, we can apply $A_B$ to it, by multiplying this on the left by $A_B$.  Finally, to interpret our results in the standard basis, we have to multiply it on the left by the other change of basis matrix \footnotesize $\begin{bmatrix} 
\vdots & \vdots &  \ldots & \vdots \\
\vec{b_1}  & \vec{b_2} & \ldots &\vec{b_n} \\
\vdots & \vdots &\ldots & \vdots \\
\end{bmatrix}$.  \normalsize

This set of multiplications lets us apply $A_B$ to a vector written with the standard basis and interpret our results in the standard basis, and is precisely what claimed $A_{\textrm{standard}}$ was!  So we are done.
\end{answer}

To illustrate the idea here, we work a quick example:

\begin{example}
Consider the linear transformation 
\begin{align*}
T(x,y) = (4x - 6y, x-y).
\end{align*}
Write this transformation as a matrix with respect to the standard basis, and also with respect to the basis $B = \{ \vec{b_1} = (3,1), \vec{b_2} = (2,1)\}$.  Relate these two matrices via the proposition above.  Verify that the left and right hand sides are indeed equal.
\end{example}
\begin{answer}
To write this as a matrix using the standard basis, just look at where it sends $(1,0)$ and $(0,1)$:
\begin{align*}
T_{\textrm{standard}} = \begin{bmatrix} 4 & -6\\ 1 & -1\\ \end{bmatrix}.
\end{align*}

To write it as a matrix using the basis $B$, first determine where it sends $\vec{b_1}$ and $\vec{b_2}$, and write these results as a combination of the elements of $B$:
\begin{align*}
T(\vec{b_1}) &= (6, 2) = 2\vec{b_1} = (2,0)_B,\\
T(\vec{b_2}) &= (2,1) = \vec{b_2} = (0,1)_B.\\
\end{align*}
Use these vectors to create the matrix with respect to the basis $B$:
\begin{align*}
T_{\textrm{standard}} = \begin{bmatrix} 2 & 0 \\ 0 & 1\\ \end{bmatrix}_{B.}
\end{align*}

According to the proposition above, we should have
\begin{align*}
\begin{bmatrix} 4 & -6\\ 1 & -1\\ \end{bmatrix} = \begin{bmatrix} 3 & 2\\ 1 & 1\\ \end{bmatrix} \cdot  \begin{bmatrix} 2 & 0 \\ 0 & 1\\ \end{bmatrix}_{B} \cdot  \begin{bmatrix} 3 & 2\\ 1 & 1\\ \end{bmatrix}^{-1}_.
\end{align*}
To check this, we quickly determine the inverse of $\begin{bmatrix} 3 & 2\\ 1 & 1\\ \end{bmatrix}$ by hand: it's the matrix $\begin{bmatrix} a & b\\ c&d \end{bmatrix}$ such that
\begin{align*}
\begin{bmatrix} a & b\\ c&d \end{bmatrix} \cdot \begin{bmatrix} 3 & 2\\ 1 & 1\\ \end{bmatrix} = \begin{bmatrix} 1 & 0\\ 0&1 \end{bmatrix}_.
\end{align*}
Multiplying out the left-hand side and setting it equal to the right-hand side gives us the following four linear equations:
\begin{align*}
3a + b &= 1,\\
2a+b &= 0,\\
3c+d &= 0,\\
2c+d &=1.\\
\end{align*}
Subtracting one copy of the second equation from the first gives us $a=1$, which when substituted into the second equation also gives $b=-2$.  Similarly, subtracting one copy of the fourth equation from the third gives us $c = -1$, which when plugged into the fourth equation also yields $d = 3$.  Therefore, we have 
\begin{align*}
\begin{bmatrix} 3 & 2\\ 1 & 1\\ \end{bmatrix}^{-1} \ = \begin{bmatrix} 1 & -2\\ -1 & 3\\ \end{bmatrix}_,
\end{align*}
and therefore should have
\begin{align*}
\begin{bmatrix} 4 & -6\\ 1 & -1\\ \end{bmatrix} =  \begin{bmatrix} 3 & 2\\ 1 & 1\\ \end{bmatrix} \cdot \begin{bmatrix} 2 & 0 \\ 0 & 1\\ \end{bmatrix}_{B} \cdot  \begin{bmatrix} 1 & -2\\ -1 & 3\\ \end{bmatrix}_.
\end{align*}
This is easily verified:
\begin{align*}
\begin{bmatrix} 3 & 2\\ 1 & 1\\ \end{bmatrix} \cdot \begin{bmatrix} 2 & 0 \\ 0 & 1\\ \end{bmatrix}_{B} \cdot  \begin{bmatrix} 1 & -2\\ -1 & 3\\ \end{bmatrix} = \begin{bmatrix} 6 & 2\\ 2 & 1\\ \end{bmatrix}\cdot  \begin{bmatrix} 1 & -2\\ -1 & 3\\ \end{bmatrix}  = \begin{bmatrix} 4 & -6\\ 1 & -1\\ \end{bmatrix}_.
\end{align*}
\end{answer}


With our earlier proposition in mind, we can restate our work from week 1, Friday's lecture using the language of a change-of-basis matrix!  Specifically: we have shown that the matrix $\begin{bmatrix} 1 & 1\\ 1 & 0\end{bmatrix}$ can be written using the basis
\begin{align*}
B = \left\{ \vec{b_1} = \left( \frac{\varphi}{\sqrt{1 + \varphi^2}}, \frac{1}{\sqrt{1 + \varphi^2}}\right), \vec{b_2} = \left( \frac{1}{\sqrt{1 + \varphi^2}}, -\frac{\varphi}{\sqrt{1 + \varphi^2}}\right) \right\}.
\end{align*}
as the matrix
\begin{align*}
\begin{bmatrix} \varphi & 0 \\ 0 & -\frac{1}{\varphi} \end{bmatrix}_B.
\end{align*}

If we use the result we gave above about change-of-basis matrices, we've just proven that
\begin{align*}
\begin{bmatrix} 1 & 1\\ 1 & 0\end{bmatrix} =  \begin{bmatrix} \frac{\varphi}{\sqrt{1 + \varphi^2}} & \frac{1}{\sqrt{1 + \varphi^2}} \\ \frac{1}{\sqrt{1 + \varphi^2}} & -\frac{\varphi}{\sqrt{1 + \varphi^2}} \end{bmatrix}^{-1} \cdot \begin{bmatrix} \varphi & 0 \\ 0 & -\frac{1}{\varphi} \end{bmatrix}_B \cdot \begin{bmatrix} \frac{\varphi}{\sqrt{1 + \varphi^2}} & \frac{1}{\sqrt{1 + \varphi^2}} \\ \frac{1}{\sqrt{1 + \varphi^2}} & -\frac{\varphi}{\sqrt{1 + \varphi^2}} \end{bmatrix}_.
\end{align*}

Which is exactly what we did on last Friday's lecture --- but this time, we understand \textbf{why} these things fit together in the way that they did!

Well, mostly.  The only thing we haven't discussed is why we chose the basis $B$ in the way that we did.  In next week's class, we'll fix that!








\end{document}