Added linear maps handout

This commit is contained in:
Mark 2023-03-26 20:00:14 -07:00
parent 0d340f2285
commit 55bbc39666
5 changed files with 429 additions and 0 deletions

50
Advanced/Linear Maps/main.tex Executable file
View File

@ -0,0 +1,50 @@
% use [nosolutions] flag to hide solutions.
% use [solutions] flag to show solutions.
\documentclass[
solutions,
singlenumbering
]{../../resources/ormc_handout}
\usepackage{tikz}
\usetikzlibrary{
matrix,
decorations.pathreplacing,
calc,
positioning,
fit
}
%\usepackage{lua-visual-debug}
\renewcommand{\arraystretch}{1.2}
\begin{document}
\maketitle
<Advanced 2>
<Spring 2023>
{Linear Maps}
{
Prepared by Mark on \today \\
}
\section{Fields and Vector Spaces}
\input{parts/0 fields}
\input{parts/1 spaces}
\input{parts/2 linearity}
\input{parts/3 matrices}
\section{Bonus}
\problem{}
Is the set of all linear maps a vector space?
\vfill
\definition{}
Show that $\mathbb{P}^n$, the set of polynomials of degree $n$, is a vector space.
\vfill
\end{document}

View File

@ -0,0 +1,47 @@
\definition{Fields and Field Axioms}
A \textit{field} $\mathbb{F}$ consists of a set $A$ and two operations $+$ and $\times$. \\
As usual, we may abbreviate $a \times b$ as $ab$. \\
The following axioms must be satisfied for any $a, b, c \in \mathbb{F}$:
\vspace{1mm}
\begin{center}
% @{} supresses the space between columns.
% @{=} makes = a column seperator.
\begin{tabular}{l | r@{=}l | r@{=}l}
\hline
\multicolumn{1}{|c|}{Name} &
\multicolumn{2}{c}{$+$} &
\multicolumn{2}{|c|}{$\times$} \\
\hline
Closure & \multicolumn{2}{c|}{$a+b \in \mathbb{F}$} & \multicolumn{2}{c}{$ab \in \mathbb{F}$} \\
Associativity & $(a+b)+c~$&$~a+b+c$ & $(ab)c~$&$~a(bc)$ \\
Commutativity & $a+b~$&$~b+a$ & $ab~$&$~ba$ \\
Distributivity & $a(b+c)~$&$~ab + ac$ & \multicolumn{2}{}{} \\
Identity & $a+0~$&$~a$ & $1 \times a~$&$~a$ \\
Inverses & $a + (-a)~$&$~0$ & $a \times a^{-1}~$&$~1$
\end{tabular}
\end{center}
\problem{}
Show that all fields are groups. \\
Convince yourself that not all groups are fields.
\vfill
\problem{}
Is $\mathbb{Z}$ a field under our usual definitions of $+$ and $\times$? \\
Which axioms does it satisfy, and which does it violate?
\vfill
\problem{}
Verify that $\mathbb{R}$ is a field.
\vfill
\generic{Remark:}
We won't worry too much about fields this week. They simply provide a foundation for \textit{spaces}. \\
As such, you may assume that we are working in $\mathbb{R}$ for the rest of this handout.
\pagebreak

View File

@ -0,0 +1,92 @@
\definition{Vector Spaces}
A \textit{space} over a field $\mathbb{F}$ consists of the following elements:
\begin{itemize}[itemsep = 2mm]
\item A set $V$, the elements of which are called \textit{vectors}
\item An operation called \textit{vector addition}, denoted $+$ \\
Vector addition operates on two elements of $V$. \\
\item An operation called \textit{scalar multilplication}, denoted $\times$ \\
Scalar multiplication multiplies an element of $V$ by an element of $\mathbb{F}$. \\
Any element of $\mathbb{F}$ is called a \textit{scalar}.
\end{itemize}
\vspace{2mm}
\textbf{Note:}
The same symbols are used for additions and multiplications in both $\mathbb{F}$ and $V$. \\
Be careful, since \textit{these are different operations!} \\
Make sure you're aware of the context of each $+$ and $\times$ as you work through this handout.
\vspace{5mm}
Vector addition and multiplication must have the following properties. \\
Note that $x, y, z \in V$ and $a, b\in \mathbb{F}$.
\vspace{2mm}
% [t] and \vspace{0pt} ensure alignment at top
\begin{minipage}[t]{0.48\textwidth}\vspace{0pt}
\begin{center}
\begin{tabular}{l | r@{=}l }
\hline
\multicolumn{3}{|c|}{Properties of vector addition} \\
\hline
Closure & \multicolumn{2}{c}{$x+y \in V$} \\
Associativity & $(x+y)+z~$&$~x+y+z$ \\
Commutativity & $x+y~$&$~y+x$ \\
Distributivity & $x(y+z)~$&$~xy + xz$ \\
Identity & $x+0~$&$~x$ \\
Inverse & $x + (-x)~$&$~0$
\end{tabular}
\end{center}
\end{minipage}%
\hfill%
\begin{minipage}[t]{0.48\textwidth}\vspace{0pt}
\begin{center}
\begin{tabular}{l | r@{=}l }
\hline
\multicolumn{3}{|c|}{Properties of vector multiplication} \\
\hline
Closure & \multicolumn{2}{c}{$ax \in V$} \\
Distributivity & $a(x+y)~$&$~ax+ay$ \\
& $(a+b)x~$&$~ax+bx$ \\
Compatibility$^*$ & $(ab)x~$&$~x(ba)$ \\
Identity & $a+0~$&$~a$
\end{tabular}
\end{center}
\end{minipage}
\vspace{5mm}
\definition{}
There is a good chance you are familiar with basic vector arithmetic. \\
Here's a quick review:
\begin{itemize}
\item Scalar multiplication is done elementwise: $3 \times [a, b, c] = [3a, 3b, 3c]$.
\item Vector addition is similar: $[a, b, c] + [1, 2, 3] = [a+1,~b+2,~c+3]$.
\item Vector addition is not valid for vectors of different sizes.
\end{itemize}
\definition{}
We usually use the \textit{dot product} as our vector product. It is defined as follows. \\
Given two vectors $a, b \in \mathbb{R}^n$, the dot product $a \cdot b$ is $\sum_1^n a_ib_i$.
\vspace{2mm}
In other words, if $a = [1, 2, 3]$ and $b = [4, 5, 6]$,
$$
a \cdot b = (1 \times 4) + (2 \times 5) + (3 \times 6) = 32
$$
As you may expect, the dot product $ab$ is valid iff $a$ and $b$ are the same size.
\problem{}
Show that the dot product satisfies the properties of a vector product listed above. \\
Conclude that $\mathbb{R}^n$ is a vector space over $\mathbb{R}$.
\vfill
\pagebreak

View File

@ -0,0 +1,42 @@
\section{Linearity}
\definition{}
A \textit{function} or \textit{map} $f$ from a set $A$ to a set $B$ is a rule that assigns an element of $B$ to each element of $A$. We write this as $f: A \to B$.
\definition{This one is worth remembering}
Let $V$ and $U$ be vector spaces, and let $f: V \to U$ be a map from $V$ to $U$. \\
We say $f$ is \textit{linear} if it satisfies the following for any $v \in V$, $u \in U$, $a \in \mathbb{R}$:
\begin{itemize}
\item $f(u + v) = f(u) + f(v)$
\item $f(au) = af(u)$
\end{itemize}
In other words, $f$ is linear if it is \say{closed} under addition and scalar multiplication.
\problem{}
It is often convenient to combine the two conditions above into one. \\
Show that $f(au + v) = af(u) + f(v)$ iff $f$ is linear.
\vfill
\problem{}
Is $f(x) = mx + b$ a linear map on $\mathbb{R}$?
\vfill
\problem{}
In general, what does a linear map in $\mathbb{R}^n$ look like?
\vfill
\problem{}
Is $\text{median}(v): \mathbb{R}^n \to \mathbb{R}$ a linear map on $\mathbb{R}^n$?
\vfill
\problem{}
Is $\frac{d}{dx}(p): \mathbb{P}^n \to \mathbb{P}^{n-1}$ a linear map on $\mathbb{P}^n$?
\vfill
\pagebreak

View File

@ -0,0 +1,198 @@
\section{Matrices}
\definition{}
A \textit{matrix} is a two-dimensional array of numbers: \\
$$
A =
\begin{bmatrix}
1 & 2 & 3 \\
4 & 5 & 6
\end{bmatrix}
$$
The above matrix has two rows and three columns. It is thus a $2 \times 3$ matrix.
\problem{}
Draw a $3 \times 2$ matrix.
\vfill
\definition{Matrices as Transformations}
We can define the \say{product\footnotemark{}} of a matrix $A$ and a vector $v$:
\footnotetext{This is an uncommon word to use in this context. You will soon see why.}
$$
Av =
\begin{bmatrix}
1 & 2 & 3 \\
4 & 5 & 6
\end{bmatrix}
\begin{bmatrix}
a \\ b \\ c
\end{bmatrix}
=
\begin{bmatrix}
1a + 2b + 3c \\
4a + 5b + 6c
\end{bmatrix}
$$
Look closely. Each element of the resulting $2 \times 1$ matrix is the dot product of a row of $A$ with $v$:
$$
Av =
\begin{bmatrix}
\text{---} a_1 \text{---} \\
\text{---} a_2 \text{---}
\end{bmatrix}
\begin{bmatrix}
| \\
v \\
| \\
\end{bmatrix}
=
\begin{bmatrix}
r_1v \\
r_2v
\end{bmatrix}
$$
Naturally, a vector can only be multiplied by a matrix if the number of rows in the vector equals the number of columns in the matrix.
\problem{}
Compute the following \say{product}:
$$
\begin{bmatrix}
2 & 9 \\
7 & 5 \\
3 & 4
\end{bmatrix}
\begin{bmatrix}
5 \\ 3
\end{bmatrix}
$$
\vfill
\pagebreak
\generic{Remark:}
It is a bit more interesting to think of matrix-vector multiplication in the following way: \\
\begin{minipage}[t]{0.48\textwidth}\vspace{0pt}
\begin{center}
The problem:
\vspace{2mm}
$$
\begin{bmatrix}
2 & 9 \\
7 & 5 \\
3 & 4
\end{bmatrix}
\begin{bmatrix}
5 \\ 3
\end{bmatrix}
=
\begin{bmatrix}
37 \\ 50 \\ 27
\end{bmatrix}
$$
\end{center}
\end{minipage}%
\hfill
\begin{minipage}[t]{0.48\textwidth}\vspace{0pt}
\begin{center}
Top-input, right-output:
\vspace{2mm}
\begin{tikzpicture}[>=stealth,thick,baseline]
\matrix [
matrix of math nodes,
left delimiter={[},
right delimiter={]}
] (A) {
2 & 9 \\
7 & 5 \\
3 & 4 \\
};
\node[
fit=(A-1-1)(A-1-1),
inner xsep=0mm,inner ysep=3mm,
label=above:5
] (L) {};
\draw[->, gray] (L.north) -- ([yshift=0mm]A-1-1.north);
\node[
fit=(A-1-2)(A-1-2),
inner xsep=0mm,inner ysep=3mm,
label=above:3
] (R) {};
\draw[->, gray] (R.north) -- ([yshift=0mm]A-1-2.north);
\node[
fit=(A-1-2)(A-1-2),
inner xsep=8mm,inner ysep=0mm,
label=right:{$10 + 27 = 37$}
](Y) {};
\draw[->, gray] ([xshift=3mm]A-1-2.east) -- (Y);
\node[
fit=(A-2-2)(A-2-2),
inner xsep=8mm,inner ysep=0mm,
label=right:{$35 + 15 = 50$}
](H) {};
\draw[->, gray] ([xshift=3mm]A-2-2.east) -- (H);
\node[
fit=(A-3-2)(A-3-2),
inner xsep=8mm,inner ysep=0mm,
label=right:{$15 + 12 = 27$}
](N) {};
\draw[->, gray] ([xshift=3mm]A-3-2.east) -- (N);
\end{tikzpicture}
\end{center}
\end{minipage}%
\vspace{2mm}
Be aware that this is only a model for intuition. \\
Make sure you understand the dot product definition on the previous page.
\vspace{5mm}
\theorem{}<thebigtheorem>
Any linear map $T: \mathbb{R}^n \to \mathbb{R}^m$ can be written as an $n \times m$ matrix. \\
Conversely, every $n \times m$ matrix represents a liner map $T: \mathbb{R}^n \to \mathbb{R}^m$ \\
\vspace{2mm}
In other words, \textbf{matrices are linear transformations}. \\
If you only learn only one thing today, this should be it.
\vfill
\problem{}<prooffwd>
Show that the transformation $T: \mathbb{R}^n \to \mathbb{R}^m$ defined by $T(v) = Av$ is linear. \\
Before you start, answer the following questions:
\begin{itemize}
\item What is $A$?
\item What is $v$?
\item What are their sizes?
\end{itemize}
\vfill
\problem{}<proofback>
Show that any linear transformation can be written as a matrix.
\vfill
\pagebreak
\problem{}
Does \ref{thebigtheorem} hold in arbitrary vector spaces? \\
Repeat \ref{prooffwd} and \ref{proofback} using only axioms.
\vfill
\pagebreak