\documentclass[11pt]{article}

\usepackage{systeme}

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

\usepackage{xcolor}

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

\usepackage{tikz}
%\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{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{\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}

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

\centerline{\textbf{Rank-nullity theorem; Isomorphisms.}}
\medskip

Let~$f\colon V\to W$ be a linear mapping between vectors spaces~$V$
and~$W$ over a field~$F$.  Recall the definitions from last time:
\medskip

\textbf{Definition.} The \emph{kernel} or \emph{null space} of~$f$ is
\[
  \mathcal{N}(f):=\ker(f):=f^{-1}(\left\{0_W\right\}):=\left\{ v\in V: f(v)=0 \right\}.
\]
The \emph{nullity}\footnote{Don't confuse this concept with the \emph{mullity}
of~$f$, defined as follows:~$\mathrm{mullity}(f)=p(f)+b(f)$ where~$p(f)$ is the
amount of party of~$f$ in the back and~$b(f)$ is the amount of business of~$f$
in the front.} of~$f$ is the dimension of the kernel.
\smallskip

The \emph{image} or \emph{range} of~$f$ is
\[
  \mathcal{R}(f)=\im(f)=f(V)=\left\{ f(v)\in W:v\in V \right\}.
\]
The \emph{rank} of $f$ is the dimension of the image.
\medskip


\textbf{Theorem.} (Rank-nullity theorem)
Let~$f\colon V\to W$ be a linear mapping, and suppose that~$V$ is
finite-dimensional.  Then
\[
  \rk(f)+\mathrm{nullity}(f)=\dim V.
\]
In other words, the~$\dim(\im(f))+\dim(\ker(f))=\dim V$.
\smallskip

\begin{proof}
  Let~$K=\left\{ v_1,\dots,v_k \right\}$ be a basis for~$\ker(f)$
  (and therefore,~$\mathrm{nullity}(f)=k$).  Complete~$K$ to a basis for~$V$:
    \[
      B=\left\{ v_1,\dots,v_k,v_{k+1},\dots,v_n \right\}.
    \]
    To prove the theorem, it suffices to show that~$\left\{ f(v_{k+1}),\dots,f(v_n)
      \right\}$ is a basis for~$\mathrm{image}(f)$.  We first show linear
      independence.  Suppose that
      \[
        a_{k+1}f(v_{k+1})+\cdots+a_nf(v_n)=0_W.
      \]
      Since~$f$ is linear, it follows that
      \[
        f(a_{k+1}v_{k+1}+\cdots+a_nv_n)=a_{k+1}f(v_{k+1})+\cdots+a_nf(v_n)=0_W.
      \]
      Therefore,~$a_{k+1}v_{k+1}+\cdots+a_nv_n\in\ker(f)$.  Since~$K=\left\{
      v_1,\dots,v_k\right\}$ is a basis for~$\ker(f)$, there are scalars~$a_1,\dots,a_k$
      such that
      \[
        a_{k+1}v_{k+1}+\cdots+a_nv_n=a_1v_1+\cdots+a_kv_k,
      \]
      i.e.,
      \[
        a_1v_1+\cdots+a_kv_k -a_{k+1}v_{k+1}-\cdots-a_nv_n = 0_V.
      \]
      This is a linear relation among the vectors of~$B$, the basis we
      constructed for $V$.  Since~$B$ is a linearly
      independent set, all of the~$a_i$ must be~$0$.  In
      particular, $a_{k+1}=\cdots=a_n=0$, as we were trying to show.
  
      Next, we show that $\left\{ f(v_{k+1}),\dots,f(v_n) \right\}$
        spans~$\im(f)$.  We know that
        since~$B=\left\{ v_1,\dots,v_n \right\}$ is a basis for~$V$ that
        \[
  	\left\{ f(v_1),\dots,f(v_n)\right\}
        \]
        spans the image of~$f$.  However,~$v_1,\dots,v_k$ are in~$\ker(f)$,
        so
        \begin{align*}
  	\im(f)
  	&=
  	  \Span\left\{ f(v_1),\dots,f(v_k),f(v_{k+1}),\dots,f(v_n) \right\}\\
          &=
  	  \Span\left\{ 0_W,\dots,0_W,f(v_{k+1}),\dots,f(v_n) \right\}\\
  	&=\Span\left\{f(v_{k+1}),\dots,f(v_n) \right\}.
        \end{align*}
\end{proof}

\textbf{Proposition 1.} The linear mapping~$f\colon V\to W$ is injective (i.e.,
one-to-one) if and only if~$\ker(f)=\left\{ 0_V \right\}$. 

\begin{proof} ($\Rightarrow$) First suppose that~$f$ is injective, and let
  $v\in\ker(f)$. Therefore, $f(v)=0_W$. We also know that since~$f$ is linear,
  $f(0_V)= 0_W$. So $f(v)=0_W=f(0_V)$.  Since~$f$ is injective
  and~$f(v)=f(0_V)$, it follows that~$v=0_V$.  We have shown that
  $\ker(f)=\left\{ 0_V \right\}$.  

  ($\Leftarrow$) For the converse, now suppose that~$\ker(f)=\left\{ 0_V
  \right\}$, and let~$u,v\in V$ with~$f(u)=f(v)$.  It follows
  that~$f(u-v)=f(u)-f(v)=0_W$.  Hence,~$u-v\in\ker(f)$.  However, we are
  assuming $\ker(f)=\left\{ 0_V \right\}$.  So~$u-v=0_V$, which means~$u=v$.
  Therefore,~$f$ is injective.
\end{proof}

\textbf{Proposition 2.}  Let~$S\subseteq V$.
\begin{enumerate}
  \item\label{item:05friprop1} If~$S$ is linearly dependent, then~$f(S):=\left\{ f(s):s\in S
    \right\}\subseteq W$ is linearly dependent.  (The image of a dependent set
      is dependent.)
  \item\label{item:05friprop2} If~$f$ is injective and~$S$ is linearly independent, then~$f(S)\subseteq
    W$ is linearly independent.  (The image of an independent set is independent
    \emph{provided}~$f$ is injective.)
\end{enumerate}

\begin{proof}
  Suppose that~$\sum_{i=1}^ka_i s_i=0_V$ for some~$a_i\in F$
  and~$s_i\in S$.  Since~$f$ is linear, we have
  \[
    \textstyle
    0_W=f(0_V)= f(\sum_{i=1}^ka_i s_i)=\sum_{i=1}^ka_if(s_i).
  \]
  Thus,~$f$ preserves linear dependencies, as claimed in
  part~\ref{item:05friprop1}.
  
  Suppose now that~$f$ is injective and~$S$ is linearly independent. If~$\sum_{i=1}^ka_if(s_i)=0_W$ for
  some~$a_i\in F$ and~$s_i\in S$, then since~$f$ is linear,
  \[
    \textstyle
    0_W=\sum_{i=1}^ka_if(s_i)=f(\sum_{i=1}^ka_i s_i).
  \]
  Therefore,~$\sum_{i=1}^ka_i s_i$ is in the kernel of~$f$.  Since,~$f$ is
  injective,~$\ker(f)=\left\{ 0_V \right\}$ by Proposition~1. It follows that $\sum_{i=1}^ka_i
  s_i=0_V$.  Then, since~$S$ is linearly independent, it follows that~$a_i=0$ for
  all~$i$.  This shows that~$f(S)$ is linearly independent.
\end{proof}

\textbf{Definition.} The linear function~$f\colon V\to W$ is an \emph{isomorphism}
if there exists a linear function~$g\colon W\to V$ such that~$g\circ
f=\mathrm{id}_V$ and~$f\circ g=\mathrm{id}_W$.  The function~$g$ is called
the \emph{inverse of~$f$}. 
\medskip

\textbf{Remark.}  Suppose that~$f\colon V\to W$ is an isomorphism. Then, just as
proved in Math~112 for mappings of sets, it follows that~$f$ is bijective, i.e.,
both injective and surjective.  For mappings of sets, being bijective is
equivalent to having an inverse.  The same is true for mappings of
vector spaces: A linear function~$f\colon V\to W$ is an isomorphism if and only
if it is bijective.  It turns out that if a linear function is bijective, then
its inverse mapping (as a mapping of sets) is automatically linear. (Check this
for yourself.)
\medskip

\textbf{Example.} The space of~$2\times 2$ matrices over~$F$ is isomorphic
to~$F^4$.  One isomorphism is given by
\[
\left(
\begin{array}{cc}
  a&b\\
  c&d
\end{array}
\right)
\mapsto
(a,b,c,d).
\]

\textbf{Exercise.} Write~$V\sim W$ if there is an isomophism~$V\to W$.  Check
that $\sim$ is an equivalence relation.
\medskip

\textbf{Proposition 3.} A linear mapping~$f\colon V\to W$ is an isomorphism if and
only if~$\ker(f)=\left\{ 0_V \right\}$ and~$\im(f)=W$, (i.e., if and only if its
  kernel is trivial and it is surjective).

  \begin{proof}
    We have just seen that~$\ker{f}=\left\{ 0_V\right\}$ if and only
    if~$f$ is injective, and by definition of surjectivity,~$f$ is surjective if and
    only if~$\im(f)=W$.  Thus, the condition that~$\ker(f)$ is trivial and~$\im(f)=W$ is
    equivalent to the bijectivity of~$f$.
  \end{proof}

\textbf{Theorem 4.}  Let~$V$ be a vector space over $F$.  Then~$V$ is isomorphic
to~$F^n$ if and only if~$\dim V=n$.

\begin{proof}
  ($\Rightarrow$) Suppose that~$f\colon V\to F^n$ is an isomorphism with
  inverse~$g\colon F^n\to V$, and
  let~$e_1,\ldots,e_n$ be the standard basis for $F^n$.  Define~$v_i=g(e_i)\in
  V$ for $i=1,\ldots,n$.  We claim that~$B:=\left\{v_1,\ldots,v_n\right\}$ is a
  basis for~$V$ (and hence, $\dim V=n$).  First note that~$B$ is linearly
  independent by Proposition~2 (a) since~$\left\{e_1,\ldots,e_n\right\}$ is
  linearly independent.  Next, to see that~$B$ spans, let~$v\in V$, and write
  \[
    f(v) = \sum_{i=1}^{n}a_ie_i
  \]
  for some~$a_i\in F$.  It follows that
  \[
   \textstyle v=g(f(v))=g\left(\sum_{i=1}^{n}a_ie_i\right)=\sum_{i=1}^{n}a_ig(e_i)=\sum_{i=1}^{n} a_i
    v_i\in\Span(B).
  \]

  ($\Leftarrow$) Now suppose~$\dim V=n$. Choose a basis~$\{b_1,\dots,b_n\}$
  for~$V$, and let $\{e_1,\dots,e_n\}$ be the standard basis for~$F^n$.
  Define $f\colon V\to F^n$ by~$f(b_i)=e_i$ for~$i=1,\dots,n$ and extending
  linearly.  Recall what this means: given~$v\in V$, there are
  unique~$\alpha_i\in F$ such that~$v=\sum_{i=1}^n\alpha_ib_i$.  Then by
  definition of ``extend linearly'', 
    \[
      f(v)=\sum_{i=1}^n\alpha_if(b_i)=\sum_{i=1}^n\alpha_ie_i=(\alpha_1,\dots,\alpha_n)\in F^n.
    \]
    Earlier, we called~$(\alpha_1,\dots,\alpha_n)$ the \emph{coordinates} of~$v$ with respect
    to the ordered basis $\langle b_1,\dots,b_n\rangle$.
  
    Suppose~$v\in\ker(f)$, and write~$v=\sum_{i=1}^{n}\alpha_ib_i$.
    Then~$0_W=f(v)=\sum_{i=1}^{n}\alpha_ie_i$ implies~$\alpha_i=0$ for all~$i$
    since the~$e_i$ are linearly independent.  So~$v=0_V$. This shows that the
    kernel of~$f$ is trivial, and hence,~$f$ is injective.  For surjectivity, note
    that the image contains all linear combinations of the standard basis vectors,
    $e_1,\dots,e_n$ for~$F^n$.
\end{proof}

\textbf{Remarks:} Theorem~4 says that for each $n=0,1,2,\dots$, there is
essentially only one vector space over~$F$ of dimension~$n$.  More precisely,
under the equivalence relation~$V\sim W$ defined earlier, there is one
equivalence class for each natural number~$n$.  Theorem~4 and its proof say that
the difference between a vector space~$V$ of dimension~$n$ and $F^n$ is the
choice of a basis.  Once a basis~$B$ is chosen, we get an isomorphism~$V\to F^n$
by sending each vector to its coordinates with respect to~$B$:
\begin{align*}
   V&\to F^{n}\\
  v&\mapsto [v]_B. 
\end{align*}
The practical importance of this result is that if we have a problem involving
vectors in~$V$, we can use the isomorphism to translate problem into one about
$n$-tuples in $F^n$.  We apply our algorithms, e.g., Gaussian
elimination, to solve the problem in $F^n$ and then use the inverse of the
isomorphism to translate the solution back to~$V$.
\medskip

\textbf{Corollary 5.}  Let~$V$ and~$W$ be finite-dimensional vectors spaces.
Then~$V$ and~$W$ are isomorphic if and only if they have the same dimension.
\smallskip

\begin{proof}
  First, suppose that~$f\colon V\to W$ is an isomorphism, and
  let~$b_1,\dots,b_n$ be a basis for~$V$. By Proposition~2, $f(b_1),\dots,f(b_n)$
  are linearly independent, and since~$f$ is surjective, they span~$W$.  So
  $\left\{f(b_1),\ldots,f(b_n)\right\}$ is a basis for~$W$.  Thus,
  the number of elements in a basis for~$V$ is the same as the number of elements
  in a basis for~$W$, which says that~$\dim V=\dim W$.
  
  Conversely, suppose that~$\dim V=\dim W=n$.  By Theorem 4, we have isomorphisms
  $f_V\colon V\to F^n$ and $f_W\colon W\to F^n$.  Let~$f^{-1}_W\colon F^n\to W$ be the
  inverse of~$f_W$.  It follows that the composition,
  \[
    V\xrightarrow{f_V}F^n\xrightarrow{f^{-1}_W} W
  \]
  is an isomorphism.  (From Math~112, you know that a composition of bijections of
    sets is a bijection of sets, and you should do the easy check that a
    composition of linear functions is linear.)
\end{proof}

\textbf{Proposition 6.} Let~$f\colon V\to W$ be a linear function, and let~$\dim
V=\dim W<\infty$. (An important special case is $f\colon V\to V$ when $\dim V<\infty$.)
Then the following are equivalent:
\begin{enumerate}
  \item\label{item1:05friprop6} $f$ is injective (1-1),
  \item\label{item2:05friprop6} $f$ is surjective (onto),
  \item\label{item3:05friprop6} $f$ is an isomorphism.
\end{enumerate}
\begin{proof} 
  The proof is left as an exercise.  The central idea is to use the rank-nullity
  theorem to relate injectivity and surjectivity.
\end{proof}
\medskip

\textbf{Note:} Proposition~6 is not true if the dimensions of~$V$ and~$W$ are
not finite.  For instance, consider the infinite-dimensional vector space
$\mathcal{P}(F)=F[x]$ and the mapping
\begin{align*}
  F[x]&\to F[x] \\
  f &\mapsto xf,
\end{align*}
given by multiplication by~$x$.  For instance, under this
mapping,~$1+x+x^2\mapsto x+x^2+x^3$.  This mapping is linear and injective, but
not surjective.  For instance,~$1$ is not in the image (nor is any other
constant besides~$0$).
\end{document}
