\documentclass{article}
\input{../macros.tex}

\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Lecture 3:  Multiplication and inverse matrices}

\subsection*{Matrix Multiplication}

We discuss four different ways of thinking about the product $\mb{A B = C}$ of two matrices.  If $\mb A$ is an $m \times n$ matrix and $\mb B$ is an $n \times p$ matrix, then $\mb C$ is an $n \times n$ matrix.
We use $c_{ij}$ to denote the entry in row $i$ and column $j$ of matrix $\mb C$.

\subsubsection*{Standard (row times column)}

The standard way of describing a matrix product is to say that $c_{ij}$ equals the dot product of row $i$ of matrix $\mb A$ and column $j$ of matrix $\mb B$.  In other words, $\displaystyle{c_{ij} = \sum_{k=1}^n a_{ik} b_{kj}}$.

\subsubsection*{Columns}

The product of matrix ${\mb A}$ and column $j$ of matrix $\mb B$ equals column $j$ of matrix $\mb C$.  This tells us that the columns of $\mb C$ are combinations of columns of $\mb A$.

\subsubsection*{Rows}

The product of row $i$ of matrix $\mb A$ and matrix $\mb B$ equals row $i$ of matrix $\mb C$.  So the rows of $\mb C$ are combinations of rows of $\mb B$.

\subsubsection*{Column times row}

A column of $\mb A$ is an $m \times 1$ vector and a row of $\mb B$ is a $1 \times p$ vector.  Their product is a matrix:
$$\threebyone 2 3 4 \left[\begin{array}{rr}1& 6 \end{array}\right] = \threebytwo 2 {12} 3 {18} 4 {24}.$$
The columns of this matrix are multiples of the column of $\mb A$ and the rows are multiples of the row of $\mb B$.  If we think of the entries in these rows as the coordinates $(2, 12)$ or $(3, 18)$ or $(4, 24)$, all these points lie on the same line; similarly for the two column vectors.  Later we'll see that this is equivalent to saying that the {\em row space} of this matrix is a single line, as is the {\em column space}.

The product of $\mb A$ and $\mb B$ is the sum of these "column times row" matrices:
$$\mb{AB} = \sum_{k=1}^n \threebyone {a_{1k}} {\vdots}{a_{mk}} \left[\begin{array}{rrr}b_{k1}& \cdots & b_{kn} \end{array}\right] .$$

\subsubsection*{Blocks}

If we subdivide $\mb A$ and $\mb B$ into blocks that match properly, we can write the product $\mb{AB=C}$ in terms of products of the blocks:
$$\twobytwo{\mb{A_1}}{\mb{A_2}}{\mb{A_3}}{\mb{A_4}} \twobytwo{\mb{B_1}}{\mb{B_2}}{\mb{B_3}}{\mb{B_4}} = \twobytwo{\mb{C_1}}{\mb{C_2}}{\mb{C_3}}{\mb{C_4}}.$$
Here $\mb{C_1 = A_1 B_1 + A_2 B_3}$.

\subsection*{Inverses}

\subsubsection*{Square matrices}

If $\mb A$ is a square matrix, the most important question you can ask about it is whether it has an inverse $\mb A^{-1}$.
If it does, then $\mb A^{-1} \mb{A = I = A} \mb A^{-1}$ and we say that $\mb A$ is {\em invertible} or {\em nonsingular}.

\smallskip

If $\mb A$ is {\em singular} -- i.e. $\mb A$ does not have an inverse -- its determinant is zero and we can find some non-zero vector $\vb x$ for which $\mb A \vb x = \mb 0$.  For example:
$$\twobytwo 1 3 2 6 \twobyone 3 {-1} = \twobyone 0 0.$$
In this example, three times the first column minus one times the second column equals the zero vector; the two column vectors lie on the same line.

\smallskip

Finding the inverse of a matrix is closely related to solving systems of linear equations:
$$\begin{array}{cccc}
\twobytwo 1 3 2 7 & \twobytwo a c b d & = & \twobytwo 1 0 0 1\\
\mb A & \mb A^{-1} && \mb I \end{array}$$
can be read as saying "$\mb A$ times column $j$ of $\mb A^{-1}$ equals column $j$ of the identity matrix".  This is just a special form of the equation $\mb A \vb x = \vb b$.

\subsection*{Gauss-Jordan Elimination}

We can use the method of elimination to solve two or more linear equations at the same time.  Just augment the matrix with the whole identity matrix $\mb I$:
$$\left[ \begin{array}{r r | r r}
1 & 3 & 1 & 0\\
2 & 7 & 0 & 1\end{array}\right] 
\longrightarrow 
\left[ \begin{array}{r r | r r}
1 & 3 & 1 & 0\\
0 & 1 & -2 & 1\end{array}\right]
\longrightarrow 
\left[ \begin{array}{r r | r r}
1 & 0 & 7 & -3\\
0 & 1 & -2 & 1\end{array}\right]
$$
(Once we have used Gauss' elimination method to convert the original matrix to upper triangular form, we go on to use Jordan's idea of eliminating entries in the upper right portion of the matrix.)
$$\mb A^{-1} = \twobytwo  7 {-3} {-2} 1.$$

As in the last lecture, we can write the results of the elimination method as the product of a number of elimination matrices $\mb E_{ij}$ with the matrix $\mb A$.  Letting $\mb E$ be the product of all the $\mb E_{ij}$, we write the result of this Gauss-Jordan elimination using block matrices: $\mb E [\, \mb A\, | \,\mb I \,] = [\,\mb I\, |\, \mb E\,]$.  But if $\mb {EA = I}$, then $\mb E = \mb A^{-1}$.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
