# Appendix B Functions

If `A` and `B` are sets, then a **function** `f` from `A` to `B`, written $f:\text{}A\to B$, is a rule that associates to each element `x` in `A` a unique element denoted `f`(`x`) in `B`. The element `f`(`x`) is called the **image** of `x` (under `f`), and `x` is called a **preimage** of `f`(`x`) (under `f`). If $f:\text{}A\to B$, then `A` is called the **domain** of `f`, `B` is called the **codomain** of `f`, and the set $\{f(x):\text{}x\in A\}$ is called the **range** of `f`. Note that the range of `f` is a subset of `B`. If $S\subseteq A$, we denote by `f`(`S`) the set $\{f(x):\text{}x\in S\}$ of all images of elements of `S`. Likewise, if $T\subseteq B$, we denote by ${f}^{-1}(T)$ the set $\{x\in A:\text{}f(x)\in T\}$ of all preimages of elements in `T`. Finally, two functions $f:\text{}A\to B$ and $g:\text{}A\to B$ are **equal**, written $f=g$, if $f(x)=g(x)$ for all $x\in A$.

# Example 1

Suppose that $A=[-10,\text{}10]$. Let $f:\text{}A$

Get *Linear Algebra, 5th Edition* now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.