\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}
\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{\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 7}
\bigskip

\centerline{\textbf{Determinants}}
\medskip

\textbf{Definition.} The \emph{determinant} is a multilinear, alternating function
of the rows of square matrix, normalized so that its value on the identity
matrix is~$1$.  
\medskip

To explain this terminology, start with the fact that the determinant is a
function of the form
\[
  \det\colon M_{n\times n}(F)\to F.
\]
Given a square matrix~$A\in M_{n\times n}(F)$ with rows~$r_1,\dots,r_n\in
F^n$, we write $\det(A)=\det(r_1,\dots,r_n)$, i.e., we consider the determinant
as a function of the rows of~$A$.  The determinant function has the following
properties:
\begin{enumerate}
  \item \emph{Multilinear.} The determinant is a linear function with
    respect to each row.  Thus, if $r_1,\dots,r_n$ are
the row vectors of~$A$ (elements of $F^n$), $r_i'$ is another row vector, and
$\lambda\in F$, then
\begin{align*}
\det(r_1,\dots,r_{i-1},\lambda\,r_i+r_i',r_{i+1},\dots,r_n)&=
\lambda\,\det(r_1,\dots,r_{i-1},r_i,r_{i+1},\dots,r_n)\\
&+\det(r_1,\dots,r_{i-1},r_i',r_{i+1},\dots,r_n).
\end{align*}
The above expresses the fact that, in particular, the determinant is linear with respect to
the~$i$-th row.  
\item \emph{Alternating.} The determinant is zero if two of its arguments are
equal:
\[
\det(r_1,\dots,r_n)=0
\]
if~$r_i=r_j$ for some~$i\neq j$.
\item \emph{Normalized.} $\det(I_n)=\det(e_1,\dots,e_n)=1$.
\end{enumerate}

We will prove the following theorem later:
\medskip

\textbf{Theorem.} For each~$n\geq 0$, there exists a unique determinant function.
\medskip

For now we will accept this theorem on faith and explore some of the
consequences.  The following proposition shows that we can compute the
determinant through row reduction.
\medskip

\textbf{Proposition 1.} (Behavior of the determinant with respect to row
operations.)  Let~$A,B\in M_{n\times n}(F)$.
\begin{enumerate}
  \item\label{item1:07friDet} If~$B$ is obtained from~$A$ by swapping two rows, then
    $\det(B)=-\det(A)$.
  \item\label{item2:07friDet} If~$B$ is obtained from~$A$ by scaling a row by a scalar~$\lambda$,
    then~$\det(B)=\lambda\det(A)$.
  \item\label{item3:07friDet} If~$B$ is obtained from~$A$ by adding a scalar multiple of one row to
    another row, then~$\det(B)=\det(A)$.
\end{enumerate}

\begin{proof}
  For part~\ref{item1:07friDet}, let~$r_1,\dots,r_n\in F^n$ be the rows of~$A$.  For ease of
  notation, we will assume that~$B$ is obtained from~$A$ by swapping the first two
  rows.  The argument we present clearly generalizes to the case of swapping
  arbitrary rows.  Replace the first two rows of~$A$ with~$r_1+r_2$ to obtain a
  matrix whose determinant is~$0$ by the alternating property:
  \[
    0=\det(r_1+r_2,r_1+r_2,r_3,\dots,r_n).
  \]
  Expand my multilinearity to get:
  \begin{align*}
    0&=\det(r_1+r_2,r_1+r_2,r_3,\dots,r_n)\\
    &=\det(r_1,r_1+r_2,r_3,\dots,r_n)+\det(r_2,r_1+r_2,r_3,\dots,r_n)\\
    &=\det(r_1,r_1,r_3,\dots,r_n)+\det(r_1,r_2,r_3,\dots,r_n)\\
    &\hspace{0.7in} +\det(r_2,r_1,r_3,\dots,r_n)+\det(r_2,r_2,r_3,\dots,r_n)\\
    &=0+\det(A)+\det(B)+0.
  \end{align*}
  It follows that~$\det(B)=-\det(A)$.
  \medskip
  
  Part~\ref{item1:07friDet} follows immediately from the fact that the determinant is linear
  with respect to each row:
  \[
    \det(r_1,\dots,r_{i-1},\lambda r_i,r_{i+1},\dots,r_n)=
    \lambda\det(r_1,\dots,r_{i-1},r_i,r_{i+1},\dots,r_n).
  \]
  \medskip
  
  For Part~\ref{item3:07friDet}, we use multilinearity and the alternating property.  For ease of
  notation, we'll consider the case where~$B$ is obtained from~$A$ by adding a multiple of row~$1$ to row~$2$:
  \begin{align*}
    \det(B)&=\det(r_1,\lambda r_1+r_2,r_3,\dots,r_n)\\
    &= \lambda \det(r_1,r_1,r_3,\dots,r_n)+\det(r_1,r_2,r_3,\dots,r_n)\\
    &= 0+\det(r_1,r_2,r_3,\dots,r_n)\\
    &= \det(A).
  \end{align*}
\end{proof}

\textbf{Corollary.} Let~$A\in M_{n\times n}(F)$, and let~$E$ be the reduced row
echelon form of~$A$.  Then there exists a non-zero~$k\in F$ such that
$\det(A)=k\det(E)$.
\begin{proof}
  The proof is immediate from Proposition~1.
\end{proof}

\textbf{Example 1.}  Here we compute the determinant of a $2\times 2$ matrix using
the fact that the determinant is a multilinear alternating mapping with value
$1$ on the identity matrix.

\begin{align*}
  \det\left(\begin{array}{cc}a&b\\c&d\end{array}\right)&=\det ((a,b), (c,d))\\
    &=\det(a\,e_1+b\,e_2,c\,e_1+d\,e_2)\\
    &=a\,\det(e_1,c\,e_1+d\,e_2)+b\,\det(e_2,c\,e_1+d\,e_2)\\
    &=ac\,\det(e_1,e_1)+ad\,\det(e_1,e_2)+bc\,\det(e_2,e_1)+bd\,\det(e_2,e_2)\\
    &=0+ad\,\det(e_1,e_2)+bc\,\det(e_2,e_1)+0\\
    &=ad\,\det(e_1,e_2)-bc\,\det(e_1,e_2)\\
    &=ad\,\det\left(\begin{array}{cc}1&0\\0&1\end{array}\right)-bc\,\det\left(\begin{array}{cc}1&0\\0&1\end{array}\right)\\
    &=ad\cdot1-bc\cdot1 = ad-bc.
\end{align*} 

\textbf{Example 2.} Here is an example of using row reduction to compute the
determinant of a matrix.  Let
\[
A=
\left(\begin{array}{rrr}
    1 & 2 & -2 \\
    9 & 4 & 0 \\
    2 & 2 & 4
\end{array}\right)
\]
Using Proposition~1, we see that
\begin{align*}
  \det(A)
  &=\det
\left(\begin{array}{rrr}
    1 & 2 & -2 \\
    9 & 4 & 0 \\
    2 & 2 & 4
\end{array}\right)\\[12pt]
  &=\det
\left(\begin{array}{rrr}
    1 & 2 & -2 \\
    0 & -14 & 18 \\
    0 & -2 & 8
\end{array}\right)\\[12pt]
  &=-\det
\left(\begin{array}{rrr}
    1 & 2 & -2 \\
    0 & -2 & 8\\
    0 & -14 & 18 
\end{array}\right)\\[12pt]
  &=2\det
\left(\begin{array}{rrr}
    1 & 2 & -2 \\
    0 & 1 & -4\\
    0 & -14 & 18 
\end{array}\right)\\[12pt]
  &=2\det
\left(\begin{array}{rrr}
    1 & 2 & -2 \\
    0 & 1 & -4\\
    0 & 0 & -38 
\end{array}\right)\\[12pt]
  &=2(-38)\det
\left(\begin{array}{rrr}
    1 & 2 & -2 \\
    0 & 1 & -4\\
    0 & 0 & 1 
\end{array}\right)\\[12pt]
  &=2(-38)\det
\left(\begin{array}{rrr}
    1 & 0 & 0 \\
    0 & 1 & 0\\
    0 & 0 & 1 
\end{array}\right)\\[12pt]
&=2(-38)=-76.
\end{align*}

\textbf{Example 3.}
\begin{align*}
  \det
  \left(\begin{array}{cccc}
      4&2&-3&8\\
      0&5&1&3\\
      0&0&2&6\\
      0&0&0&3
  \end{array} \right)
  &=(4\cdot5\cdot2\cdot3)
  \det
  \left(\begin{array}{cccc}
      1&1/2&-3/2&4\\
      0&1&1/5&3/5\\
      0&0&1&3\\
      0&0&0&1
  \end{array} \right)\\[12pt]
  &=(4\cdot5\cdot2\cdot3)
  \det
  \left(\begin{array}{cccc}
      1&0&0&0\\
      0&1&0&0\\
      0&0&1&0\\
      0&0&0&1\\
  \end{array} \right)\\[12pt]
  &=(4\cdot5\cdot2\cdot3)\cdot 1=120.
\end{align*}

A matrix like that in the previous example, which has only zero entries below the
diagonal, is called \emph{upper-triangular}.  So~$A\in M_{n\times n}(F)$
is upper-triangular if~$A_{ij}=0$ whenever~$i>j$.

\textbf{Proposition 2.}  The determinant of an upper-triangular matrix is the
product of its diagonal elements.

\begin{proof}
  Let~$A$ be upper-triangular, and let~$E$ be its reduced echelon form.  From
  Proposition~1, we know that~$\det(A)=k\det(E)$ for some non-zero
  constant~$k$.  Imagine row-reducing an upper-triangular matrix, and you will see
  that~$E$ has a row of zeros if and only if~$A$ has some diagonal entry equal to
  zero.  If~$E$ has a row of zeros, then~$\det(E)=0$.  To see this, suppose the
  rows of~$E$ are~$r_1,\dots,r_n$ with~$r_n=\vec{0}$.  By multilinearity, we have:
  \begin{align*}
    \det(E)
    &=\det(r_1,\dots,r_{n-1},\vec{0})\\
    &=\det(r_1,\dots,r_{n-1},0\cdot\vec{0})\\
    &=0\cdot\det(r_1,\dots,r_{n-1},\vec{0})\\
    &=0.
  \end{align*}
  So if~$A$ has a diagonal entry equal to~$0$, then~$\det(E)=0$, which
  implies~$\det(A)=k\det(E)=0$.  So the result holds in this case.
  
  Next, suppose that~$A$ has no diagonal entries equal to~$0$.  Compute~$\det(A)$
  using multilinearity:
  \begin{align*}
    \det(A)&= \det
    \left(\begin{array}{cccccc}
        a_{11}&a_{12}&a_{13}&a_{14}&\dots&a_{1n}\\
        0&a_{22}&a_{23}&a_{24}&\dots&a_{2n}\\
        0&0&a_{33}&a_{34}&\dots&a_{3n}\\
        0&0&0&a_{44}&\dots&a_{4n}\\
        &&&&\ddots&\vdots\\
        &&&&&a_{nn}
    \end{array} \right)\\[20pt]
    &=
    a_{11}\cdots a_{nn}
   \det \left(\begin{array}{cccccc}
        1&a_{12}/a_{11}&a_{13}/a_{11}&a_{14}/a_{11}&\dots&a_{1n}/a_{11}\\
        0&1&a_{23}/a_{22}&a_{24}/a_{22}&\dots&a_{2n}/a_{22}\\
        0&0&1&a_{34}/a_{33}&\dots&a_{3n}/a_{33}\\
        0&0&0&1&\dots&a_{4n}/a_{44}\\
        &&&&\ddots&\vdots\\
        &&&&&1
    \end{array} \right)\\[20pt]
    &= a_{11}\cdots a_{nn}\det(I_n)\\
    &= a_{11}\cdots a_{nn}.
  \end{align*}
  Above, it is clear that once we get to the case of all $1$s on the diagonal, we
  can row-reduce the matrix to the identity by adding multiples of rows to other
  rows---operations that do not change the determinant.
  \hfill
\end{proof}

\textbf{Proposition 3.} Let~$A\in M_{n\times n}(F)$.  The following are
equivalent:
\begin{enumerate}[noitemsep]
  \item $\det(A)\neq 0$,
  \item $\rk(A)=n$,
  \item $A$ is invertible, i.e.,~$A$ has an inverse.
\end{enumerate}
\smallskip

\begin{proof}
  Given our algorithm for computing the inverse of a matrix, the
  equivalence of parts~2 and~3 is evident.  To show that parts~1 and~2 are
  equivalent, recall that by Proposition~1, we have~$\det(A)=k\det(E)$ where~$E$
  is the reduced echelon form of~$A$ and~$k$ is a non-zero scalar.
  Thus,~$\det(A)=0$ if and only if~$\det(E)=0$. The rank
  of~$A$ is~$n$ if and only if~$E=I_n$, in which case~$\det(A)=k\neq 0$.  The
  rank of~$A$ is strictly less than~$n$ if and only if~$E$ has a row of zeros.
  Since~$E$ is upper-triangular, Proposition~2 implies that~$E$ has a row of
  zeros if and only if~$\det(E)=0$.
\end{proof}

\hrule
\bigskip

\Needspace{3\baselineskip}
\textbf{To come:}
\begin{enumerate}[itemsep=4pt]
\item Define the \emph{transpose}, $A^t$ of $A$ by $A^t_{ij}:=A_{ji}$.  Then
  $\det A^t=\det A$, and thus, the determinant is also the unique multilinear,
  alternating, normalized function on the \emph{columns} of a matrix.
\item The determinant is multiplicative: $\det(AB)=\det(A)\det(B)$.
\item The determinant may be calculated by ``expanding'' along any row or
  column.
\item We have the following formula for the determinant
  \[
    \det A = \sum_{\sigma\in \mathfrak{S}_n}\mathrm{sgn}(\sigma)A_{1\sigma(1)}\cdots
  A_{n\sigma(n)}
\]
 where $\mathfrak{S}_n$ is the collection of all permutations of
 $(1,\dots,n)$ and $\mathrm{sgn}(\sigma$) is the \emph{sign} of the
 permutation~$\sigma$ (i.e., $1$
  if the permutation is formed by an even number of flips and $-1$ if it is
  formed by an odd number of flips).
\item Over the real numbers, the determinant gives the signed volume of the parallelepiped spanned by
  the rows (or by the columns) of the matrix.
\end{enumerate}

\end{document}
