1
Functions
A function f from a set A to a set B is an assignment of exactly one element of B to each element of A.
We write f(a) = b if b is the unique element of B assigned by the function f to the element a of A.
If f is a function from A to B, we write f: AB
(note: Here, ““ has nothing to do with if… then)
2
Functions
If f(A)=B, we say that
A is the domain of f
If f(a) = b, we say that b is the image of a.
The range of f(A)=B is the set of all images of elements of A.
We say that f:AB maps A to B.
3
Functions
Let us take a look at the function f:P C or f(P) = C with
P = {Linda, Max, Kathy, Peter}
C = {Boston, New York, Hong Kong, Moscow} f(Linda) = Moscow f(Max) = Boston f(Kathy) = Hong Kong f(Peter) = New York
Here, the range of f is C.
4
Functions
Let us re-specify f as follows: f(Linda) = Moscow f(Max) = Boston f(Kathy) = Hong Kong f(Peter) = Boston
Is f still a function? yes
What is its range?
{Moscow, Boston, Hong
Kong}
5
Functions
Other ways to represent f: x f(x)
Linda
Moscow
Max
Boston
Hong
Kong
Boston
Kathy
Peter
Linda
Boston
Max
New York
Kathy
Hong
Kong
Peter
Moscow
6
Functions
If the domain of our function f is large, it is convenient to specify f with a formula, e.g.: f:RR f(x) = 2x
This leads to: f(1) = 2 f(3) = 6 f(-3) = -6
…
7
Functions
Let us look at the following well-known function: f(Linda) = Moscow f(Max) = Boston f(Kathy) = Hong Kong f(Peter) = Boston
What is the image of S = {Linda, Max} ? f(S) = {Moscow, Boston}
What is the image of S = {Max, Peter} ? f(S) = {Boston}
8
Function Notation
An equation that is a function may be expressed using functional notation.
The notation f(x) (read “f of (x)”) represents the variable y.
Example: y = 2x + 6 can be written as f(x) = 2x + 6.
Given the equation y = 2x + 6, evaluate when x = 3. y = 2(3) + 6 y = 12
9
Function Notation Cont
For the function f(x) = 2x + 6, the notation f(3) means that the variable x is replaced with the value of 3. f(x) = 2x