\documentclass[12pt,a4paper]{amsart}
%%%%%%%%%%% Here is where you tell LaTeX to use packages. Each
%%%%%%%%%%% package gives you access to different commands and
%%%%%%%%%%% functionality. Most of them are unnecessary for the
%%%%%%%%%%% mathematics in this document.

%%%%%%%%%%% If you hadn't figured out, the % symbol automatically
%%%%%%%%%%% nulls out all subsequent characters on that line. So
%%%%%%%%%%% it's used for commenting code.
\usepackage{hyperref}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{framed}
\usepackage{multicol}
\usepackage[OT2,T1]{fontenc}
\usepackage{graphicx}
\usepackage[all]{xy}
\usepackage{color}
\usepackage{mathrsfs}
\usepackage{mathtools}

%%%%%%%%%%% Determining margins and spacing.
\setlength\topmargin{-0.3in}
\addtolength{\oddsidemargin}{-.625in}
	\addtolength{\evensidemargin}{-.625in}
	\addtolength{\textwidth}{1.25in}
\setlength\footskip{1in}

%%%%%%%%%%% I think this command enables `sections'
\numberwithin{equation}{section}

%%%%%%%%%%% This command allows you to label things as `theorem',
%%%%%%%%%%% `conjecture', etc.
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{question}{Question}[theorem]
\newtheorem{example}{Example}[theorem]

\newcommand{\R}{\mathcal{R}}

\usepackage[utf8]{inputenc}
\title{Math 220.201 Class 19 Solutions}
\begin{document}
\maketitle
\begin{enumerate}
\item [1.] Let $f:A \rightarrow B$ and $g:C\rightarrow D$ be functions. Then one can form the function
$$f\times g:A\times C \rightarrow B\times D$$
\begin{enumerate}
\item Prove that if $f$ is injective and $g$ is injective, then $f\times g$ is injective.
\vskip 0.2in
\begin{proof}
Suppose that $(a, c)$ and $(a', c')$ are elements of $A\times C$ such that $(f(a), g(c))=(f(a'), g(c'))$. Then $f(a)=f(a')$ and $g(c)=g(c')$. Because $f$ is injective, it follows that $a=a'$, and because $g$ is injective, it follows that $c=c'$. Then $(a, c)=(a', c')$.

Thus, we have proven that $f\times g$ is injective.
\end{proof}
\vskip 0.2in
\item The same if both are surjective.
\vskip 0.2in
\begin{proof}
Suppose that $(b, d)$ is any element of $B\times D$. Because $f$ is surjective, there is some $a\in A$ such that $f(a)=b$, and because $g$ is surjective, there is some $c\in C$ such that $g(c)=d$. Then by definition, $f\times g$ sends $(a, c)$ to $(b, d)$.

So we have proven that $f\times g$ is surjective.
\end{proof}
\vskip 0.2in
\item Come up with an example where $f$ is injective, $g$ is surjective, and $f\times g$ is neither.
\vskip 0.2in
{\bf Solution:} Let $f:\{0\} \rightarrow \{0, 1\}$ be defined by $f(0)=0$, and let $g:\{0,1\} \rightarrow \{0\}$ be defined by $g(0)=g(1)=0$. Then $f\times g:\{(0,0),(0,1)\} \rightarrow \{(0,0),(1,0)\}$ sends both $(0,0)$ and $(0,1)$ to $(0,0)$.
\vskip 0.2in
\item How about an example where $f$ is not bijective, but $f\times g$ is? (Hint: use $\emptyset$.)
\vskip 0.2in
{\bf Solution:} Let $f:A \rightarrow B$ be any function, and let $g:\emptyset \rightarrow \emptyset$ be the trivial function consisting of no ordered pairs (check - this is a function!). Then $f\times g:A\times \emptyset \rightarrow B\times \emptyset$. But any set time the empty set is the empty set. So $f\times g$ is just the trivial function $\emptyset \rightarrow \emptyset$ again.
\vskip 0.2in
\end{enumerate}
\item [2.] Let $A, B,$ and $C$ be sets. Suppose that $g:A \rightarrow B$,  $h:A\rightarrow B$, and $f:B \rightarrow C$ are functions with the property that $f\circ g=f\circ h$.
\begin{enumerate}
\item Provide an example of the situation above which shows that $g$ does not necessarily have to equal $h$.
\vskip 0.2in
{\bf Solution:} Let $A=\{0\}$, $B=\{1,2\}$, and $g:A \rightarrow B$ be defined by $g(0)=1$, $h:A\rightarrow B$ be defined by $h(0)=2$. Let $C=\{3\}$ and let $f:B \rightarrow C$ be defined by $f(1)=f(2)=3$. Then $f\circ g$ and $f\circ h$ both send $0$ to $3$, and thus are equal. But $g$ and $h$ are unequal functions.
\vskip 0.2in
\item Prove that if $f$ is injective, then $g=h$.
\vskip 0.2in
\begin{proof}
We must show that for any $a\in A$, $g(a)=h(a)$. For any $a\in A$,
$$(f\circ g)(a)=(f\circ h)(a)$$
$$\implies f(g(a))=f(h(a))$$
Because $f$ is injective, $g(a)=h(a)$. Thus, we have proven that $g=h$.
\end{proof}
\end{enumerate}

\end{enumerate}
\end{document}