Functions Kenneth Rosen Book
Functions Kenneth Rosen Book
Functions
Chapter 2.3
Kenneth Rosen Book
Functions
• Def: Let A and B be sets. A function f (or more
completely, f : A → B) is a rule that assigns to
each element a єA exactly one element f(a) є B,
called the value of f at a.
f A B
• •
f • •
• • • y
a b •
•
•
• x
A
B Bipartite Graph Plot
Like Venn diagrams
Some Function Terminology
• If it is written that f:AB, and f(a)=b
(where aA & bB), then we say:
– A is the domain of f.
– B is the codomain of f.
– b is the image of a under f.
– a is a pre-image of b under f.
• In general, b may have more than 1 pre-image.
– The range RB of f is R={b | a f(a)=b }.
Range versus Codomain
• The range of a function might not be its
whole codomain.
• The codomain is the set that the function
is declared to map all domain values into.
• The range is the particular set of values in
the codomain that the function actually
maps elements of the domain to.
Range vs. Codomain - Example
• Suppose I declare to you that: “f is a
function mapping students in this class
to the set of grades {A,B,C,D,E}.”
• At this point, you know f’s codomain is:
{A,B,C,D,E} and its range is ________.
__________, unknown!
• Suppose the grades turn out all As and
Bs.
{A,B} but its
• Then the range of f is _________,
still {A,B,C,D,E}!
codomain is __________________.
Function Operator Example
,× (“plus”,“times”) are binary operators
over R. (Normal addition & multiplication.)
• Therefore, we can also add and multiply
functions f,g:RR:
– (f g):RR, where (f g)(x) = f(x) g(x)
– (f × g):RR, where (f × g)(x) = f(x) × g(x)
One-to-One Functions
• A function is one-to-one (1-1), or injective,
or an injection, iff every element of its
range has only 1 pre-image.
• Bipartite (2-part) graph representations
of functions that are (or not) one-to-one:
• • • •
• • • • •
• • • •
• • • •
• • • • •
• •
• • •
Not one-to-one Not even a
One-to-one function!
Onto (Surjective) Functions
• A function f:AB is onto or surjective or
a surjection iff its range is equal to its
codomain (bB, aA: f(a)=b).
0
• Note that if xZ, 1 .
. 1.4= 1
1.4
x = x = x. 2 .
1.4= 2
3 3 .. .
3=3= 3
Plots with floor/ceiling
• Note that for f(x)=x, the graph of f includes the
point (a, 0) for all values of a such that a0 and
a<1, but not for the value a=1.
• We say that the set of points (a,0) that is in f
does not include its limit or boundary point (a,1).
– Sets that do not include all of their limit points are
generally called open sets.
• In a plot, we draw a limit point of a curve using
an open dot (circle) if the limit point is not on the
curve, and with a closed (solid) dot if it is on the
curve.
Plots with floor/ceiling: Example
• Plot of graph of function f(x) = x/3:
f(x)
3 +3 x
2
Plots with floor/ceiling
Review of §2.3 (Functions)
• Function variables f, g, h, …
• Notations: f:AB, f(a), f(A).
• Terms: image, preimage, domain, codomain,
range, one-to-one, onto, strictly (in/de)creasing,
bijective, inverse, composition.
• Function unary operator f 1,
binary operators , , etc., and ○.
• The RZ functions x and x.