\documentclass[10pt]{article}

\usepackage{systeme}

\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
%\usepackage{palatino}
\usepackage{setdeck}

\usepackage{xcolor}
\usepackage{tcolorbox}

%\usepackage[textheight=8.5in, margin=1.6in]{geometry}
\usepackage[total={6in,8in}]{geometry}

\usepackage{tikz}
\usetikzlibrary{cd}
\tikzset{
      labr/.style={anchor=north, rotate=90, inner sep=.7mm}
    }
\tikzset{
      labl/.style={anchor=south, rotate=90, inner sep=.7mm}
    }

%\usepackage{pgfplots}
%\tikzstyle{ball} = [circle,shading=ball, ball color=black,
%    minimum size=1mm,inner sep=1.3pt]
%\usetikzlibrary{arrows.meta}
%\tikzset{>={Latex[length=2mm,width=1.5mm]}}

%\usepackage{graphicx}

\usepackage{needspace}  % <-- to prevent bad pagebreak over environment titles
% Use:  \Needspace{3\baselineskip} before opening an environment

\usepackage[shortlabels]{enumitem}
\setlist[enumerate]{leftmargin=*,label=(\alph*)}

%\usepackage[colorlinks=true,citecolor=black,linkcolor=black,urlcolor=blue]{hyperref}

\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\sn}{\mathfrak{S}}
\newcommand{\PP}{\mathbb{P}}
\newcommand{\ve}{\varepsilon}
\newcommand{\ips}[2]{\langle{#1}, {#2}\rangle}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\Span}{\mathrm{Span}}
\DeclareMathOperator{\rk}{\mathrm{rank}}
\DeclareMathOperator{\rspace}{\mathrm{rowspace}}
\DeclareMathOperator{\cspace}{\mathrm{colspace}}
\DeclareMathOperator{\trace}{\mathrm{tr}}
\DeclareMathOperator{\im}{\mathrm{im}}
\DeclareMathOperator{\Sym}{\mathrm{Sym}}
\DeclareMathOperator{\Hom}{\mathrm{Hom}}
\DeclareMathOperator{\diag}{\mathrm{diag}}
\DeclareMathOperator{\glb}{\mathrm{glb}}
\DeclareMathOperator{\lub}{\mathrm{lub}}

\parskip = 0.05in
\parindent = 0.0in

%\pagestyle{empty}

\allowdisplaybreaks

\begin{document}
\centerline{Math 201 lecture for Friday, Week 9}
\bigskip

\centerline{\textbf{Eigenvectors and eigenvalues}}  
\bigskip

\textbf{Definition.} Let~$f\colon V\to V$ be a linear transformation of a vector
space~$V$ over~$F$.  A \emph{nonzero} vector~$v\in V$ is an \emph{eigenvector}
for~$f$ with \emph{eigenvalue}~$\lambda\in F$ if
\[
  f(v)=\lambda v.
\]
If~$A\in M_{n\times n}(F)$, a \emph{nonzero} vector~$v\in F^{n}$ is an \emph{eigenvector}
for~$A$ with \emph{eigenvalue}~$\lambda\in F$ if
\[
  Av=\lambda v.
\]
Thus, eigenvectors and eigenvalues for~$A$ are the same as eigenvectors and
eigenvalues for the associated linear function $f_A\colon F^{n}\to F^{n}$ (defined
by~$f_A(v)=Av$).
\medskip

Here is why we like eigenvectors: Suppose that $\alpha=\langle
v_1,\dots,v_n\rangle$ is an ordered basis of eigenvectors for~$f\colon V\to V$
with corresponding eigenvalues~$\lambda_1,\dots,\lambda_n$,
i.e.,~$f(v_i)=\lambda_iv_i$ for~$i=1,\dots,n$.  Then the
matrix~$[f]_{\alpha}^{\alpha}$ representing~$f$ with respect to the
basis~$\alpha$ for the domain and codomain is the diagonal
matrix~$\diag(\lambda_1,\dots,\lambda_n)$.
\medskip

\textbf{Example.} Let
\[
  A=
  \left(\begin{array}{cc}
      -1&2\\
      -6&6
  \end{array} \right).
\]
with corresponding linear function
\begin{align*}
  f_A\colon\R^2&\to\R^2\\
  (x,y)&\mapsto (-x+2y,-6x+6y).
\end{align*}

It turns out that~$(2,3)$ and~$(1,2)$ are eigenvectors for~$f_A$ with
eigenvalues~$2$ and~$3$, respectively:
\begin{align*}
  \left(\begin{array}{cc}
      -1&2\\
      -6&6
  \end{array} \right)
  \left(\begin{array}{c}
      2\\3
  \end{array} \right)
  =
  \left(\begin{array}{c}
      4\\6
  \end{array} \right)
  &=
  2
  \left(\begin{array}{c}
      2\\3
  \end{array} \right)\\[15pt]
  \left(\begin{array}{cc}
      -1&2\\
      -6&6
  \end{array} \right)
  \left(\begin{array}{c}
      1\\2
  \end{array} \right)
  =
  \left(\begin{array}{c}
      3\\6
  \end{array} \right)
  &=
  3
  \left(\begin{array}{c}
      1\\2
  \end{array} \right).
\end{align*}
Find the matrix representing~$f_A$ with respect to the ordered basis
\[
  \alpha=\langle (2,3),(1,2)\rangle.
\]
To do this we write the image of each vector in~$\alpha$ as a linear combination
of the vectors in~$\alpha$ and pull off the coefficients to create columns:
\begin{align*}
  f_A(2,3)&=2(2,3)=2\cdot(2,3)+0\cdot(1,2)\\
  f_A(1,2)&=3(1,2)=0\cdot(2,3)+3\cdot(1,2).
\end{align*}
Hence,
\[
  [f_A]_{\alpha}^{\alpha}=
  \left(\begin{array}{cc}
      2&0\\
      0&3
  \end{array} \right)
  =
  \diag(2,3).
\]
That is the point: a basis of eigenvectors gives a matrix representative
that is diagonal, which is the simplest type of matrix to think about. 
Let's think abstractly about what just happened.
The matrix~$A$ is the matrix representing~$f_A$ with respect to the standard
basis, and the matrix
\[
  D=\diag(2,3)=
  \left(\begin{array}{cc}
      2&0\\
      0&3
  \end{array} \right).
\]
represents~$f_A$ with respect to the basis~$\alpha$. Let~$\phi_{\alpha}$ be the
mapping that takes coordinates with respect to~$\alpha$.  We get the commutative
diagram:
\begin{center}
\begin{tikzpicture}
  \node at (0,0) {
\begin{tikzcd}
  \R^2\arrow[d,swap, "\phi_{\alpha}","\sim" labr]\arrow[r,"A"]&
  \R^2\arrow[d,"\phi_{\alpha}","\sim" labl]\\
  \R^2\arrow[r,"D"]&\R^2.
\end{tikzcd}
};
\node[red] (23) at (-2,1) {$(2,3)$};
\node[red] (12) at (-3,2) {$(1,2)$};
\node[red] (f23) at (2,1) {$2(2,3)$};
\node[red] (f12) at (3,2) {$3(1,2)$};
\node[red] (e1) at (-2,-1.2) {$(1,0)$};
\node[red] (e2) at (-3,-2) {$(0,1)$};
\node[red] (fe1) at (2,-1.2) {$2(1,0)$};
\node[red] (fe2) at (3,-2) {$3(0,1)$};
\node (dummy-left) at (1.4,-1.3) {};
\node (dummy-left2) at (2.4,-2) {};
\node (dummy-top) at (2,-1.0) {};
\node (dummy-top2) at (3,-1.8) {};
\draw[->,red] (23) to[bend left=10] (f23);
\draw[->,red] (12) to[bend left=10] (f12);
\draw[->,red] (23) to[bend right=10] (e1);
\draw[->,red] (12) to[bend right=10] (e2);
\draw[->,red] (e1) to[bend right=10] (dummy-left);
\draw[->,red] (e2) to[bend right=10] (dummy-left2);
\draw[->,red] (f23) to[bend left=10] (dummy-top);
\draw[->,red] (f12) to[bend left=10] (dummy-top2);
\end{tikzpicture}
\end{center}
Reviewing something we talked about earlier in the semester:
The matrix for~$\phi_{\alpha}$ would be a bit of a chore to write down.
It's~$j$-column would be the image of~$e_j$. So we would have to
write each~$e_j$ as a linear combination of the basis vectors in~$\alpha$.
However, the inverse of~$\phi_{\alpha}$ is {\em easy} to write down.  Take a
look at the commutative diagram.  By construction
of~$\phi_{\alpha}$, we have
\[
  \phi_{\alpha}^{-1}(1,0)=(2,3)\quad\text{and}\quad\phi_{\alpha}^{-1}(0,1)=(1,2).
\]
So the matrix for~$\phi_{\alpha}^{-1}$ is
\[
P=
\left(\begin{array}{cc}
    2&1\\
    3&2
\end{array} \right).
\]
So the matrix for~$\phi_{\alpha}$ is~$P^{-1}$.  Therefore, another way to write the
commutative diagram is
\begin{center}
\begin{tikzpicture}
  \node at (0,0) {
\begin{tikzcd}
  \R^2\arrow[d,swap, "P^{-1}","\sim" labr]\arrow[r,"A"]&
  \R^2\arrow[d,"P^{-1}","\sim" labl]\\
  \R^2\arrow[r,"D"]&\R^2.
\end{tikzcd}
};
\end{tikzpicture}
\end{center}
From contemplating this diagram, we see that
\[
  D=P^{-1}AP.
\]
Summary: having found eigenvectors~$(2,3)$ and~$(1,2)$, we place those
eigenvectors as columns in a matrix $P$, and then~$P^{-1}AP$ is a
diagonal matrix with the corresponding eigenvalues on the diagonal.

To generalize: 
\bigskip

\begin{tcolorbox}[colback=white]
Let~$A\in M_{n\times n}(F)$ with corresponding linear function
$f_A\colon F^{n}\to
F^{n}$.  Suppose $\alpha=\langle v_1,\dots,v_n\rangle$ is an ordered
basis of eigenvectors with corresponding
eigenvalues~$\lambda_1,\dots,\lambda_n$, i.e., $Av_i=\lambda_iv_i$ for
 $i=1,\dots,n$. Let~$P$ be the matrix whose columns are~$v_1,\dots,v_n$.  Then
\[
  P^{-1}AP=D,
\]
where~$D = \diag(\lambda_1,\dots,\lambda_n)$, and we have a commutative diagram
\begin{center}
  \begin{tikzpicture}[ampersand replacement=\&]
  \node at (0,0) {
\begin{tikzcd}
  F^n\arrow[d,swap, "P^{-1}","\sim" labr]\arrow[r,"A"]\&
  F^n\arrow[d,"P^{-1}","\sim" labl]\\
  F^n\arrow[r,"D"]\&F^n.
\end{tikzcd}
};
\end{tikzpicture}
\end{center}
\end{tcolorbox}
\medskip

\textbf{How does one find eigenvectors and eigenvalues?}  Let~$A\in M_{n\times
n}(F)$ with corresponding function~$f_A\colon F^n\to F^n$ (so~$f_A(v):= Av$).
We are looking for a nonzero vector~$v\in F^n$ and a scalar~$\lambda$ such
that~$Av=\lambda v$.  To achieve that, the following argument is of \textbf{central
  importance}:
\[
  Av=\lambda v\quad\Leftrightarrow\quad (A-\lambda I_n)v=0
  \quad\Leftrightarrow\quad v\in\ker(A-\lambda v).
\]
This says that: 
\begin{quote}
  {\color{red}\textbf{$\lambda\in F$ is an eigenvalue for~$A$ if and only
  if~$\ker(A-\lambda I_n)\neq\left\{ 0 \right\}$}}.
\end{quote}
So we would like to determine those~$\lambda$ for which the kernel of~$A-\lambda
I_n$ is nontrivial, for which the following is key:
\[
  { \color{red}
  \ker(A-\lambda I_n)\neq\left\{ 0 \right\}
  \quad\Leftrightarrow\quad
  \rk(A-\lambda I_n)<n
  \quad\Leftrightarrow\quad
  \det(A-\lambda I_n)=0.}
\]
Let's apply this to the matrix~$A$ in our example:
\begin{align*}
  \det\left(
  \left(\begin{array}{cc}
      -1&2\\
      -6&6
  \end{array} \right)
  -\lambda
  \left(\begin{array}{cc}
      1&0\\0&1
\end{array} \right)\right)
  &=\det\left(
  \left(\begin{array}{cc}
      -1&2\\
      -6&6
  \end{array} \right)
  -
  \left(\begin{array}{cc}
      \lambda&0\\0&\lambda
\end{array} \right)\right)\\[12pt]
  &=\det
  \left(\begin{array}{cc}
      -1-\lambda&2\\
      -6&6-\lambda
  \end{array} \right) \\[12pt]
  &=(-1-\lambda)(6-\lambda)-2(-6)\\[10pt]
  &=\lambda^2-5\lambda+6\\[10pt]
  &=(\lambda-2)(\lambda-3).
\end{align*}
Thus, $\ker(A-\lambda I_n)\neq\left\{ 0 \right\}$ if and only if~$\lambda=2,3$.
So the eigenvalues for~$A$ are~$2$ and~$3$.

Having found the eigenvalues, \textbf{how do we go about finding corresponding
eigenvalues}?  For each eigenvalue~$\lambda$, there are nonzero
elements~$\ker(A-\lambda I_n)$.  So we just apply our algorithm for finding the
kernel of a matrix:
\medskip

\fbox{$\lambda=2$}
\[
  A-2 I_2
  =
  \left(\begin{array}{cc}
      -1&2\\
      -6&6
  \end{array} \right)
  -
  \left(\begin{array}{cc}
      2&0\\0&2
  \end{array} \right)
  =
  \left(\begin{array}{cc}
      -3&2\\
      -6&4
  \end{array} \right).
\]
So we need to find~$(x,y)\in\R^2$ satisfying
\[
  \left(\begin{array}{cc}
      -3&2\\
      -6&4
  \end{array} \right)
  \left(\begin{array}{c}
      x\\y
  \end{array} \right)
  =
  \left(\begin{array}{c}
      0\\0
  \end{array} \right).
\]
Therefore, we perform Gaussian elimination:
\[
  \left(\begin{array}{cc}
      -3&2\\
      -6&4
  \end{array} \right)
\rightsquigarrow
\left(\begin{array}{cc}
    1&-\frac{2}{3}\\
    0&0
\end{array} \right).
\]
Hence,
\[
  \ker(A-2I_2)=\left\{ \left( \frac{2}{3}y,y \right):y\in\R \right\}.
\]
For a basis we could take~$\left( \frac{2}{3},1 \right)$, or easier, $(2,3)$.
\medskip

Similarly for the other eigenvalue:
\medskip

\fbox{$\lambda=3$}
\begin{align*}
  A-3 I_2
  &=
  \left(\begin{array}{cc}
      -1&2\\
      -6&6
  \end{array} \right)
  -
  \left(\begin{array}{cc}
      3&0\\0&3
  \end{array} \right)
\\[12pt]
  &=
  \left(\begin{array}{cc}
      -4&2\\
      -6&3
  \end{array} \right)
\\[12pt]
&\rightsquigarrow
\left(\begin{array}{cc}
    1&-\frac{1}{2}\\
    0&0
\end{array} \right).
\end{align*}
Hence,
\[
  \ker(A-3I_2)=\left\{ \left( \frac{1}{2}y,y \right):y\in\R \right\}.
\]
For a basis we could take~$\left( \frac{1}{2},1 \right)$, or easier, $(1,2)$.
\medskip


\begin{tcolorbox}[colback=white]
  Let~$A\in M_{n\times n}(F)$.  The eigenvalues for~$A$ are exactly the
  solutions~$\lambda$ to
  \[
    \det(A-\lambda I_n)=0.
  \]
  If~$\lambda\in F$ is an eigenvalue, it corresponding eigenvectors are the
  nonzero vectors in 
  \[
    \ker(A-\lambda I_{n}).
  \]
  Use our algorithm to find a basis for the matrix~$A-\lambda I_{n}$.
\end{tcolorbox}
\end{document}  
