\include{preamble}
\setcounter{try}{7}



\begin{document}
\thispagestyle{empty}
\centerline{\bf Math 365 -- Monday 2/4/19}
\centerline{\bf  Section 2.3: Functions}


\noindent {\bf Attach at the end of Homework 2:} \\
At the end of your write-up, include the following, labeling this as \textbf{``Writing exercise''}. 
\begin{enumerate}[(a)]
\item Mark up your finished homework assignment, showing where you followed or failed to follow the mechanical and stylistic issues outlined in the handout \emph{Communicating Mathematics through Homework and Exams}. This means \textbf{treat your write-up as a second-to-last draft}, and go point-by-point through the handout and address instances where you followed or did not follow each direction in your writing. Use a different-colored pen if you have one, and hand in this marked up draft. You do not need to rewrite the result.

 How did you improve this week over homework 1? How might you improve in the future? \medskip
\item List three or more ways that you succeeded or failed at following the advice in \emph{Some Guidelines for Good Mathematical Writing}.  How did you improve this week over homework 1? How might you improve in the future?  \medskip
\end{enumerate}
To receive credit for this assignment, you must complete this exercise.



\smallskip
\hrule 

\vfill


\begin{try}(See last page for definition quick-reference)
\begin{enumerate}[(a)]
\item Decide for each of the following expressions: Is it a function? If so,  

\centerline{
\begin{tabular}{l@{\qquad}l}
(i) what is its domain, codomain, and image? & (ii) is it injective? (why or why not)\\
(iii) is it surjective?  (why or why not)&(iv) is it invertible?  (why or why not)
\end{tabular}}
$$
{\def\arraystretch{2}
\begin{array}{ll}
\text{(I) } f: \RR \to \RR \text{ defined by } x \mapsto x^3
	&\text{(II) } f:  \RR \to \RR \text{ defined by }  x \mapsto \sqrt{x} \\
\text{(III) }f: \ZZ \times \ZZ \to \QQ \text{ defined by }  (a,b) \mapsto a/b
	& 
	\text{(IV) }f: \RR \times \ZZ \to \ZZ \text{ defined by }   (r,z) \mapsto \lceil r \rceil * z\\
\text{(V) }\begin{matrix}
\begin{tikzpicture}
 \draw [gray] (0,2) circle [x radius=.75cm, y radius=1.5 cm];
 \draw[gray]  (2.1,2) circle [x radius=.75cm, y radius=1.5 cm];
 \node[gray, below] at (0,.5) {$A$};\node[gray, below] at (2,.5) {$B$};
 \draw[bend left, ->, gray] (.2,3.5) to node[above]{$f$} (1.9,3.5);
\foreach \x/\y in {1/i, 2/j, 3/k} {\node[bV, label=left:{$\y$}] (\y) at (0,\x){};}
\foreach \x/\y in {1/a, 2/b, 3/c} {\node[bV, outer sep = 2pt, label=right:{$\y$}] (\y) at (2,\x){};}
\draw[->] (i) to (b);
 \draw[->] (j) to (a);
 \draw[->]  (k) to (c);
\end{tikzpicture}
\end{matrix}
&
\text{(VI) }\begin{matrix}
\begin{tikzpicture}
 \draw [gray] (0,2) circle [x radius=.75cm, y radius=1.5 cm];
 \draw[gray]  (2.1,2) circle [x radius=.75cm, y radius=1.5 cm];
 \node[gray, below] at (0,.5) {$A$};\node[gray, below] at (2,.5) {$B$};
 \draw[bend left, ->, gray] (.2,3.5) to node[above]{$f$} (1.9,3.5);
\foreach \x/\y in {1/i, 2/j, 3/k} {\node[bV, label=left:{$\y$}] (\y) at (0,\x){};}
\foreach \x/\y in {1/a, 2/b, 3/c} {\node[bV, outer sep = 2pt, label=right:{$\y$}] (\y) at (2,\x){};}
\draw[->] (i) to (b);
 \draw[->] (i) to (a);
 \draw[->]  (k) to (c);
\end{tikzpicture}
\end{matrix}
\end{array}
}
$$
\item For those examples which were not functions in the previous problems, can you restrict the domain and/or codomain to make them functions? i.e.\ pick a reasonable subset of the given domain/codomain such that the expression is a function on that domain. 
\item If possible, choose a domain and codomain for the following expressions to make them into functions satisfying 
\begin{enumerate}[(i)]
	\item $f$ is an injective but not surjective function;
	\item $f$ is a surjective but not injective function;
	\item $f$ is an invertible function;
	\item $f$ is not a function;
\end{enumerate}
where $f$ is given by:
\begin{enumerate}[(I)]
	\item $f(x) = |x|$,
	\item $f(x) = 1/x$,
	\item $f(x) = 6$,
	\item $f(x,y) = \sqrt{xy}$. 
\end{enumerate}

\item Let $f$ be a function from the set $A$ to the set $B$. Let $S$ and $T$ be subsets of $A$. Show that  
\begin{enumerate}[(i)]
\item $f(S \cup T) = f(S) \cup f(T)$; and
\item $f(S \cap T) \subseteq f(S) \cap f(T)$.
\end{enumerate}
Can you think of an example where the inclusion in part (b) could be proper (not equal)?
\end{enumerate}
\end{try}




\begin{try}
Let $$f: A \to B \qquad \text{ and } \qquad g: B \to C$$
be functions. Draw some pictures and make some conjectures about the following questions. 
\begin{enumerate}[(a)]
\item Is $g \circ f$ always a function?
\item What are the conditions on $f$, $g$, $A$, $B$, and/or $C$ for $g \circ f$ to be surjective?
\item What are the conditions on $f$, $g$, $A$, $B$, and/or $C$ for $g \circ f$ to be injective?
\item What are the conditions on $f$, $g$, $A$, $B$, and/or $C$ for $g \circ f$ to be bijective?
\item What are the conditions on $f$, $g$, $A$, $B$, and/or $C$ for $f \circ g$ to be a function?
\item If $f$ and $g \circ f$ are injective, is it necessarily true that $g$ is injective?
\item If $f$ and $g \circ f$ are surjective, is it necessarily true that $g$ is surjective?
\end{enumerate}
\end{try}

\vfill

\begin{try}
Show that if both $$f: A \to B \qquad \text{ and } \qquad g: B \to C$$
are surjective functions, then $g \circ f$ is also surjective.
\end{try} 

\vfill


\begin{try}~
\begin{enumerate}[(a)]
\item Determine whether $f$ is a function from $\ZZ$ to $\RR$ if 

\begin{enumerate}[(i)]
\item $f(n) = \pm n$;
\item $f(n) = \sqrt{n^2 + 1}$;
\item $f(n) = 1/(n^2 -4 )$.
\end{enumerate}

\vfill

\item Let $f(x) = 2x$ where the domain is the set of real numbers. Compute the following images.

\begin{enumerate}[(i)]
	\item $f(\ZZ)$ 
	\item $f(\NN)$ 
	\item $f(\RR)$
\end{enumerate}



\item Let $f$ be the function from $\RR$ to $\RR$ defined by $f(x) = x^2$. Use set-builder notation to describe the following preimages. 


\begin{enumerate}[(i)]
	\item $f^{-1}(\{1 \})$
	\item $f^{-1}(\{x ~|~ 0 < x < 1 \})$
	\item $f^{-1}(\{ x ~|~ x > 7\})$
\end{enumerate}

\end{enumerate}

\end{try}

\vfill

\hrule 
\smallskip

\noindent{\bf Important definitions:} Let $f: A \to B$.
\begin{enumerate}[$\bullet$] 
\item \emph{Domain and codomain}: the domain is $A$ and the codomain is $B$.
\item \emph{Image}: the image of $f$ is $f(A) = \{ b \in B ~|~ f(a) = b \text{ for some } a \in A\}$.
\item \emph{Well-defined}: (i)  $f(A) \subseteq B$, and (ii) if $f(a) = b$ and $f(a) = b'$, then $b=b'$. \\
(Example: $f(x) = \sqrt{x}$ with codomain $\RR_{\geq 0}$. Non-example: $f(x) = \sqrt{x}$ with codomain $\RR$.)
\item \emph{Preimage}: the preimage of $b \in B$ is $f^{-1}(b) = \{a \in A ~|~ f(a) = b\}$.
\item \emph{Invertible}: For all $b \in B$, $f^{-1}(b)$ has exactly one element.
\item \emph{Injective}: if $f(a) = f(a')$, then $a = a'$. \\
(Example: $f(x) = x^2$ on domain $\RR_{\geq 0}$. Non-example: $f(x) = x^2$ on domain $\RR$.)
\item \emph{Surjective}: for all $b \in B$ in the codomain, there is some $a \in A$ such that $f(a) = b$ (i.e.\ $f(A) = B$).\\
(Example: $f(x) = x^2$ with codomain $\RR_{\geq 0}$. Non-example: $f(x) = x^2$ with codomain $\RR$.)
\item \emph{Bijective}: surjective and injective.
\end{enumerate}




\end{document}

