Skip to main content
Mathematics LibreTexts

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}}\)

    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.

    Definition B.1:

    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.

    Definition B.2:

    Let \(f:A \to B\) and \(g:C \to D\). We write \(f=g\) if and only if

    \[\mbox{$A=C$, $B=D$ and $f(a)=g(a)$ for all $a \in A$.}\]

    Definition B.3:

    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).

    Definition B.4:

    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\).

    Definition B.5:

    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.

    Theorem \(\PageIndex{1}\)

    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.

    Theorem \(\PageIndex{2}\)

    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\).

    Theorem \(\PageIndex{3}\)

    Let \(f:A\to B\) and \(g:B \to C\).

    1. If \(f\) and \(g\) are one-to-one then \(gf: A \to C\) is one-to-one.
    2. If \(f\) and \(g\) are onto then \(gf: A \to C\) is onto.
    3. If \(f\) and \(g\) are one-to-one and onto then \(gf: A \to C\) is also one-to-one and onto.

    This page titled B: Functions is shared under a not declared license and was authored, remixed, and/or curated by W. Edwin Clark via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.