Skip to main content \(\newcommand{\longdivision}[2]{#1\big)\!\!\overline{\;#2}}
\newcommand{\mlongdivision}[2]{\longdivision{#1}{#2}}
\renewcommand{\emptyset}{\{\}}
\newcommand{\blanksp}{\underline{\hspace{.25in}}}
\newcommand{\set}[1]{\left\{#1\right\}}
\newcommand{\cspace}{-}
\newcommand{\Ta}{\mathtt{a}}
\newcommand{\Tb}{\mathtt{b}}
\newcommand{\Tc}{\mathtt{c}}
\newcommand{\Td}{\mathtt{d}}
\newcommand{\Te}{\mathtt{e}}
\newcommand{\Tf}{\mathtt{f}}
\newcommand{\Tg}{\mathtt{g}}
\newcommand{\Th}{\mathtt{h}}
\newcommand{\Ti}{\mathtt{i}}
\newcommand{\Tj}{\mathtt{j}}
\newcommand{\Tk}{\mathtt{k}}
\newcommand{\Tl}{\mathtt{l}}
\newcommand{\Tm}{\mathtt{m}}
\newcommand{\Tn}{\mathtt{n}}
\newcommand{\To}{\mathtt{o}}
\newcommand{\Tp}{\mathtt{p}}
\newcommand{\Tq}{\mathtt{q}}
\newcommand{\Tr}{\mathtt{r}}
\newcommand{\Ts}{\mathtt{s}}
\newcommand{\Tt}{\mathtt{t}}
\newcommand{\Tu}{\mathtt{u}}
\newcommand{\Tv}{\mathtt{v}}
\newcommand{\Tw}{\mathtt{w}}
\newcommand{\Tx}{\mathtt{x}}
\newcommand{\Ty}{\mathtt{y}}
\newcommand{\Tz}{\mathtt{z}}
\newcommand{\So}{\Tf}
\newcommand{\Sno}{\Tg}
\newcommand{\Si}{\Th}
\newcommand{\Sni}{\Tj}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\W}{\mathbb{W}}
\newcommand{\ZZ}{\Z}
\newcommand{\PP}{\mathbb{P}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\RR}{\R}
\newcommand{\F}{\mathbb{F}}
\newcommand{\A}{\mathbb{A}}
\newcommand{\abs}[1]{|#1|}
\newcommand{\fmod}{\bmod}
\newcommand{\fdiv}{\,\mathrm{div}\,}
\newcommand{\lcm}{\mathrm{lcm}}
\newcommand{\id}{\mathrm{id}}
\newcommand{\nr}[1]{\##1}
\newcommand{\gexp}[3]{#1^{#2 #3}}
\newcommand{\gexpp}[3]{\displaystyle\left(#1\right)^{#2 #3}}
\newcommand{\glog}[3]{\log_{#1}^{#3}#2}
\newcommand{\sol}[1]{{\color{blue}\textit{#1}}}
\newcommand{\gro}[1]{{\color{gray}#1}}
\newcommand{\todo}[1]{{\color{purple}TO DO: #1}}
\newcommand{\fixme}[1]{{\color{red}FIX ME: #1}}
\newcommand{\checkme}[1]{{\color{green}CHECK ME: #1}}
\newcommand{\degre}{^\circ}
\newcommand{\vect}[1]{\overrightarrow{#1}}
\newcommand{\nix}{}
\newcommand{\cox}[1]{\fcolorbox[HTML]{000000}{#1}{\phantom{M}}}
\newcommand{\tox}[1]{\texttt{\##1} \amp \cox{#1}}
\newcommand{\ttx}[1]{\texttt{\##1}}
\newcommand{\mox}[1]{\mathtt{\##1}}
\newcommand{\xx}{\mathtt{\#}}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 7.3 Equality of Functions
Two functions are equal if they have the same domain and codomain and their values are the same for all elements of the domain.
Definition 7.20 .
Let
\(A\) and
\(B\) be sets and
\(f:A\to B\) and
\(g:A\to B\) be functions. We say that
\(f\) and
\(g\) are
equal and write
\(f=g\) if
\(f(a)=g(a)\) for all
\(a\in A\text{.}\) If
\(f\) and
\(g\) are not equal, we write
\(f\ne g\text{.}\)
In our definition of the equality of functions, we have assumed that the two functions have the same domain and codomain. Two functions that do not have the same domain and codomain are not equal.
Checkpoint 7.21 . Definition of equality of functions.
In the video in
Figure 7.22 we recall the definition and show how one can determine whether two functions are equal.
Figure 7.22. Equality of functions
Example 7.23 . Equal functions.
Let
\(f:\Z_5\to\Z_5\) be given by
\(f(a):=(a+1)\bmod 5\) and
\(g:\Z_5\to\Z_5\) be given by
\(g(a):=(a-4)\bmod 5\text{.}\) First, note that the domains of
\(f\) and
\(g\) are the same and the codomains of
\(f\) and
\(g\) are the same. We show that
\(f=g\) by evaluating both
\(f\) and
\(g\) at each element of the common domain
\(\Z_5=\{0,1,2,3,4\}\) and then comparing the function values for the same elements.
\(f(0)=(0+1)\bmod 5=1\)
\(g(0)=(0-4)\bmod 5=1\)
\(f(1)=(1+1)\bmod 5=2\)
\(g(1)=(1-4)\bmod 5=2\)
\(f(2)=(2+1)\bmod 5=3\)
\(g(2)=(2-4)\bmod 5=3\)
\(f(3)=(3+1)\bmod 5=4\)
\(g(3)=(3-4)\bmod 5=4\)
\(f(4)=(4+1)\bmod5=0\)
\(g(4)=(4-4)\bmod 5=0\)
Since
\(f(a)=g(a)\) for all
\(a\in\Z_5\text{,}\) we have
\(f=g\text{.}\)
Problem 7.24 . Are these functions equal ?
Decide whether the two functions
\begin{align*}
f:\Z_3\to \Z_3 \amp \text{ given by } f(x)=(x^2+1)\fmod 3\\
g:\Z_3\to \Z_3 \amp \text{ given by } f(x)=(x-2)\fmod 3
\end{align*}
are equal.
Solution .
We evaluate
\(f\) and
\(g\) at elements of their domain
\(\Z_3=\{0,1,2\}\text{.}\) If
\(f(x)=g(x)\) for all
\(x\in\Z_3\) then
\(f=g\text{.}\)
\(f(0)=(0^2+1)\fmod 3 = 1\)
\(g(0)=(0-2) \fmod 3 = 1\)
\(f(1)=(1^2+1)\fmod 3 = 2\)
\(g(1)=(1-2) \fmod 3 = 2\)
\(f(2)=(2^2+1)\fmod 3 = 2\)
\(g(2)=(2-2) \fmod 3 = 0\)
As
\(f(2)\ne g(2)\) the two functions
\(f\) and
\(g\) are not equal.
Now use this method to determine whether two functions are equal.
Checkpoint 7.25 . Determine whether two functions are equal.
In
Example 7.26 we determine whether a function given by a plot is equal to a function given by an equation.
Example 7.26 .
Let the graph of the function
\(f\) be given by
The plot immediately yields that the domain of
\(f\) is
\(\mathbb{Z}_{9}\) and that the codomain of
\(f\) is
\(\mathbb{Z}_{10}\text{.}\) We read off the images of the elements of the domain
\(f\text{:}\)
\(f(0)=0\text{,}\) \(f(1)=3\text{,}\) \(f(2)=6\text{,}\) \(f(3)=9\text{,}\) \(f(4)=2\text{,}\) \(f(5)=5\text{,}\) \(f(6)=8\text{,}\) \(f(7)=1\text{,}\) \(f(8)=4\)
Let
\(g:\mathbb{Z}_{9}\to\mathbb{Z}_{10}\) be given by
\(g(x)=3\cdot x \bmod 10\text{.}\)
We now determine whether the functions
\(f\) and
\(g\) are equal. We have already found
\(f(x)\) for all
\(x\in\mathbb{Z}_{9}\text{.}\) Now we compute
\(g(x)\) for all
\(x\in\mathbb{Z}_{9}\text{.}\) We get:
\(g(0)=3\cdot 0 \bmod 10=0\text{,}\) \(g(1)=3\cdot 1 \bmod 10=3\text{,}\) \(g(2)=3\cdot 2 \bmod 10=6\text{,}\) \(g(3)=3\cdot 3 \bmod 10=9\text{,}\) \(g(4)=3\cdot 4 \bmod 10=2\text{,}\) \(g(5)=3\cdot 5 \bmod 10=5\text{,}\) \(g(6)=3\cdot 6 \bmod 10=8\text{,}\) \(g(7)=3\cdot 7 \bmod 10=1\text{,}\) \(g(8)=3\cdot 8 \bmod 10=4\)
Because
\(f\) and
\(g\) have the same domain and codomain and because
\(f(x)=g(x)\) for all
\(x\in \mathbb{Z}_{9}\) we conclude that the two functions
\(f\) and
\(g\) are equal.