next up previous index
Next: 3.4 Summation Notation Up: 3. Propositions and Functions Previous: 3.2 Sets Defined by   Index

3.3 Functions

3.37   Definition (Function.) Let $A,B$ be sets. A function with domain $A$ and codomain $B$ is an ordered triple $(A,B,f),$ where $f$ is a rule which assigns to each element of $A$ a unique element of $B$. The element of $B$ which $f$ assigns to an element $x$ of $A$ is denoted by $f(x)$. We call $f(x)$ the $f$-image of $x$ or the image of $x$ under $f$. The notation $f:A \mbox{$\longrightarrow$} B$ is an abbreviation for ``$f$ is a function with domain $A$ and codomain $B$''. We read `` $f:A \mbox{$\longrightarrow$} B$'' as ``$f$ is a function from $A$ to $B$.''

3.38   Examples. Let $f : \mbox{{\bf Z}} \mbox{$\longrightarrow$} \mbox{{\bf N}} $ be defined by the rule

\begin{displaymath}
f(n) = n^2 \mbox{ for all } n \in \mbox{{\bf Z}}.
\end{displaymath}

Then $f(2) = 4, f(-2) = 4, \mbox{ and } f(1/2)$ is not defined, because $1/2 \not\in \mbox{{\bf Z}} .$


Let $g: \mbox{{\bf N}} \mbox{$\longrightarrow$} \mbox{{\bf N}} $ be defined by the rule: for all $n \in \mbox{{\bf N}} $

\begin{displaymath}
g(n) = \mbox{the last digit in the decimal expansion for } n.
\end{displaymath}

Thus $g(21) = 1$, $g(0) = 0$, $g(1984) = 4$, $g(666) = 6.$


3.39   Definition (Maximum and minimum functions.) We define functions max and min from $\mbox{{\bf R}}^2$ to R by the rule
\begin{displaymath}
\index{maximum}\index{minimum}
\max(x,y) = \left\{\begin{a...
...{if $x \geq y$}\\y & \mbox{otherwise.}
\end{array}\right.
\end{displaymath} (3.40)


\begin{displaymath}
\min(x,y) = \left\{\begin{array}{ll}
y & \mbox{if $x \geq y$}\\
x & \mbox{otherwise.}
\end{array}\right.
\end{displaymath} (3.41)

Thus we have

\begin{displaymath}
\min(x,y) \leq x \leq \max(x,y)
\end{displaymath}

and

\begin{displaymath}\min(x,y) \leq y \leq \max(x,y)\end{displaymath}

for all $(x,y) \in \mbox{{\bf R}}^2$. Also

\begin{displaymath}\max(2,7) = 7 \mbox{ and }\min(-2,-7) = -7.\end{displaymath}

3.42   Definition (Absolute value function.) Let $A\colon \mbox{{\bf R}}\to\mbox{{\bf R}}$ be defined by the rule

\begin{displaymath}A(x)=\cases{x&if $x>0$,\cr
0&if $x=0$,\cr
-x&if $x<0$.\cr}\end{displaymath}

We call $A$ the absolute value function and we usually designate $A(x)$ by $\vert x\vert$.

3.43   Definition (Sequence) Let $S$ be a set. A sequence in $S$ is a function $f\colon\mbox{${\mbox{{\bf Z}}}^{+}$}\to S$. I will refer to a sequence in $\mbox{{\bf R}}$ as a real sequence.

The sequence $f$ is sometimes denoted by $\{f(n)\}$. Thus $\left\{
{1\over {n^2+1}}\right\}$ is the sequence $f\colon\mbox{${\mbox{{\bf Z}}}^{+}$}\to\mbox{{\bf R}}$ such that $f(n)={1\over {n^2+1}}$ for all $n\in\mbox{${\mbox{{\bf Z}}}^{+}$}$. Sometimes the sequence $f$ is denoted by
\begin{displaymath}
\{f(1),f(2),f(3),\cdots \},
\end{displaymath} (3.44)

for example $\{1,{1\over 2},{1\over 3},\cdots \}$ is the same as $\{
{1\over n}\}$. The notation in formula  (3.44) is always ambiguous. I will use it for sequences like

\begin{displaymath}\{1,1,-1,-1,1,1,-1,-1,1,1 \cdots \}\end{displaymath}

in which it is somewhat complicated to give an analytic description for $f(n)$.


If $f$ is a sequence, and $n\in\mbox{${\mbox{{\bf Z}}}^{+}$}$, then we often denote $f(n)$ by $f_n$.


3.45   Examples. Let $P$ denote the set of all polygons in the plane. For each number $a$ in $\mbox{${\mbox{{\bf R}}}^{+}$}$ let

\begin{displaymath}S_a^2 = \{(x,y)\in \mbox{{\bf R}}^2: 0 \leq x \leq a \mbox{ and }0 \leq y \leq x^2\}.\end{displaymath}

For each $n\in\mbox{${\mbox{{\bf Z}}}^{+}$}$ let

\begin{displaymath}Q_n = \bigcup_{i=1}^n I_i \end{displaymath}

and

\begin{displaymath}R_n = \bigcup_{i=1}^n O_i\end{displaymath}

denote the polygons inscribed in $S_a^2$ and containing $S_a^2$ described in section2.1. Then

$\{Q_n\}$ and $\{R_n\}$ are sequences in $P$.

$\{ \mbox{area}(Q_n) \} = \{\frac{a^3}{3}(1-\frac{1}{n})(1-\frac{1}{2n}) \}$ is a real sequence. (Cf. (2.3) and (2.12).)

$\{ [ \mbox{area}(Q_n), \mbox{area}(R_n)]\}$ is a sequence of intervals.

3.46   Definition (Equality for functions.) Let $(A,B,f)$ and $(C,D,g)$ be two functions. Then, since a function is an ordered triple, we have

\begin{displaymath}(A,B,f) = (C,D,g)\mbox{ if and only if } A=C \mbox{ and }
B=D, \mbox{ and }f=g.
\end{displaymath}

The rules $f$ and $g$ are equal if and only if $f(a)$ = $g(a)$ for all $a \in A$. If $f:A \mbox{$\longrightarrow$} B$ and $g:C \mbox{$\longrightarrow$} D$ then it is customary to write $f=g$ to mean $(A,B,f) = (C,D,g)$. This is an abuse of notation, but it is a standard practice.

3.47   Examples. If $f: \mbox{{\bf Z}} \mbox{$\longrightarrow$} \mbox{{\bf Z}} $ is defined by the rule

\begin{displaymath}
f(x) = x^2 \mbox{ for all $x$ in \mbox{{\bf Z}}}
\end{displaymath}

and $g: \mbox{{\bf Z}} \mbox{$\longrightarrow$} \mbox{{\bf N}} $ is defined by the rule

\begin{displaymath}
g(x) = x^2 \mbox{ for all $x$ in \mbox{{\bf Z}}}
\end{displaymath}

then $f \not= g$ since $f$ and $g$ have different codomains.


If $f : \mbox{{\bf Q}} \mbox{$\longrightarrow$} \mbox{{\bf Q}} $ and $g: \mbox{{\bf Q}} \mbox{$\longrightarrow$} \mbox{{\bf Q}} $ are defined by the rules

\begin{displaymath}f(x) = x^2 - 1 \mbox{ for all $x \in \mbox{{\bf Q}} $} \end{displaymath}


\begin{displaymath}g(y) = (y-1)(y+1) \mbox{ for all $y \in \mbox{{\bf Q}}$} \end{displaymath}

then $f=g$.

In certain applications it is important to know the precise codomain of a function, but in many applications the precise codomain is not important, and in such cases I will often omit all mention of the codomain. For example, I might say ``For each positive number $a$, let $J(a) = [0,a]$.'' and proceed as though I had defined a function. Here you could reasonably take the codomain to be the set of real intervals, or the set of closed intervals, or the set of all subsets of R.

3.48   Definition (Image of $f$) Let $A,B$ be sets, and let $f:A \mbox{$\longrightarrow$} B$. The set

\begin{displaymath}
\{y\in B: \mbox{ for some $x \in A$ $(y = f(x))$} \}
\end{displaymath}

is called the image of $f$, and is denoted by $f(A).$ More generally, if $T$ is any subset of $A$ then we define

\begin{displaymath}
f(T) = \{ y \in B: \mbox{ for some $x \in T$ $(y = f(x))$} \}.
\end{displaymath}

We call $f(T)$ the $f$-image of $T$. Clearly, for every subset $T$ of $A$ we have $f(T) \subset B$.

3.49   Examples. If $f: \mbox{{\bf Z}} \mbox{$\longrightarrow$} \mbox{{\bf Z}} $ is defined by the rule

\begin{displaymath}
f(n) = n + 3 \mbox{ for all } n \in \mbox{{\bf Z}}\
\end{displaymath}

then $f(2) = 5 \mbox{ so } f(2) \in \mbox{{\bf Z}}, $

$f(\{2\}) = \{5\} \mbox{ so } f(\{2\}) \subset \mbox{{\bf Z}}, $

$f(\mbox{{\bf N}}) = \mbox{{\bf Z}}_{\geq 3}$.

3.50   Definition (Graph of $f$) Let $A,B$ be sets, and let $f:A \mbox{$\longrightarrow$} B$. The graph of $f$ is defined to be

\begin{displaymath}
\{(x,y) \in A \times B: y = f(x) \}
\end{displaymath}

If the domain and codomain of $f$ are subsets of R, then the graph of $f$ can be identified with a subset of the plane.


3.51   Examples. Let $f:\mbox{{\bf R}} \mbox{$\longrightarrow$} \mbox{{\bf R}} $ be defined by the rule

\begin{displaymath}
f(x) = x^2 \mbox{ for all $x \in \mbox{{\bf R}}. $}
\end{displaymath}

The graph of $f$ is sketched below. The arrowheads on the graph are intended to indicate that the complete graph has not been drawn.
\psfig{file=ch3f.eps,height=1.9in}


\psfig{file=ch3g.eps,height=1.2in}


\psfig{file=ch3h.eps,height=1.9in}

Let $S = \{x \in \mbox{{\bf R}} : 1 \leq x < 3 \}. $ Let $g$ be the function from $S$ to R defined by the rule

\begin{displaymath}
g(x) = \frac{1}{x} \mbox{ for all $x \in S$}.
\end{displaymath}

The graph of $g$ is sketched above. The solid dot at $(1,1)$ indicates that $(1,1)$ is in the graph. The hollow dot at $(3,1/3)$ indicates that $(3,1/3)$ is not in the graph.


Let $h :\mbox{{\bf R}} \mbox{$\longrightarrow$} \mbox{{\bf R}} $ be defined by the rule

\begin{displaymath}
h(x) = \mbox{ the greatest integer less than or equal to $x.$}
\end{displaymath}

Thus $h(3.14) = 3$ and $h(-3.14) = -4.$ The graph of $h$ is sketched above.

The term function (functio) was introduced into mathematics by Leibniz [33, page 272 footnote]. During the seventeenth century the ideas of function and curve were usually thought of as being the same, and a curve was often thought of as the path of a moving point. By the eighteenth century the idea of function was associated with ``analytic expression''. Leonard Euler (1707-1783) gave the following definition:

A function of a variable quantity is an analytic expression composed in any way whatsoever of the variable quantity and numbers or constant quantities.

Hence every analytic expression, in which all component quantities except the variable $z$ are constants, will be a function of that $z$; Thus $a+3z$; $az-4z^2$; $az+b\sqrt{a^2-z^2}$; $c^z$; etc. are functions of $z$[18, page 3].

The use of the notation ``$f(x)$'' to represent the value of $f$ at $x$ was introduced by Euler in 1734 [29, page 340].


3.52   Exercise. Sketch the graphs of the following functions:

a)
$f(x) = (x-1)^2 \mbox{ for all }x \in [0,4]$.
b)
$g(x) = (x-2)^2 \mbox{ for all }x \in [-1,3]$.
c)
$h(x) = x^2 - 1 \mbox{ for all }x \in [-2,2]$.
d)
$k(x) = x^2 - 2^2 \mbox{ for all }x \in [-2,2]$.


next up previous index
Next: 3.4 Summation Notation Up: 3. Propositions and Functions Previous: 3.2 Sets Defined by   Index
Ray Mayer 2007-09-07