\documentclass[12pt]{article}
\usepackage{fancyhdr,fancybox,amssymb,epsfig,amsmath,latexsym,bm}
\usepackage{enumerate}
\usepackage{tikz}
\usepackage[all]{xy}
\usepackage[numbers,square,sort&compress]{natbib}
\usepackage{bibentry}
\usepackage{stackrel}
\usepackage[]{hyperref}
\usetikzlibrary{arrows}
\usetikzlibrary{decorations.markings}
\usepackage{url}

\tikzset{big arrow/.style={decoration={markings,mark=at position 0.6
      with {\arrow[scale=2]{>}}}, postaction={decorate}, shorten >=1pt}}

% Code to make an augmented matrix (Usage: \begin{bmatrix}[ccc|c])
\makeatletter
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
  \hskip -\arraycolsep
  \let\@ifnextchar\new@ifnextchar
  \array{#1}}
\makeatother

\topmargin=-.5in
\headsep=0.2in
\oddsidemargin=0in
\textwidth=6.7in
\textheight=9.2in
\footskip=.5in

\definecolor{faded}{rgb}{.75,.75,.75}
\tikzstyle{f} = [faded]

% Change this line to \def\bold{\mathbf} for ``upright boldface.''
\def\bold{\bm}

\newcommand{\BBB}{\mathcal{B}}
\newcommand{\F}{\mathbb{F}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\def\0{\bold{0}}
\def\A{\bold{A}}
\def\B{\bold{B}}
\def\C{\bold{C}}
\def\F{\bold{F}}
\def\I{\bold{I}}
\def\M{\mathcal{M}}
\def\N{\bold{N}}
\def\U{\bold{U}}
\def\0{\bold{0}}
\def\a{\bold{a}}
\def\b{\bold{b}}
\def\c{\bold{c}}
\def\e{\bold{e}}
\def\p{\bold{p}}
\def\q{\bold{q}}
\def\s{\bold{s}}
\def\t{\bold{t}}
\def\u{\bold{u}}
\def\v{\bold{v}}
\def\x{\bold{x}}
\def\<{\langle}
\def\>{\rangle}
\def\hat{\widehat}
\newcommand\longto{\longrightarrow}

\def\Sum{\sum\limits}
\def\Prod{\prod\limits}
\def\Cap{\mathop\cap\limits}
\def\Cup{\mathop\cup\limits}
\def\Times{\mathop\times\limits}
\def\Oplus{\mathop\oplus\limits}
\def\Lim{\mathop\lim\limits}

\def\And{\wedge}
\def\Or{\vee}
\newcommand{\Not}[1]{\overline{#1}}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\Span}{Span}
\DeclareMathOperator{\rank}{rank}
\newcommand{\vv}[2]{\begin{bmatrix} #1 \\ #2 \end{bmatrix}}
\newcommand{\vvv}[3]{\begin{bmatrix} #1 \\ #2 \\ #3 \end{bmatrix}}

\newcommand{\ds}{\displaystyle}

\renewcommand{\footrulewidth}{1pt}
\newenvironment{proof}[1][Proof.]{\smallskip\begin{trivlist}
    \item[\hskip \labelsep {\sffamily #1}]}{\qed\end{trivlist}\bigskip}
\newenvironment{sol}[1][Solution.]{\smallskip\begin{trivlist}
    \item[\hskip \labelsep {\sffamily #1}]}{\qed\end{trivlist}\bigskip}
\newenvironment{fminipage}
{\setlength{\fboxsep}{15pt}\begin{Sbox}\begin{minipage}}
{\end{minipage}\end{Sbox}\fbox{\TheSbox}}
\newcommand{\qed}{\hfill \ensuremath{\Box}}
\newcommand{\disp}{\displaystyle}

\setlength{\headheight}{15pt}
\lhead{{\sf Bridge course (Algebra)}: Thursday July 18}
\chead{}\rhead{\thepage}
\lfoot{Due Friday, July 19 2024}
\cfoot{}\rfoot{Written by M.~Macauley}
  \pagestyle{fancy}

\begin{document}

%$\;$ \vspace{-4mm}

\noindent \textbf{Topic}: Determinant and trace \\

\noindent \textbf{Do}: Answer the following questions. 

\begin{enumerate}

%%------------------------------------------------------------------------

\item The following matrix is called a ($4\times 4$) \emph{Hadamard matrix}:
  \[
  \bold{H}
  =\begin{bmatrix}1&1&1&1\\1&1&-1&-1\\1&-1&-1&1\\1&-1&1&-1\end{bmatrix}\,.
  \]
  Note that the ``box'' formed by the four row (or column) vectors is a
  hypercube in $\R^4$. Using this information alone---purely a geometric argument---find $|\det\bold{H}|$. \\

%%------------------------------------------------------------------------
 
\item Using linearity of each row, the determinant of an $n\times n$
  matrix can be written as a sum of determinants of no more than $n!$
  matrices that have \emph{exactly one non-zero entry in each row and
  column}. For example, a $3\times 3$ determinant breaks up as
  \[
  \begin{vmatrix}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33}
  \end{vmatrix}  
  =\begin{vmatrix}a_{11}&0&0\\0&a_{22}&0\\0&0&a_{33}\end{vmatrix}  
  +\begin{vmatrix}a_{11}&0&0\\0&0&a_{23}\\0&a_{32}&0\end{vmatrix}
  +\begin{vmatrix}0&a_{12}&0\\a_{21}&0&0\\0&0&a_{33}\end{vmatrix}+\cdots.
  \]
  From here, it is simple to compute each individual determinant.
  Compute the determinant of each of the following matrices using this
  method. Only include the non-zero terms.
  \[
  \A=\begin{bmatrix}a&b&c\\d&e&f\\g&h&i\end{bmatrix}\qquad\qquad
  \B=\begin{bmatrix}1&1&0&0\\1&0&1&0\\0&0&1&1\\0&2&0&1\end{bmatrix}\,
  \qquad\qquad
  \C=\begin{bmatrix}1&0&0&2\\0&3&4&5\\5&4&0&3\\2&0&0&1\end{bmatrix}\,
  \]  
  Use your answer to the first part to derive a ``shortcut formula'' for
  the determinant of any $3\times 3$ matrix. [\emph{Hint}: Write out
    the augmented $3\times 6$ matrix $[\A|\A]$ and draw some
    ``diagonal lines.''] \\

 %%------------------------------------------------------------------------

\item Recall that the \emph{trace} of an $n\times n$ matrix is $\tr A=\Sum_{i=1}^n a_{ii}$.
  \begin{enumerate}
  \item Let $A$ be an $m\times n$ matrix, and $B$ be an $n\times m$ matrix. Show that the $m\times m$ matrix $AB$ and the $n\times n$ matrix $BA$ have the same trace. 
  \item If $A$ is an $n\times n$ matrix, derive a formula for $\tr(A^TA)=\tr(AA^T)$ in
    terms of $a_{ij}$.
  \end{enumerate}
  
 %%------------------------------------------------------------------------ 

\end{enumerate}

\end{document}


  \[
    [\A\;|\;\I\,]
    =\begin{bmatrix}[cc|cc] 1 & -2 & 1 & 0 \\ 3 & -7 & 0 & 1\end{bmatrix}
    \,\qquad\qquad
    [\B\;|\;\I\,]=\begin{bmatrix}[ccc|ccc] 3 & 1 & 4 & 1 & 0 & 0 \\ 
    5 & 2 & 6 & 0 & 1 & 0 \\ -7 & -2 & -9 & 0 & 0 & 1\end{bmatrix}
  \]
