\documentclass[numbers=enddot,12pt,final,onecolumn,notitlepage]{scrartcl}%
\usepackage{amsfonts}
\usepackage[headsepline,footsepline,manualmark]{scrlayer-scrpage}
\usepackage[all,cmtip]{xy}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{framed}
\usepackage{comment}
\usepackage{color}
\usepackage{hyperref}
\usepackage[sc]{mathpazo}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{needspace}
\usepackage{tabls}
\usepackage{wasysym}
\usepackage{graphicx}%
\setcounter{MaxMatrixCols}{30}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2960}
%TCIDATA{LastRevised=Thursday, December 05, 2019 09:41:11}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%BeginMSIPreambleData
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
%EndMSIPreambleData
\usetikzlibrary{arrows}
\newcounter{exer}
\newcounter{exera}
\numberwithin{exer}{subsection}
\theoremstyle{definition}
\newtheorem{theo}{Theorem}[subsection]
\newenvironment{theorem}[1][]
{\begin{theo}[#1]\begin{leftbar}}
{\end{leftbar}\end{theo}}
\newtheorem{lem}[theo]{Lemma}
\newenvironment{lemma}[1][]
{\begin{lem}[#1]\begin{leftbar}}
{\end{leftbar}\end{lem}}
\newtheorem{prop}[theo]{Proposition}
\newenvironment{proposition}[1][]
{\begin{prop}[#1]\begin{leftbar}}
{\end{leftbar}\end{prop}}
\newtheorem{defi}[theo]{Definition}
\newenvironment{definition}[1][]
{\begin{defi}[#1]\begin{leftbar}}
{\end{leftbar}\end{defi}}
\newtheorem{remk}[theo]{Remark}
\newenvironment{remark}[1][]
{\begin{remk}[#1]\begin{leftbar}}
{\end{leftbar}\end{remk}}
\newtheorem{coro}[theo]{Corollary}
\newenvironment{corollary}[1][]
{\begin{coro}[#1]\begin{leftbar}}
{\end{leftbar}\end{coro}}
\newtheorem{conv}[theo]{Convention}
\newenvironment{convention}[1][]
{\begin{conv}[#1]\begin{leftbar}}
{\end{leftbar}\end{conv}}
\newtheorem{quest}[theo]{Question}
\newenvironment{question}[1][]
{\begin{quest}[#1]\begin{leftbar}}
{\end{leftbar}\end{quest}}
\newtheorem{warn}[theo]{Warning}
\newenvironment{conclusion}[1][]
{\begin{warn}[#1]\begin{leftbar}}
{\end{leftbar}\end{warn}}
\newtheorem{conj}[theo]{Conjecture}
\newenvironment{conjecture}[1][]
{\begin{conj}[#1]\begin{leftbar}}
{\end{leftbar}\end{conj}}
\newtheorem{exam}[theo]{Example}
\newenvironment{example}[1][]
{\begin{exam}[#1]\begin{leftbar}}
{\end{leftbar}\end{exam}}
\newtheorem{exmp}[exer]{Exercise}
\newenvironment{exercise}[1][]
{\begin{exmp}[#1]\begin{leftbar}}
{\end{leftbar}\end{exmp}}
\newenvironment{statement}{\begin{quote}}{\end{quote}}
\newenvironment{fineprint}{\begin{small}}{\end{small}}
\iffalse
\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newenvironment{question}[1][Question]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newenvironment{teachingnote}[1][Teaching note]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\fi
\let\sumnonlimits\sum
\let\prodnonlimits\prod
\let\cupnonlimits\bigcup
\let\capnonlimits\bigcap
\renewcommand{\sum}{\sumnonlimits\limits}
\renewcommand{\prod}{\prodnonlimits\limits}
\renewcommand{\bigcup}{\cupnonlimits\limits}
\renewcommand{\bigcap}{\capnonlimits\limits}
\setlength\tablinesep{3pt}
\setlength\arraylinesep{3pt}
\setlength\extrarulesep{3pt}
\voffset=0cm
\hoffset=-0.7cm
\setlength\textheight{22.5cm}
\setlength\textwidth{15.5cm}
\newcommand\arxiv[1]{\href{http://www.arxiv.org/abs/#1}{\texttt{arXiv:#1}}}
\newenvironment{verlong}{}{}
\newenvironment{vershort}{}{}
\newenvironment{noncompile}{}{}
\newenvironment{teachingnote}{}{}
\excludecomment{verlong}
\includecomment{vershort}
\excludecomment{noncompile}
\excludecomment{teachingnote}
\newcommand{\CC}{\mathbb{C}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\KK}{\mathbb{K}}
\newcommand{\id}{\operatorname{id}}
\newcommand{\lcm}{\operatorname{lcm}}
\newcommand{\rev}{\operatorname{rev}}
\newcommand{\powset}[2][]{\ifthenelse{\equal{#2}{}}{\mathcal{P}\left(#1\right)}{\mathcal{P}_{#1}\left(#2\right)}}
\newcommand{\set}[1]{\left\{ #1 \right\}}
\newcommand{\abs}[1]{\left| #1 \right|}
\newcommand{\tup}[1]{\left( #1 \right)}
\newcommand{\ive}[1]{\left[ #1 \right]}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
\newcommand{\lf}[2]{#1^{\underline{#2}}}
\newcommand{\underbrack}[2]{\underbrace{#1}_{\substack{#2}}}
\newcommand{\horrule}[1]{\rule{\linewidth}{#1}}
\newcommand{\nnn}{\nonumber\\}
\newcommand{\sslash}{\mathbin{/\mkern-6mu/}}
\iffalse
\UNEXPAND{\today}{\today}
\fi
\ihead{Fall 2019 Math 201-003 at Drexel: blackboard notes of 2019-09-23}
\ohead{page \thepage}
\cfoot{}
\begin{document}

\title{Fall 2019 Math 201-003 at Drexel: blackboard notes of 2019-09-23}
\author{Darij Grinberg}
\date{\today}
\maketitle

\textbf{Course website:} \url{https://www.cip.ifi.lmu.de/~grinberg/t/19fla/index.html}

\begin{noncompile}
\textbf{Office hours:}

\begin{itemize}
\item Tuesday 14:00--16:00 (i.e., 2PM--4PM)

\item Thursday 13:00--14:00
\end{itemize}
\end{noncompile}

\section{Introduction to matrices}

This chapter follows \cite[Chapter 2]{lina}, but we will give a lot fewer
details, as many of you will have seen this material already. We will spend
half the time introducing notations and half the time stating basic facts.

\subsection{Matrices and their entries}

This section follows \cite[\S 2.1]{lina}.

From now on, $\mathbb{N}$ means the set $\left\{  0,1,2,\ldots\right\}  $.

If $n,m\in\mathbb{N}$, then an $n\times m$\textit{-matrix} will mean a
rectangular table with $n$ rows and $m$ columns, such that each cell is filled
with a number.

"Number" means real number unless stated otherwise.

For example, $\left(
\begin{array}
[c]{ccc}%
1 & 7 & 2\\
-\sqrt{2} & 6 & 1/3
\end{array}
\right)  $ is a $2\times3$-matrix.

A \textit{matrix} just means an $n\times m$-matrix for some $n$ and $m$.

The \textit{dimensions} of an $n\times m$-matrix are the two integers $n$ and
$m$. We say that a matrix has \textit{size }$n\times m$ if it is an $n\times
m$-matrix.

If $A$ is an $n\times m$-matrix, and $i\in\left\{  1,2,\ldots,n\right\}  $ and
$j\in\left\{  1,2,\ldots,m\right\}  $, then $A_{i,j}$ shall mean the entry of
$A$ in row $i$ and column $j$. This is also called the $\left(  i,j\right)
$\textit{-th entry }of $A$.

For example,%
\begin{align*}
\left(
\begin{array}
[c]{ccc}%
1 & 7 & 2\\
-\sqrt{2} & 6 & 1/3
\end{array}
\right)  _{1,2}  &  =7;\\
\left(
\begin{array}
[c]{ccc}%
1 & 7 & 2\\
-\sqrt{2} & 6 & 1/3
\end{array}
\right)  _{2,3}  &  =1/3.
\end{align*}


This notation is not quite standard. You will often see people denote the
$\left(  i,j\right)  $-th entry of $A$ by $a_{i,j}$ (using the lowercase
version of the letter). I prefer to call it $A_{i,j}$.

\subsection{The matrix builder notation}

This section follows \cite[\S 2.2]{lina}.

Let $n,m\in\mathbb{N}$. Assume that you are given some number $a_{i,j}$ for
each pair $\left(  i,j\right)  $ of an $i\in\left\{  1,2,\ldots,n\right\}  $
and a $j\in\left\{  1,2,\ldots,m\right\}  $. Then, $\left(  a_{i,j}\right)
_{1\leq i\leq n,\ 1\leq j\leq m}$ denotes the $n\times m$-matrix whose
$\left(  i,j\right)  $-th entry is $a_{i,j}$ for all $i$ and $j$. In other
words,%
\[
\left(  a_{i,j}\right)  _{1\leq i\leq n,\ 1\leq j\leq m}=\left(
\begin{array}
[c]{cccc}%
a_{1,1} & a_{1,2} & \cdots & a_{1,m}\\
a_{2,1} & a_{2,2} & \cdots & a_{2,m}\\
\vdots & \vdots & \ddots & \vdots\\
a_{n,1} & a_{n,2} & \cdots & a_{n,m}%
\end{array}
\right)  .
\]
This is called \textit{matrix builder notation}\footnote{in analogy to the
\textit{set builder notation} $\left\{  b_{i}\ \mid\ i\in\left\{
1,2,\ldots,n\right\}  \right\}  =\left\{  b_{1},b_{2},\ldots,b_{n}\right\}  $
for the set consisting of $n$ given objects $b_{1},b_{2},\ldots,b_{n}$}.

Some examples:%
\[
\left(  i-j\right)  _{1\leq i\leq2,\ 1\leq j\leq3}=\left(
\begin{array}
[c]{ccc}%
1-1 & 1-2 & 1-3\\
2-1 & 2-2 & 2-3
\end{array}
\right)  =\left(
\begin{array}
[c]{ccc}%
0 & -1 & -2\\
1 & 0 & -1
\end{array}
\right)  ;
\]%
\[
\left(  j-i\right)  _{1\leq i\leq2,\ 1\leq j\leq3}=\left(
\begin{array}
[c]{ccc}%
1-1 & 2-1 & 3-1\\
1-2 & 2-2 & 3-2
\end{array}
\right)  =\left(
\begin{array}
[c]{ccc}%
0 & 1 & 2\\
-1 & 0 & 1
\end{array}
\right)  .
\]


The letters $i$ and $j$ in the notation "$\left(  a_{i,j}\right)  _{1\leq
i\leq n,\ 1\leq j\leq m}$" are \textbf{dummy variables}, like for example the
letter $x$ in $\left\{  x\in\mathbb{R}\ \mid\ x>2\right\}  $. Any two symbols
can be used instead:%
\begin{align*}
\left(  i-j\right)  _{1\leq i\leq2,\ 1\leq j\leq3}  &  =\left(  x-y\right)
_{1\leq x\leq2,\ 1\leq y\leq3}=\left(  a-b\right)  _{1\leq a\leq2,\ 1\leq
b\leq3}\\
&  =\left(  j-i\right)  _{1\leq j\leq2,\ 1\leq i\leq3}.
\end{align*}
The fact that $j$ is before $i$ in the subscript of "$\left(  j-i\right)
_{1\leq j\leq2,\ 1\leq i\leq3}$" tells us that $j$ indexes the rows and $i$
the columns, so this is not the same as $\left(  j-i\right)  _{1\leq
i\leq2,\ 1\leq j\leq3}$.

One simple observation:

\begin{proposition}
If $A$ is any $n\times m$-matrix, then%
\[
\left(  A_{i,j}\right)  _{1\leq i\leq n,\ 1\leq j\leq m}=A.
\]

\end{proposition}

\subsection{Row and column vectors}

This section follows \cite[\S 2.3]{lina}.

\begin{definition}
Let $n\in\mathbb{N}$.

A \textbf{row vector of size }$n$ means a $1\times n$-matrix.

A \textbf{column vector of size }$n$ means an $n\times1$-matrix.
\end{definition}

For example, $\left(
\begin{array}
[c]{cc}%
a & b
\end{array}
\right)  $ is a row vector of size $2$, while $\left(
\begin{array}
[c]{c}%
a\\
b
\end{array}
\right)  $ is a column vector of size $2$.

The $j$\textit{-th entry} of a row vector $A$ is $A_{1,j}$.

The $j$\textit{-th entry} of a column vector $A$ is $A_{j,1}$.

\begin{definition}
Let $n\in\mathbb{N}$. We let $\mathbb{R}^{n}$ denote the set of all column
vectors of size $n$ (with real entries).
\end{definition}

\subsection{Transposes}

This section follows \cite[\S 2.4]{lina}.

\begin{definition}
The \textbf{transpose} of an $n\times m$-matrix $A$ is defined to be the
$m\times n$-matrix $\left(  A_{j,i}\right)  _{1\leq i\leq m,\ 1\leq j\leq n}$.
It is denoted by $A^{T}$.
\end{definition}

For example,%
\begin{align*}
\left(
\begin{array}
[c]{ccc}%
a & b & c\\
a^{\prime} & b^{\prime} & c^{\prime}%
\end{array}
\right)  ^{T}  &  =\left(
\begin{array}
[c]{cc}%
a & a^{\prime}\\
b & b^{\prime}\\
c & c^{\prime}%
\end{array}
\right)  ;\\
\left(
\begin{array}
[c]{c}%
a\\
b\\
c
\end{array}
\right)  ^{T}  &  =\left(
\begin{array}
[c]{ccc}%
a & b & c
\end{array}
\right)  ;\\
\left(
\begin{array}
[c]{ccc}%
a & b & c
\end{array}
\right)  ^{T}  &  =\left(
\begin{array}
[c]{c}%
a\\
b\\
c
\end{array}
\right)  .
\end{align*}


This allows us to use transposes as space-saving devices: Instead of writing
$\left(
\begin{array}
[c]{c}%
a\\
b\\
c
\end{array}
\right)  $, you can just write $\left(
\begin{array}
[c]{ccc}%
a & b & c
\end{array}
\right)  ^{T}$.

\begin{proposition}
Let $n,m\in\mathbb{N}$. Let $A$ be an $n\times m$-matrix. Then, $\left(
A^{T}\right)  ^{T}=A$.
\end{proposition}

\subsection{Addition, scaling and multiplication}

This section follows \cite[\S 2.5]{lina}.

\begin{definition}
Let $A$ and $B$ be two matrices of the same dimension (i.e., same number of
rows \& same number of columns). Then, $A+B$ denotes the matrix obtained by
adding $A$ and $B$ entry by entry (i.e., adding each entry of $A$ to the
corresponding entry of $B$).

In formulas: If $A$ and $B$ are two $n\times m$-matrices, then%
\[
A+B=\left(  A_{i,j}+B_{i,j}\right)  _{1\leq i\leq n,\ 1\leq j\leq m}.
\]

\end{definition}

For example,%
\[
\left(
\begin{array}
[c]{cc}%
a & b\\
c & d
\end{array}
\right)  +\left(
\begin{array}
[c]{cc}%
a^{\prime} & b^{\prime}\\
c^{\prime} & d^{\prime}%
\end{array}
\right)  =\left(
\begin{array}
[c]{cc}%
a+a^{\prime} & b+b^{\prime}\\
c+c^{\prime} & d+d^{\prime}%
\end{array}
\right)  .
\]


\begin{definition}
Let $A$ be a matrix. Let $\lambda$ be a number. Then, $\lambda A$ denotes the
matrix obtained by multiplying each entry of $A$ by $\lambda$.

In formulas: If $A$ is an $n\times m$-matrix and $\lambda$ is a number, then%
\[
\lambda A=\left(  \lambda A_{i,j}\right)  _{1\leq i\leq n,\ 1\leq j\leq m}.
\]

\end{definition}

For example,%
\[
\lambda\left(
\begin{array}
[c]{cc}%
a & b\\
c & d
\end{array}
\right)  =\left(
\begin{array}
[c]{cc}%
\lambda a & \lambda b\\
\lambda c & \lambda d
\end{array}
\right)  .
\]


The operation of computing $\lambda A$ from $A$ is called \textbf{scaling} the
matrix $A$ by $\lambda$.

\begin{definition}
Let $A$ and $B$ be two matrices of the same dimensions. Then, $A-B$ denotes
the matrix $A+\left(  -1\right)  B$.
\end{definition}

For example,%
\[
\left(
\begin{array}
[c]{cc}%
a & b\\
c & d
\end{array}
\right)  -\left(
\begin{array}
[c]{cc}%
a^{\prime} & b^{\prime}\\
c^{\prime} & d^{\prime}%
\end{array}
\right)  =\left(
\begin{array}
[c]{cc}%
a-a^{\prime} & b-b^{\prime}\\
c-c^{\prime} & d-d^{\prime}%
\end{array}
\right)  .
\]


\begin{definition}
Let $n,m,p\in\mathbb{N}$. Let $A$ be an $n\times m$-matrix. Let $B$ be an
$m\times p$-matrix. Then, the product $AB$ of these two matrices is defined as
follows:%
\[
AB=\left(  A_{i,1}B_{1,j}+A_{i,2}B_{2,j}+\cdots+A_{i,m}B_{m,j}\right)  _{1\leq
i\leq n,\ 1\leq j\leq p}.
\]
This is an $n\times p$-matrix.
\end{definition}

Examples:%
\begin{align*}
\left(
\begin{array}
[c]{cc}%
a & b\\
a^{\prime} & b^{\prime}%
\end{array}
\right)  \left(
\begin{array}
[c]{cc}%
x & x^{\prime}\\
y & y^{\prime}%
\end{array}
\right)   &  =\left(
\begin{array}
[c]{cc}%
ax+by & ax^{\prime}+by^{\prime}\\
a^{\prime}x+b^{\prime}y & a^{\prime}x^{\prime}+b^{\prime}y^{\prime}%
\end{array}
\right)  ;\\
\left(
\begin{array}
[c]{ccc}%
a & b & c\\
a^{\prime} & b^{\prime} & c^{\prime}%
\end{array}
\right)  \left(
\begin{array}
[c]{c}%
x\\
y\\
z
\end{array}
\right)   &  =\left(
\begin{array}
[c]{c}%
ax+by+cz\\
a^{\prime}x+b^{\prime}y+c^{\prime}z
\end{array}
\right)  ;\\
\left(
\begin{array}
[c]{cc}%
a & b
\end{array}
\right)  \left(
\begin{array}
[c]{c}%
x\\
y
\end{array}
\right)   &  =\left(
\begin{array}
[c]{c}%
ax+by
\end{array}
\right)  ;\\
\left(
\begin{array}
[c]{c}%
a\\
b
\end{array}
\right)  \left(
\begin{array}
[c]{cc}%
x & y
\end{array}
\right)   &  =\left(
\begin{array}
[c]{cc}%
ax & ay\\
bx & by
\end{array}
\right)  ;\\
\left(
\begin{array}
[c]{ccc}%
a & b & c\\
a^{\prime} & b^{\prime} & c^{\prime}%
\end{array}
\right)  \left(
\begin{array}
[c]{c}%
x\\
y
\end{array}
\right)   &  =\text{undefined.}%
\end{align*}


Examples:%
\begin{align*}
\left(
\begin{array}
[c]{ccc}%
1 & 1 & 1\\
0 & 1 & 1\\
0 & 0 & 1
\end{array}
\right)  \left(
\begin{array}
[c]{ccc}%
1 & 1 & 1\\
0 & 1 & 1\\
0 & 0 & 1
\end{array}
\right)   &  =\left(
\begin{array}
[c]{ccc}%
1 & 2 & 3\\
0 & 1 & 2\\
0 & 0 & 1
\end{array}
\right)  ;\\
\left(
\begin{array}
[c]{cccc}%
1 & 1 & 1 & 1\\
0 & 1 & 1 & 1\\
0 & 0 & 1 & 1\\
0 & 0 & 0 & 1
\end{array}
\right)  \left(
\begin{array}
[c]{cccc}%
1 & 1 & 1 & 1\\
0 & 1 & 1 & 1\\
0 & 0 & 1 & 1\\
0 & 0 & 0 & 1
\end{array}
\right)   &  =\left(
\begin{array}
[c]{cccc}%
1 & 2 & 3 & 4\\
0 & 1 & 2 & 3\\
0 & 0 & 1 & 2\\
0 & 0 & 0 & 1
\end{array}
\right)  .
\end{align*}


Examples:%
\begin{align*}
\left(
\begin{array}
[c]{ccc}%
a & b & c\\
a^{\prime} & b^{\prime} & c^{\prime}\\
a^{\prime\prime} & b^{\prime\prime} & c^{\prime\prime}%
\end{array}
\right)  \left(
\begin{array}
[c]{ccc}%
1 & 1 & 1\\
1 & 1 & 1\\
1 & 1 & 1
\end{array}
\right)   &  =\left(
\begin{array}
[c]{ccc}%
a+b+c & a+b+c & a+b+c\\
a^{\prime}+b^{\prime}+c^{\prime} & a^{\prime}+b^{\prime}+c^{\prime} &
a^{\prime}+b^{\prime}+c^{\prime}\\
a^{\prime\prime}+b^{\prime\prime}+c^{\prime\prime} & a^{\prime\prime
}+b^{\prime\prime}+c^{\prime\prime} & a^{\prime\prime}+b^{\prime\prime
}+c^{\prime\prime}%
\end{array}
\right)  ;\\
\left(
\begin{array}
[c]{ccc}%
a & b & c\\
a^{\prime} & b^{\prime} & c^{\prime}\\
a^{\prime\prime} & b^{\prime\prime} & c^{\prime\prime}%
\end{array}
\right)  \left(
\begin{array}
[c]{c}%
1\\
1\\
1
\end{array}
\right)   &  =\left(
\begin{array}
[c]{c}%
a+b+c\\
a^{\prime}+b^{\prime}+c^{\prime}\\
a^{\prime\prime}+b^{\prime\prime}+c^{\prime\prime}%
\end{array}
\right)  ;\\
\left(
\begin{array}
[c]{ccc}%
1 & 1 & 1
\end{array}
\right)  \left(
\begin{array}
[c]{ccc}%
a & b & c\\
a^{\prime} & b^{\prime} & c^{\prime}\\
a^{\prime\prime} & b^{\prime\prime} & c^{\prime\prime}%
\end{array}
\right)   &  =\left(
\begin{array}
[c]{ccc}%
a+a^{\prime}+a^{\prime\prime} & b+b^{\prime}+b^{\prime\prime} & c+c^{\prime
}+c^{\prime\prime}%
\end{array}
\right)  .
\end{align*}


\subsection{The matrix product rewritten}

This section follows \cite[\S 2.6]{lina}.

\begin{definition}
Let $A$ be an $n\times m$-matrix.

\textbf{(a)} If $i\in\left\{  1,2,\ldots,n\right\}  $, then
$\operatorname*{row}\nolimits_{i}A$ will mean the $i$-th row of $A$. This is a
row vector of size $m$ (that is, a $1\times m$-matrix), and is formally
defined as%
\[
\left(  A_{i,y}\right)  _{1\leq x\leq1,\ 1\leq y\leq m}=\left(
\begin{array}
[c]{cccc}%
A_{i,1} & A_{i,2} & \cdots & A_{i,m}%
\end{array}
\right)  .
\]


\textbf{(b)} If $j\in\left\{  1,2,\ldots,m\right\}  $, then
$\operatorname*{col}\nolimits_{j}A$ will mean the $j$-th column of $A$. This
is a column vector of size $n$ (that is an $n\times1$-matrix), and is formally
defined as%
\[
\left(  A_{x,j}\right)  _{1\leq x\leq n,\ 1\leq y\leq1}=\left(
\begin{array}
[c]{c}%
A_{1,j}\\
A_{2,j}\\
\vdots\\
A_{n,j}%
\end{array}
\right)  .
\]

\end{definition}

For example: If $A=\left(
\begin{array}
[c]{ccc}%
a & b & c\\
d & e & f
\end{array}
\right)  $, then $\operatorname*{row}\nolimits_{2}A=\left(
\begin{array}
[c]{ccc}%
d & e & f
\end{array}
\right)  $ and $\operatorname*{col}\nolimits_{2}A=\left(
\begin{array}
[c]{c}%
b\\
e
\end{array}
\right)  $.

Notice how the product of two matrices looks like if the first matrix is a row
vector and the second is a column vector:%
\[
\left(
\begin{array}
[c]{cccc}%
r_{1} & r_{2} & \cdots & r_{m}%
\end{array}
\right)  \left(
\begin{array}
[c]{c}%
c_{1}\\
c_{2}\\
\vdots\\
c_{m}%
\end{array}
\right)  =\left(
\begin{array}
[c]{c}%
r_{1}c_{1}+r_{2}c_{2}+\cdots+r_{m}c_{m}%
\end{array}
\right)  .
\]
We shall equate $1\times1$-matrices with their unique entries, so this becomes%
\[
\left(
\begin{array}
[c]{cccc}%
r_{1} & r_{2} & \cdots & r_{m}%
\end{array}
\right)  \left(
\begin{array}
[c]{c}%
c_{1}\\
c_{2}\\
\vdots\\
c_{m}%
\end{array}
\right)  =r_{1}c_{1}+r_{2}c_{2}+\cdots+r_{m}c_{m}.
\]


Now, a collection of formulas for the product of two matrices
(\cite[Proposition 2.19]{lina}). Note that these formulas are all essentially
saying the same thing, but from different points of view, and that's useful.

\begin{proposition}
Let $n,m,p\in\mathbb{N}$. Let $A$ be an $n\times m$-matrix, and $B$ be an
$m\times p$-matrix.

\textbf{(a)} For every $i\in\left\{  1,2,\ldots,n\right\}  $ and $j\in\left\{
1,2,\ldots,p\right\}  $, we have%
\[
\left(  AB\right)  _{i,j}=A_{i,1}B_{1,j}+A_{i,2}B_{2,j}+\cdots+A_{i,m}%
B_{m,j}.
\]


\textbf{(b)} For every $i\in\left\{  1,2,\ldots,n\right\}  $ and $j\in\left\{
1,2,\ldots,p\right\}  $, we have%
\[
\left(  AB\right)  _{i,j}=\operatorname*{row}\nolimits_{i}A\cdot
\operatorname*{col}\nolimits_{j}B\ \ \ \ \ \ \ \ \ \ \left(  \text{this means
}\left(  \operatorname*{row}\nolimits_{i}A\right)  \cdot\left(
\operatorname*{col}\nolimits_{j}B\right)  \right)  .
\]
Thus,%
\[
AB=\left(
\begin{array}
[c]{cccc}%
\operatorname*{row}\nolimits_{1}A\cdot\operatorname{col}_{1}B &
\operatorname{row}_{1}A\cdot\operatorname{col}_{2}B & \cdots &
\operatorname{row}_{1}A\cdot\operatorname{col}_{p}B\\
\operatorname{row}_{2}A\cdot\operatorname{col}_{1}B & \operatorname{row}%
_{2}A\cdot\operatorname{col}_{2}B & \cdots & \operatorname{row}_{2}%
A\cdot\operatorname{col}_{p}B\\
\vdots & \vdots & \ddots & \vdots\\
\operatorname{row}_{n}A\cdot\operatorname{col}_{1}B & \operatorname{row}%
_{n}A\cdot\operatorname{col}_{2}B & \cdots & \operatorname{row}_{n}%
A\cdot\operatorname{col}_{p}B
\end{array}
\right)  .
\]


\textbf{(c)} For every $i\in\left\{  1,2,\ldots,n\right\}  $, we have%
\[
\operatorname{row}_{i}\left(  AB\right)  =\left(  \operatorname{row}%
_{i}A\right)  \cdot B.
\]


\textbf{(d)} For every $j\in\left\{  1,2,\ldots,p\right\}  $, we have
\[
\operatorname{col}_{j}\left(  AB\right)  =A\cdot\operatorname{col}_{j}B.
\]

\end{proposition}

Let us illustrate part \textbf{(d)} on an example (with $n=2$, $m=2$, $p=2$,
$A=\left(
\begin{array}
[c]{cc}%
a & b\\
a^{\prime} & b^{\prime}%
\end{array}
\right)  $ and $B=\left(
\begin{array}
[c]{cc}%
x & x^{\prime}\\
y & y^{\prime}%
\end{array}
\right)  $):
\begin{align*}
\underbrace{\left(
\begin{array}
[c]{cc}%
a & b\\
a^{\prime} & b^{\prime}%
\end{array}
\right)  }_{A}\underbrace{\left(
\begin{array}
[c]{cc}%
x & x^{\prime}\\
y & y^{\prime}%
\end{array}
\right)  }_{B}  &  =\underbrace{\left(
\begin{array}
[c]{cc}%
ax+by & ax^{\prime}+by^{\prime}\\
a^{\prime}x+b^{\prime}y & a^{\prime}x^{\prime}+b^{\prime}y^{\prime}%
\end{array}
\right)  }_{AB};\\
\underbrace{\left(
\begin{array}
[c]{c}%
ax^{\prime}+by^{\prime}\\
a^{\prime}x^{\prime}+b^{\prime}y^{\prime}%
\end{array}
\right)  }_{\operatorname{col}_{j}\left(  AB\right)  }  &
=\underbrace{\left(
\begin{array}
[c]{cc}%
a & b\\
a^{\prime} & b^{\prime}%
\end{array}
\right)  }_{=A}\underbrace{\left(
\begin{array}
[c]{c}%
x^{\prime}\\
y^{\prime}%
\end{array}
\right)  }_{\operatorname{col}_{j}B}.
\end{align*}


\subsection{Properties of matrix operations}

This section follows \cite[\S 2.7 and \S 2.8]{lina}.

Addition, scaling and multiplication of matrices has the following properties
(\cite[Proposition 2.20]{lina}):

\begin{proposition}
\label{prop.rules-add-mul-scal}Let $n,m\in\mathbb{N}$.

\textbf{(a)} We have $A+B=B+A$ for any two $n\times m$-matrices $A$ and $B$.

\textbf{(b)} We have $A+\left(  B+C\right)  =\left(  A+B\right)  +C$ for any
three $n\times m$-matrices $A$, $B$ and $C$.

\textbf{(c}$_{1}$\textbf{)} We have $\lambda\left(  A+B\right)  =\lambda
A+\lambda B$ for any number $\lambda$ and any two $n\times m$-matrices $A$ and
$B$.

\textbf{(c}$_{2}$\textbf{)} We have $\left(  \lambda+\mu\right)  A=\lambda
A+\mu A$ for any numbers $\lambda$ and $\mu$ and any $n\times m$-matrix $A$.

\textbf{(c}$_{3}$\textbf{)} We have $1A=A$ for any $n\times m$-matrix $A$.

Furthermore, let $p\in\mathbb{N}$.

\textbf{(d)} We have $A\left(  B+C\right)  =AB+AC$ whenever $A$ is an $n\times
m$-matrix and $B$ and $C$ are two $m\times p$-matrices.

\textbf{(e)} We have $\left(  A+B\right)  C=AC+BC$ whenever $A$ and $B$ are
two $n\times m$-matrices and $C$ is an $m\times p$-matrix.

\textbf{(f)} We have $\lambda\left(  AB\right)  =\left(  \lambda A\right)
B=A\left(  \lambda B\right)  $ whenever $\lambda$ is a number and $A$ is an
$n\times m$-matrix and $B$ is an $m\times p$-matrix.

Finally, let $q\in\mathbb{N}$.

\textbf{(g)} We have $\left(  AB\right)  C=A\left(  BC\right)  $ whenever $A$
is an $n\times m$-matrix, $B$ is an $m\times p$-matrix and $C$ is a $p\times
q$-matrix.
\end{proposition}

Here is an example for Proposition \ref{prop.rules-add-mul-scal} \textbf{(g)}:

\begin{example}
Let $n=1$ and $m=3$ and $p=3$ and $q=1$, and let%
\[
A=\left(
\begin{array}
[c]{ccc}%
1 & 1 & 1
\end{array}
\right)  \ \ \ \ \ \ \ \ \ \ \text{and}\ \ \ \ \ \ \ \ \ \ B=\left(
\begin{array}
[c]{ccc}%
a & b & c\\
a^{\prime} & b^{\prime} & c^{\prime}\\
a^{\prime\prime} & b^{\prime\prime} & c^{\prime\prime}%
\end{array}
\right)  \ \ \ \ \ \ \ \ \ \ \text{and}\ \ \ \ \ \ \ \ \ \ C=\left(
\begin{array}
[c]{c}%
1\\
1\\
1
\end{array}
\right)  .
\]
Then,%
\begin{align*}
BC  &  =\left(
\begin{array}
[c]{ccc}%
a & b & c\\
a^{\prime} & b^{\prime} & c^{\prime}\\
a^{\prime\prime} & b^{\prime\prime} & c^{\prime\prime}%
\end{array}
\right)  \left(
\begin{array}
[c]{c}%
1\\
1\\
1
\end{array}
\right)  =\left(
\begin{array}
[c]{c}%
a+b+c\\
a^{\prime}+b^{\prime}+c^{\prime}\\
a^{\prime\prime}+b^{\prime\prime}+c^{\prime\prime}%
\end{array}
\right)  ;\\
AB  &  =\left(
\begin{array}
[c]{ccc}%
1 & 1 & 1
\end{array}
\right)  \left(
\begin{array}
[c]{ccc}%
a & b & c\\
a^{\prime} & b^{\prime} & c^{\prime}\\
a^{\prime\prime} & b^{\prime\prime} & c^{\prime\prime}%
\end{array}
\right)  =\left(
\begin{array}
[c]{ccc}%
a+a^{\prime}+a^{\prime\prime} & b+b^{\prime}+b^{\prime\prime} & c+c^{\prime
}+c^{\prime\prime}%
\end{array}
\right)  .
\end{align*}
Now,%
\begin{align*}
A\left(  BC\right)   &  =\left(
\begin{array}
[c]{ccc}%
1 & 1 & 1
\end{array}
\right)  \left(
\begin{array}
[c]{c}%
a+b+c\\
a^{\prime}+b^{\prime}+c^{\prime}\\
a^{\prime\prime}+b^{\prime\prime}+c^{\prime\prime}%
\end{array}
\right) \\
&  =\left(  a+b+c\right)  +\left(  a^{\prime}+b^{\prime}+c^{\prime}\right)
+\left(  a^{\prime\prime}+b^{\prime\prime}+c^{\prime\prime}\right)
\end{align*}
and%
\begin{align*}
\left(  AB\right)  C  &  =\left(
\begin{array}
[c]{ccc}%
a+a^{\prime}+a^{\prime\prime} & b+b^{\prime}+b^{\prime\prime} & c+c^{\prime
}+c^{\prime\prime}%
\end{array}
\right)  \left(
\begin{array}
[c]{c}%
1\\
1\\
1
\end{array}
\right) \\
&  =\left(  a+a^{\prime}+a^{\prime\prime}\right)  +\left(  b+b^{\prime
}+b^{\prime\prime}\right)  +\left(  c+c^{\prime}+c^{\prime\prime}\right)  ,
\end{align*}
and these are the same number (namely, the sum of all entries of $B$).
\end{example}

Proposition \ref{prop.rules-add-mul-scal} \textbf{(g)} is called
\textit{associativity of matrix multiplication} and shows that a product $ABC$
of three matrices is unambiguous (i.e., the result does not depend on whether
we interpret it as $\left(  AB\right)  C$ or as $A\left(  BC\right)  $).

The same holds for products of four matrices:%
\[
\left(  \left(  AB\right)  C\right)  D=\left(  A\left(  BC\right)  \right)
D=A\left(  \left(  BC\right)  D\right)  =\left(  AB\right)  \left(  CD\right)
=A\left(  B\left(  CD\right)  \right)  .
\]
So we can write $ABCD$ without worrying about ambiguity.

More generally:

\begin{proposition}
Let $A_{1},A_{2},\ldots,A_{n}$ be $n$ matrices such that all the $n-1$
products $A_{i}A_{i+1}$ are well-defined (i.e., the number of columns of
$A_{i}$ equals the number of rows of $A_{i+1}$).

Then, the product $A_{1}A_{2}\cdots A_{n}$ is unambiguous (i.e., the result
does not depend on where you start multiplying it out).
\end{proposition}

Something similar holds for sums: $A_{1}+A_{2}+\cdots+A_{n}$ is unambiguous
whenever $A_{1},A_{2},\ldots,A_{n}$ are matrices of the same dimensions.

\textbf{However:} Products of matrices \textbf{cannot} be reordered at will!
(unlike products of numbers). In other words, matrix multiplication is
\textbf{not commutative}. More precisely, if $A$ and $B$ are two matrices, it
can happen that

\begin{itemize}
\item $AB$ is defined but $BA$ is not;

\item $AB$ and $BA$ are both defined but not equal.
\end{itemize}

For example, if $A=\left(
\begin{array}
[c]{cc}%
0 & 1\\
0 & 0
\end{array}
\right)  $ and $B=\left(
\begin{array}
[c]{cc}%
0 & 0\\
1 & 0
\end{array}
\right)  $, then $AB=\left(
\begin{array}
[c]{cc}%
1 & 0\\
0 & 0
\end{array}
\right)  $ and $BA=\left(
\begin{array}
[c]{cc}%
0 & 0\\
0 & 1
\end{array}
\right)  $, so $AB\neq BA$.

\begin{thebibliography}{9999999999}                                                                                       %


\bibitem[lina]{lina}Darij Grinberg, \textit{Notes on linear algebra}, version
of 13 December 2016.\newline\url{https://github.com/darijgr/lina}

\bibitem[Strickland]{Strickland}Neil Strickland, \textit{Linear Algebra for
Applications - MAS201}, lecture notes, version with edits by myself.\newline%
\url{http://www.cip.ifi.lmu.de/~grinberg/t/19fla/MAS201.pdf}\newline See also
Neil Strickland's course page
\url{https://neil-strickland.staff.shef.ac.uk/courses/MAS201/} for exercises
with solutions.
\end{thebibliography}


\end{document}