Let X = {a, b, c, d } and Y= {P, q,
S,t}, then the function
f:x-y defined by f (a) =p, f (b) =q
of (c) = r, f (d) = t, is one one but not onto
Answers
Functions...finally a topic that most of you must be familiar with. How-
ever here, we will not study derivatives or integrals, but rather the notions of
one-to-one and onto (or injective and surjective), how to compose functions,
and when they are invertible.
Let us start with a formal definition.
Definition 63. Let X and Y be sets. A function f from X to Y is a rule
that assigns every element x of X to a unique y in Y . We write f : X → Y
and f(x) = y. Formally, using predicate logic:
(∀x ∈ X, ∃y ∈ Y, y = f(x)) ∧ (∀x1, x2 ∈ X, f(x1) 6= f(x2) → x1 6= x2).
Then X is called the domain of f, and Y is called the codomain of f. The
element y is the image of x under f, while x is the preimage of y under f.
Finally, we call range the subset of Y with preimages.
Example 96. Consider the assignment rule f : X = {a, b, c} → Y =
{1, 2, 3, 4} which is defined by: f = {(a, 2),(b, 4),(c, 2)}. We first check
that this is a function. For every element in X, we do have an assign-
ment: f(a) = 2, f(b) = 4, f(c) = 2. Then the condition that whenever
f(x1) 6= f(x2) it must be that x1 6= x2 is also satisfied. The the domain
of f is X, the codomain of f is Y . The preimage of 2 is {a, c} because
f(a) = f(c) = 2. For the range, we look at Y , and among 1, 2, 3, 4, only 2
and 4 have a preimage, therefore the range is {2, 4}.