B: Functions
- Page ID
- 74652
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Here we collect a few basic facts about functions. Note that the words function, map, mapping and transformation may be used interchangeably. Here we just use the term function. We leave the proofs of all the results in this appendix to the interested reader.
A function \(f\) from the set \(A\) to the set \(B\) is a rule which assigns to each element \(a \in A\) an element \(f(a) \in B\) in such a way that the following condition holds for all \(x,y \in A\):
\[\label{Def_function} x=y \Longrightarrow f(x) =f(y).\] To indicate that \(f\) is a function from \(A\) to \(B\) we write \(f:A\to B\). The set \(A\) is called the domain of \(f\) and the set \(B\) is called the codomain of \(f\).
If the conditions of Definition B.1 hold, it is customary to say that the function is well-defined. Often we speak of “the function \(f\)”, but strictly speaking the domain and the codomain are integral parts of the definition, so this is short for “the function \(f: A \to B\).”
To describe a function one must specify the domain (a set) and the codomain (another set) and specify its effect on a typical element (variable) in its domain.
When a function is defined it is often given a name such as \(f\) or \(\sigma\). So we speak of the function \(f\) or the function \(\sigma\). If \(x\) is in the domain of \(f\) then \(f(x)\) is the element in the codomain of \(f\) that \(f\) assigns to \(x\). We sometimes write \(x \mapsto f(x)\) to indicate that \(f\) sends \(x\) to \(f(x)\).
We can also use the barred arrow to define a function without giving it a name. For example, we may speak of the function \(x \mapsto x^2+2x+4\) from \(\mathbb{R}\) to \(\mathbb{R}\). Alternatively one could define the same function as follows: Let \(h:\mathbb{R}\to\mathbb{R}\) be defined by the rule \(h(x) = x^2+2x+4\) for all \(x \in \mathbb{R}\).
Note that it is correct to say the function \(\sin\) or the function \(x\mapsto \sin(x)\). But it is not correct to say the function \(\sin(x)\).
Arrows: We consistently distinguish the following types of arrows:
\(\to\) As in \(f: A\to B\).
\(\mapsto\) As in \(x \mapsto x^2+3x+4\)
\(\Longrightarrow\) Means implies
\(\Longleftrightarrow\) Means is equivalent to
Some people use \(\rightsquigarrow\) in place of \(\mapsto\)
It is often important to know when two functions are equal. Then, the following definition is required.
A function \(f:A \to B\) is said to be one-to-one if the following condition holds for all \(x,y \in A\) : \[\label{Def_1-1} f(x) = f(y) \Longrightarrow x=y.\]
Note carefully the difference and similiarity between (B.1) and (B.2).
A function \(f:A \to B\) is said to be onto if the following condition holds: \[\mbox{For every $b \in B$ there is an element $a \in A$ such that $f(a)=b$.}\]
Some mathematicians use injective instead of one-to-one, surjective instead of onto, and bijective for one-to-one and onto. If \(f:A \to B\) is bijective \(f\) is sometimes said to be a bijection or a one-to-one correspondence between \(A\) and \(B\).
For any set \(A\), we define the function \(\iota_A : A \to A\) by the rule \[\mbox{$\iota_A(x) = x$ for all $x \in A$.}\] We call \(\iota_A\) the identity function on \(A\). If \(A\) is understood, we write simply \(\iota\) instead of \(\iota_A\).
Some people write \(1_A\) instead of \(\iota_A\) to indicate the identity function on \(A\).
Problem B.1 Prove that \(\iota_A: A \to A\) is one-to-one and onto.
If \(f:A\to B\) and \(g:B \to C\) then the rule \[\mbox{$gf(a) = g(f(a))$ for all $a \in A$}\] defines a function \(g f:A \to C\). This function is called the composition of \(g\) and \(f\).
Some people write \(g \circ f\) instead of \(gf\), but we will not do this.
If \(f:A\to B\) is one-to-one and onto then the rule \[\mbox{for every $b \in B$ define $f^{-1}(b) = a$ if and only if $f(a)=b$,}\] defines a function \(f^{-1}:B \to A\). The function \(f^{-1}\) is itself one-to-one and onto and satisfies \[\mbox{$ff^{-1}=\iota_B $ and $f^{-1}f=\iota_A$.}\]
The function \(f^{-1}\) defined in the above theorem is called the inverse of \(f\).
Let \(f:A\to B\) and \(g:B \to C\).
- If \(f\) and \(g\) are one-to-one then \(gf: A \to C\) is one-to-one.
- If \(f\) and \(g\) are onto then \(gf: A \to C\) is onto.
- If \(f\) and \(g\) are one-to-one and onto then \(gf: A \to C\) is also one-to-one and onto.