# 4.4.C Properties of functions

Suppose that → is a function from the set to the set B. We say that is the domain of the function and that is the range of the function. We define the image of the function to be the set {∈ B|∃∈ A(f(a))}. Put more simply, the image of is the set {f(a)|∈ A}. That is, the image is the set of all values, f(a), of the function, for all ∈ A. For example, for the function s: N → N that is specified by $$s(n)=n^{2},$$ both the domain and the range are $$\mathbb{N},$$ and the image is the set $$\left\{n^{2} | n \in \mathbb{N}\right\}$$ or {0,1,4,9,16,...}.

In some cases—particularly in courses like Calculus—the term ‘range’ is used to refer to what I am calling the image

Note that the image of a function is a subset of its range. It can be a proper subset, as in the above example, but it is also possible for the image of a function to be equal to the range. In that case, the function is said to be onto. Sometimes, the fancier term surjectiveis used instead. Formally, a function → is said to be onto (or surjective) if every element of is equal to (a) for some element of A. In terms of logic, is onto if and only if

∈ (∃∈ A(f(a))).

For example, let = {ab} and = {1, 2, 3}, and consider the function from to specified by the set of ordered pairs {(1, a), (2, a), (3, b)}. This function is onto because its image, {ab}, is equal to the range, X. However, the function from to given by {(a,1),(b,3)} is not onto, because its image, {1, 3}, is a proper subset of its range, Y.

As a further example, consider the function from Z to Z given by (n) =− 52. To show that is onto, we need to pick an arbitrary in the range Z and show that there is some number in the domain Z such that (a) = b. So let be an arbitrary integer; we want to find an such that a−52 = b. Clearly this equation will be true when + 52. So every element is the image of the number + 52, and is therefore onto. Note that iff had been specified to have domain N, then would not be onto, as for some ∈ Z the number + 52 is not in the domain N (for example, the integer −73 is not in the image of , since −21 is not in N.)

If → and if ∈ A, then is associated to only one element of B. This is part of the definition of a function. However, no such restriction holds for elements of B. If b ∈ B, it is possible for to be associated to zero, one, two, three, ..., or even to an infinite number of elements of A. In the case where each element of the range is associated to at most one element of the domain, the function is said to be one-to-one. Sometimes, the term injective is used instead. The function is one-to-one (or injective) if for any two distinct elements and in the domain of (x) and (y) are also distinct. In terms of logic, → is one-to-one if and only if

$$\forall x \in A \forall y \in A(x \neq y \rightarrow f(x) \neq f(y))$$

Since a proposition is equivalent to its contrapositive, we can write this condition equivalently as

$$\forall x \in A \forall y \in A(f(x)=f(y) \rightarrow x=y)$$

Sometimes, it is easier to work with the definition of one-to-one when it is expressed in this form.

The function that associates every person to his or her mother is not one-to- one because it is possible for two different people to have the same mother. The function : N → N specified by s(n) = n2 is one-to-one. However, we can define a function $$r : \mathbb{Z} \rightarrow \mathbb{Z}$$ by the same formula: $$r(n)=n^{2},$$ for $$n \in \mathbb{Z}$$ The function is not one-to-one since two different integers can have the same square. For example, r(−2) = r(2).

A function that is both one-to-one and onto is said to be bijective.4 The function that associates each point in a map of Zuid-Holland to a point in the state itself is presumably bijective. For each point on the map, there is a corresponding point in the province, and vice versa. If we specify the function from the set {1, 2, 3} to the set {abc} as the set of ordered pairs {(1, b), (2, a), (3, c)}, then is a bijective function. Or consider the function from Z to Z given by f(n) = n−52. We have already shown that is onto. We can show that it is also one-to-one.

Proof. Pick an arbitrary and in Z and assume that
(x) = (y). This means that − 52 = − 52, and adding 52 to both sides of the equation gives y. Since and were arbitrary, we have proved ∀∈ Z ∀∈ Z(f(x) =(y) → y), that is, that is one-to-one.

Altogether, then, is a bijection.