121 lines
3.3 KiB
TeX
Executable File
121 lines
3.3 KiB
TeX
Executable File
\section{Review: Functions}
|
|
|
|
\definition{}
|
|
A \textit{function} or \textit{map} $f$ from a set $A$ (the \textit{domain}, $\mathcal{D}$) to a set $B$ (the \textit{range}, $\mathcal{R}$) is a rule that assigns each element of $A$ to an element of $B$. We write this as $f: A \to B$.
|
|
|
|
\vspace{2mm}
|
|
|
|
Consider a function $f: \mathbb{Z} \to \mathbb{Z}$. If $f(1) = 2$, we say that 2 is the \textit{image} of 1 and 1 is the \textit{preimage} of 2 under $f$.
|
|
|
|
\vspace{2mm}
|
|
|
|
An element in a function's domain must have exactly one image. However, an element in the range may have more than one preimage.
|
|
|
|
\problem{}
|
|
Consider the function $f: \mathbb{R} \to \mathbb{R}^+$ defined by $f(x) = x^2$
|
|
\begin{itemize}
|
|
\item[-] What is the image of 2?
|
|
\item[-] What are the preimages of 9?
|
|
\end{itemize}
|
|
|
|
\vfill
|
|
|
|
\definition{}
|
|
We say a map is \textit{one-to-one} if $a \neq b \implies f(a) \neq f(b)$. In other words, this means that each element of the range has at most one preimage.
|
|
|
|
\definition{}
|
|
We say a map $f$ is \textit{onto} if, for every $y \in \mathcal{R}$, there exists an $x \in \mathcal{D}$ so that $f(x) = y$. In other words, this means that every $y$ in the range has a preimage in the domain.
|
|
|
|
\problem{}
|
|
Find a function that is...
|
|
\begin{enumerate}
|
|
\item[-] not one-to-one, not onto
|
|
\item[-] one-to-one and not onto
|
|
\item[-] not one-to-one, but onto
|
|
\item[-] both one-to-one and onto
|
|
\end{enumerate}
|
|
We say a function that is both one-to-one and onto is \textit{bijective}.
|
|
|
|
\vfill
|
|
\pagebreak
|
|
|
|
\definition{}
|
|
Let $f: A \to B$ and $g: B \to C$. We can define a new function $(g \circ f): A \to C$, where $(g \circ f)(a) = g(f(a))$. This is called \textit{composition}.
|
|
|
|
\problem{}
|
|
Suppose $f: A \to B$ and $g: B \to C$ are both one-to-one. Must $(g \circ f)$ be one-to-one? Provide a proof or a counterexample.
|
|
|
|
\vfill
|
|
|
|
\problem{}
|
|
Suppose $f: A \to B$ and $g: B \to C$ are both onto. Must $(g \circ f)$ be onto? Provide a proof or a counterexample.
|
|
|
|
\vfill
|
|
\pagebreak
|
|
|
|
\section{Review: Modular Arithmetic}
|
|
|
|
\definition{}
|
|
$\mathbb{Z} / n$ is the set of integers mod $n$. For example, $Z/5 = \{0, 1, 2, 3, 4\}$. \\
|
|
You should all be familiar with modular arithmetic.
|
|
|
|
\definition{}
|
|
The inverse of an element $a$ in $\mathbb{Z}/n$ is a $b$ so that $a \times b \equiv 1$. \\
|
|
|
|
Not all elements of $\mathbb{Z}/n$ have an inverse. Those that do are called \textit{units}. \\
|
|
|
|
\vspace{2mm}
|
|
|
|
The set of all units in $\mathbb{Z}/n$ is written $(\mathbb{Z}/n)^\times$ \\
|
|
Read this as \say{$\mathbb{Z}$ mod $n$ cross}
|
|
|
|
\problem{}
|
|
What are the elements of $(\mathbb{Z}/5)^\times$?
|
|
|
|
\begin{solution}
|
|
$\{1, 2, 3, 4\}$
|
|
\end{solution}
|
|
|
|
\vfill
|
|
|
|
\problem{}<modtables>
|
|
Create an addition table for $\mathbb{Z}/4$ and a multiplication table for $(\mathbb{Z}/5)^\times$
|
|
|
|
\begin{center}
|
|
\begin{tabular}{c | c c c c}
|
|
+ & 0 & 1 & 2 & 3 \\
|
|
\hline
|
|
0 & ? & ? & ? & ? \\
|
|
1 & ? & ? & ? & ? \\
|
|
2 & ? & ? & ? & ? \\
|
|
3 & ? & ? & ? & ? \\
|
|
\end{tabular}
|
|
\end{center}
|
|
|
|
\begin{solution}
|
|
\begin{center}
|
|
\begin{tabular}{c | c c c c}
|
|
+ & 0 & 1 & 2 & 3 \\
|
|
\hline
|
|
0 & 0 & 1 & 2 & 3 \\
|
|
1 & 1 & 2 & 3 & 0 \\
|
|
2 & 2 & 3 & 0 & 1 \\
|
|
3 & 3 & 0 & 1 & 2 \\
|
|
\end{tabular}
|
|
\hspace{1cm}
|
|
\begin{tabular}{c | c c c c}
|
|
\times & 1 & 2 & 3 & 4 \\
|
|
\hline
|
|
1 & 1 & 2 & 4 & 3 \\
|
|
2 & 2 & 4 & 3 & 1 \\
|
|
3 & 4 & 3 & 1 & 2 \\
|
|
4 & 3 & 1 & 2 & 4 \\
|
|
\end{tabular}
|
|
\end{center}
|
|
\end{solution}
|
|
|
|
|
|
|
|
\vfill
|
|
\vfill
|
|
\pagebreak |