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 an element of $B$ to each element of $A$. We write this as $f: A \to B$.
We say a map is \textit{one-to-one} if $a = b \implies f(a)= f(b)$ for all $a, b$ in the domain. In other words, this means that each element of the range has at most one preimage.
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.
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.