\documentclass[12pt]{article}
\usepackage[dvipdf]{graphics}
\usepackage{amsmath}

\setlength{\textwidth}{7.5in} \setlength{\oddsidemargin}{-0.5in}
\setlength{\topmargin}{-1in} \setlength{\textheight}{10.5in}%\setlength{\footskip}{-4in}


\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{example}[theorem]{Example}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{approximation}[theorem]{Approximation}
\newtheorem{definition}[theorem]{Definition}
\newenvironment{proof}{{\noindent\bf Proof\ }}{\hfill$\BOX$ \\}
\newenvironment{justify}{{\noindent\bf Justification\ }}{$\BOX$ \\}
\newtheorem{conjecture}[theorem]{Conjecture}
\newcommand{\BC}{\begin{center}}
\newcommand{\EC}{\end{center}}
\newcommand{\BE}{\begin{equation}}
\newcommand{\EE}{\end{equation}}
\newcommand{\BEA}{\begin{eqnarray}}
\newcommand{\EEA}{\end{eqnarray}}
\newcommand{\BEAS}{\begin{eqnarray*}}
\newcommand{\EEAS}{\end{eqnarray*}}
\newcommand{\BEN}{\begin{enumerate}}
\newcommand{\EEN}{\end{enumerate}}
\newcommand{\BEG}{\begin{example}\rm}
\newcommand{\EEG}{\end{example}}
\newcommand{\BTHM}{\begin{theorem}}
\newcommand{\ETHM}{\end{theorem}}
\newcommand{\BCOR}{\begin{corollary}}
\newcommand{\ECOR}{\end{corollary}}
\newcommand{\BDEF}{\begin{definition}}
\newcommand{\EDEF}{\end{definition}}
\newcommand{\BPF}{\begin{proof}\rm}
\newcommand{\EPF}{\end{proof}}
\newcommand{\BRMK}{\begin{remark}\rm}
\newcommand{\ERMK}{\end{remark}}
\newcommand{\BLEM}{\begin{lemma}}
\newcommand{\ELEM}{\end{lemma}}
\newcommand{\BCON}{\begin{conjecture}}
\newcommand{\ECON}{\end{conjecture}}
\newcommand{\BAPR}{\begin{approximation}}
\newcommand{\EAPR}{\end{approximation}}
\newcommand{\BPROP}{\begin{proposition}}
\newcommand{\EPROP}{\end{proposition}}
\newcommand{\bthm}{\begin{theorem}}
\newcommand{\ethm}{\end{theorem}}
\newcommand{\hs}[1]{\hspace{#1}}
\newcommand{\vs}[1]{\vspace{#1}}
\newcommand{\ra}{\rightarrow}
\newcommand{\Ra}{\Rightarrow}
\newcommand{\natlog}{\ell n}
\newcommand{\E}{\mbox{E}} % expectation operator
\newcommand{\Var}{\mbox{Var}} % Var operator
\newcommand{\Bias}{\mbox{Bias}} % Bias operator
\newcommand{\MSE}{\mbox{MSE}} % MSE operator
\newcommand{\Cov}{\mbox{Cov}} % Cov operator
\newcommand{\Corr}{\mbox{Corr}} % Corr operator
\newcommand{\sig}{\mbox{$\sigma^2$}}
\newcommand{\sigsqn}{\mbox{$\sigma_n^2$}}
\newcommand{\norm} [1]{\mbox{$\parallel{#1}\parallel$}}
\newcommand{\floor}[1]{\mbox{$\lfloor #1 \rfloor$}}
\newcommand{\cid}{\mbox{$ \ \stackrel{\cal D}{\rightarrow} \ $}}
\newcommand{\summ}[1]{\sum_{#1=1}^{n}}
\newcommand{\BOX}{\rule[-2pt]{4pt}{8pt}}
\newcommand{\itbold}[1]{\mbox{\boldmath $#1$}}
\newcommand{\zee}{\hbox{{\sf Z}\kern-.3550em\hbox{{\sf Z}} }}
\newcommand{\real}{\hbox{{I\kern-.1667em\hbox{R}}}}
\newcommand{\nn}{{\rm I\hspace{-0.7mm}N}}
\newcommand{\mm}{{\rm I\hspace{-0.7mm}M}}
\newcommand{\ee}{{\rm I\hspace{-0.7mm}E}}
\newcommand{\ff}{{\rm I\hspace{-0.7mm}F}}
\newcommand{\ind}{{\rm 1\hspace{-.9mm}l}}
\newcommand{\rr}{{\rm I\hspace{-0.7mm}R}}
\newcommand{\zz}{{\rm Z\hspace{-2mm}Z}}
\newcommand{\qq}{{\rm I\hspace{-1.8mm}Q}}
\newcommand{\nin}{\,\,{\rm /\hspace{-3.4mm}\in}\,\,}


\begin{document}

\noindent Matt Jones \hfill Statistical Methods II\hfill 3260-L14\\


\begin{center} {\bf \Large Review of Matrices} \end{center}

\section*{Basics} An $m\times n$ matrix is a set of numbers
arranged in an array of $m$ rows and $n$ columns:\[A_{m \times n} = \left(%
\begin{array}{cccc}
  a_{11} & a_{12} & \cdots & a_{1n} \\
  a_{21} & a_{22} & \cdots & a_{2n} \\
  \vdots & \vdots & \ddots & \vdots \\
  a_{m 1} & a_{m  2} & \cdots & a_{m n} \\
\end{array}%
\right)\]

\noindent The dimension of the matrix $A$ is $m\times n$, and is
often displayed underneath the matrix name as a reminder.  A matrix
is square if its \# of rows = its \# of columns (if $m=n$).

\BEG

\EEG

\vspace{4cm}

\noindent A column vector is a matrix with only one column.  A row
vector is a matrix with only one row.  \BEG

\EEG

\vspace{4cm}

\noindent The transpose $A^T$ of the matrix $A$ is obtained by
interchanging the rows and columns of $A$.\BEG

\EEG

\vspace{6cm}

\noindent Note the transpose of an $m\times n$ matrix has dimension
$n \times m$.\\

\noindent Two matrices $A$ and $B$ are equal iff they have the
same dimension and their corresponding elements are equal: $a_{ij}
= b_{ij}$ for all $i,j$.  \BEG

\EEG

\vspace{4cm}

\subsection*{Addition and Subtraction} We can add or subtract
matrices with the same dimensions. For two $m\times n$ matrices
$A$ and $B$, \[A_{m \times n} + B_{m\times n} = \left(%
\begin{array}{cccc}
  a_{11}+b_{11} & a_{12} +b_{12}& \cdots & a_{1n}+b_{1n} \\
  a_{21} + b_{21}& a_{22}+b_{22} & \cdots & a_{2n} +b_{2n}\\
  \vdots & \vdots & \ddots & \vdots \\
  a_{m 1} + b_{m 1} & a_{m 2}+b_{m 2}& \cdots & a_{m n}+b_{m n} \\
\end{array}%
\right)\] Similarly, \[A_{m \times n} - B_{m\times n} = \left(%
\begin{array}{cccc}
  a_{11}-b_{11} & a_{12} -b_{12}& \cdots & a_{1n}-b_{1n} \\
  a_{21} - b_{21}& a_{22}-b_{22} & \cdots & a_{2n} -b_{2n}\\
  \vdots & \vdots & \ddots & \vdots \\
  a_{m 1} - b_{m 1} & a_{m 2}-b_{m 2}& \cdots & a_{m n}-b_{m n} \\
\end{array}%
\right)\]

\BEG

\EEG

\vspace{4cm}

\section*{Multiplication by a Scalar} A scalar is a number.  Given
the $m\times n$ matrix $A$ \[A = \left(%
\begin{array}{cccc}
  a_{11} & a_{12}& \cdots & a_{1n}\\
  a_{21} & a_{22} & \cdots & a_{2n}\\
  \vdots & \vdots & \ddots & \vdots \\
  a_{m 1} & a_{m 2}& \cdots & a_{m n}\\
\end{array}%
\right)\]and a scalar $k$, the product $kA$ is defined to be \[kA = \left(%
\begin{array}{cccc}
  ka_{11} & ka_{12}& \cdots & ka_{1n}\\
  ka_{21} & ka_{22} & \cdots & ka_{2n}\\
  \vdots & \vdots & \ddots & \vdots \\
  ka_{m 1} & ka_{m 2}& \cdots & ka_{m n}\\
\end{array}%
\right)\] \BEG

\EEG

\vspace{4cm}


\section*{Multiplication of Matrices} Given matrices $A_{m\times
p}$ and $B_{p\times n}$, their product $C_{m\times n} = A_{m\times
p} B_{p\times n}$ is given by \[C_{m\times n} = A_{m\times p}
B_{p\times n}  = \left(%
\begin{array}{cccc}
  \sum_{k=1}^pa_{1k}b_{k1} & \sum_{k=1}^pa_{1k}b_{k2} & \cdots & \sum_{k=1}^pa_{1k}b_{kn}\\
  \sum_{k=1}^pa_{2k}b_{k1} & \sum_{k=1}^pa_{2k}b_{k2} & \cdots & \sum_{k=1}^pa_{2k}b_{kn}\\
  \vdots & \vdots & \ddots & \vdots \\
  \sum_{k=1}^pa_{mk}b_{k1} & \sum_{k=1}^pa_{mk}b_{k2}& \cdots & \sum_{k=1}^pa_{mk}b_{kn}\\
\end{array}%
\right)\] \BEG

\EEG


\vspace{6cm}

\noindent When obtaining the product $AB$, we say ``$B$ is
pre-multiplied by $A$", or ``$A$ is post-multiplied by $B$".  Note
the dimension of $A_{m\times p} B_{p\times n}$ is $m \times n$.

\section*{Special Matrix Types} Matrix $A$ is \underline{symmetric}
if $A = A^T$.  That is, $A$ is symmetric iff $a_{ij} = a_{ji}$ for
each $i,j \in\{1,\ldots n\}$, and $n=$ \# of columns or rows.   Note
that all symmetric matrices are square.\BEG

\EEG

\vspace{4cm}

\noindent A \underline{diagonal matrix} is a square matrix whose
only non-zero elements are along the diagonal.\BEG

\EEG

\vspace{4cm}

\noindent The \underline{identity matrix} $I$ is a diagonal matrix
whose diagonal elements are 1s.\BEG

\EEG

\vspace{4cm}

\noindent Pre- or post-multiplying a matrix $A$ by $I$ (with
appropriate dimension) yields $A$:\[I_{m\times m} A_{m\times n} =
 A_{m\times n}I_{n\times n} = A_{m \times n}\] A \underline{scalar
 matrix} is a diagonal matrix whose main diagonal elements are the
 same, and can be expressed as the product of a scalar and $I$:

\BEG

\EEG

\vspace{5cm}

\noindent We use the notation $1_{m\times 1}$, $J_{m\times m}$,
and $0_{m\times 1}$ to mean \[1_{m\times 1} = \left(%
\begin{array}{c}
  1 \\
  1 \\
  \vdots \\
  1 \\
\end{array}%
\right), \qquad  J_{m\times m}
= \left(%
\begin{array}{cccc}
  1 & 1 & \cdots & 1 \\
  1 & 1 & \cdots & 1 \\
  \vdots & \vdots & \ddots & \vdots \\
  1 & 1 & \cdots & 1 \\
\end{array}%
\right),\qquad  0_{m\times 1} = \left(%
\begin{array}{c}
  0 \\
  0 \\
  \vdots \\
  0 \\
\end{array}%
\right)\]

\section*{Linear Dependence} The columns of a matrix are
\underline{linearly dependent} if one of them is a linear
combination of the others.  Think of the columns in a matrix as
vectors $C_1, C_2, \ldots, C_n$.  When $n$ scalars $k_1, \ldots,
k_n$, not all zero, can be found such that \BEA
\label{lindep}\sum_{i=1}^n k_iC_i = 0,\EEA the $n$ column vectors
are linearly dependent.  If the only solution to (\ref{lindep}) is
$k_i = 0 \forall i$, the $n$ column vectors are \underline{linearly
independent}.\BEG

\EEG

\vspace{7cm}

\noindent The rank of a matrix is the maximum number of linearly
independent columns.  For matrices $A$ and $B$ above, rank($A$) =
3 and rank($B$) = 3.  Rank is equivalently defined as the maximum
number of linearly independent rows.

\section*{Inverse of a Matrix} The \underline{inverse} of a square
matrix $A$ is denoted $A^{-1}$ and satisfies \[A A^{-1} = A^{-1} A
= I\] when it exists.  \BEG

\EEG

\vspace{7cm}

\section*{Basic Rules for Matrices}
\noindent For the scalar $k$ and matrices $A, B, C$ of appropriate
dimension, \BEAS A+B &=& B+A \qquad \qquad \qquad
\;\;\;\;\,\,\,\textrm{(commutative
property of matrix addition)}\\
(A+B)+C &=& A+(B+C) \;\;\;\qquad \qquad \textrm{(associative
property of
matrix addition)}\\
(AB)C &=& A(BC) \qquad \qquad \qquad
\;\;\;\;\,\textrm{(associative property
of matrix multiplication)}\\
C(A+B)&=& CA + CB \qquad \qquad \qquad \textrm{(distributive
law)}\\
k(A+B) &+& kA + k B \qquad \qquad \qquad \,\,\,\textrm{(follows
from the
distributive law)}\\
(A^T)^T &=& A \\
 (A+B)^T &=& A^T + B^T\\
 (AB)^T &=& B^TA^T\\
 (ABC)^T &=& C^TB^TA^T\\
 (AB)^{-1} &=& B^{-1}A^{-1} \qquad \qquad \qquad \;\;\;\,\textrm{(when the inverses exist)}\\
 (ABC)^{-1} &=& C^{-1}B^{-1}A^{-1} \qquad \qquad \;\;\;\,\,\, \textrm{(when the inverses exist)}\\
 (A^{-1})^{-1} &=& A \qquad\qquad \qquad \qquad \;\;\;\;\,\,\,\, \textrm{(when $A^{-1}$ exists)}\\
 (A^T)^{-1} &=& (A^{-1})^T \qquad \qquad \qquad \;\;\;\,\,\,\, \textrm{(when $A^{-1}$ exists)}\EEAS

\noindent{\bf Homework: Do the following problems.
\begin{enumerate}
    \item Given the matrices\[A = \left(
                                    \begin{array}{cc}
                                      1 & 4 \\
                                      2 & 6 \\
                                      3 & -1 \\
                                    \end{array}
                                  \right)
    ,\qquad B = \left(
                  \begin{array}{cc}
                    2 & 2 \\
                    3 & 2 \\
                    1 & 7 \\
                  \end{array}
                \right)
    ,\qquad C = \left(
                  \begin{array}{ccc}
                    3 & 7 & 1 \\
                    4 & 7 & 5 \\
                  \end{array}
                \right)
    ,\] obtain $A+B$, $A-B$, $AC$, $AB^{T}$, $B^TA$.

    \item Prove that for any $2\times 2$ matrix $A$ \[A = \left(
                                                        \begin{array}{cc}
                                                          a_{11} & a_{12} \\
                                                          a_{21} & a_{22} \\
                                                        \end{array}
                                                      \right)
    \] that $A^{-1}$ (if it exists) is given by \[A{-1} = \left(
                                                        \begin{array}{cc}
                                                          a_{22}/D & -a_{12}/D \\
                                                          -a_{21}/D & a_{11}/D \\
                                                        \end{array}
                                                      \right),\]
                                                      where $D =
                                                      a_{11}a_{22} -
                                                      a_{12}a_{21}$.

    \item Given the matrices $X$ and $Y$ \[X = \left(
                                                 \begin{array}{cc}
                                                   1 & 2 \\
                                                   1 & 3 \\
                                                   1 & 5 \\
                                                   1 & 6 \\
                                                   1 & 4 \\
                                                 \end{array}
                                               \right)
    ,\qquad Y = \left(
                  \begin{array}{c}
                    6 \\
                    9 \\
                    23 \\
                    25 \\
                    17 \\
                  \end{array}
                \right)
    \] evaluate the expression $\beta = (X^{T}X)^{-1}X^TY$.  What is
    the dimension of $\beta$?
\end{enumerate}}

\end{document}

