Relations and Functions
Relations and Functions
domain = {-1,0,2,4,9}
These are the x values written in a set from smallest to largest
This is a
{(2,3), (-1,5), (4,-2), (9,9), (0,-6)} relation
range = {-6,-2,3,5,9}
1
2
2
4
3
6
4 8
5 10
1
2
2
4
3
6
4 8
5 10
1
2
2
4
3
6
4 8
5 10
1
2
2
4
3
6
4 8
5 10
1
2
2
4
3
6
4 8
5 10
f (− 2) = 2(− 2) − 3(− 2) + 6
2
f (− 2) = 2(4) − 3(− 2) + 6 = 8 + 6 + 6 = 20
f (k ) = 2(k ) − 3(k ) + 6
2
( )
f (k ) = 2 k − 3(k ) + 6 = 2k − 3k + 6
2 2
( )
f (2k ) = 2 4k − 3(2k ) + 6 = 8k − 6k + 6
2 2
g (x ) = x − 2 x
2
g (− 4) = (− 4) − 2(− 4) = 16 + 8 = 24
2
So g (1) + g (− 4) = −1 + 24 = 23
The last thing we need to learn about functions for
this section is something about their domain. Recall
domain meant "Set A" which is the set of values you
plug in for x.
h(x ) = x − 4
Can't be negative so must be ≥ 0
x−4 0 solve
this x4
We have to be careful what x's we use so that the second
"illegal" of square rooting a negative doesn't happen. This
means the "stuff" under the square root must be greater
than or equal to zero (maths way of saying "not negative").
Summary of How to Find the
Domain of a Function
• Look for any fractions or square roots that could cause one
of the two "illegals" to happen. If there aren't any, then the
domain is All real numbers x.
• If there are fractions, figure out what values would make the
bottom equal zero and those are the values you can't use.
The answer would be: All real numbers x such that x ≠
those values.
• If there is a square root, the "stuff" under the square root
cannot be negative so set the stuff ≥ 0 and solve. Then
answer would be: All real numbers x such that x is defined
by whatever you got when you solved.
NOTE: Of course your variable doesn't have to be x, can be
whatever is in the problem.
Functions
19
Definition of a function
• A function takes an element from a set and maps it to a UNIQUE
element in another set.
20
Function terminology
f maps R to Z
R f Z
Domain Co-domain
f(4.3)
4.3 4
21
More functions
A pre-image The image
Domain Co-domain of 1 of A
Ali A “a” 1
Bob B “bb“ 2
Chris C “cccc” 3
Dave D “dd” 4
Emma F “e” 5
22
Even more functions
Range
a 1 “a” 1
e 2 “bb“ 2
i 3 “cccc” 3
o 4 “dd” 4
u 5 “e” 5
23
Function arithmetic
• Let f1(x) = 2x
• Let f2(x) = x2
24
One-to-one functions
• A function is one-to-one if each element in the co-domain has a
unique pre-image
a 1 a 1
e 2 e 2
i 3 i 3
o 4 o 4
5 5
25
More on one-to-one
• Injective is synonymous with one-to-one
• “A function is injective”
• A function is an injection if it is one-to-one
a 1
• Note that there can
e 2
be un-used elements
i 3
in the co-domain
o 4
5
A one-to-one function
26
Example
Let f (x ) = 3x − 7 , g ( x ) = −5x + 3 where f , g : → ., Find:
(a) f ( −3), g (0.2), f (0) (b) f + g ( x ) (c) f + g (−5)
Solution
(a) f (−3) = 3(−3) − 7 = −9 − 7 = −16
g (0.2) = −5(0.2) + 3 = −1 + 3 = 2
f (0) = 3(0) − 7 = 0 − 7 = −7
(b) f + g (x ) = f (x ) + g (x )
= (3x − 7) + (−5x + 3)
= (3x − 5x ) + (−7 + 3) = −2x − 4
Solution
Let f (x ) = f ( y )
x =y
f (x ) is one-to-one.
Example
Is f (x ) = x 2 + 1 where f : → , a one-to-one function.
Solution
Let f (x ) = f ( y )
x = y
f (x ) is not one-to-one.
NOTE
to clear the previous example
f (3) = (3) 2 + 1 = 9 + 1 = 10
f (−3) = (−3) 2 + 1 = 9 + 1 = 10
f ( x) + g ( x) f ( x) − g ( x)
(5 x 2 − 2 x + 3) + (4 x 2 + 7 x − 5) (5 x 2 − 2 x + 3) − (4 x 2 + 7 x − 5)
5x 2 + 4 x 2 − 2 x + 7 x + 3 − 5 5x 2 − 4 x 2 − 2 x − 7 x + 3 + 5
9x 2 + 5x − 2 x 2 − 9x + 8
Example:
Example: Let f(x) = 5x² and
and g(x) = 3x – 1.
• Find f · g • Find f/g
f (x ) g (x ) f (x )
, where g ( x ) 0
5 x (3x − 1)
2 g (x )
2
5 x (3x ) − 5 x (1)
5x 1
2 2
, where x
3x − 1 3
15x − 5 x3 2
Example:
Example: f(x)=2x + 3 and g(x) = x -7
f g
Find ( x ) Find ( x )
g f
2x + 3 x−7 3
, x7 , x−
x−7 2x + 3 2
Function Operations
Addition : ( f + g )( x) = f (x ) + g (x )
Multiplication : ( f g )(x ) = f (x ) g (x )
Subtraction : ( f − g )(x ) = f (x ) − g (x )
f f (x )
Division : (x ) = where g(x ) 0
g g (x )
Adding and Subtracting Functions
Let f (x ) = 3x + 8 and g(x ) = 2 x − 12.
Find f + g and f - g
( f + g )( x) = f (x ) + g (x ) ( f − g )( x) = f (x ) − g (x )
= (3x + 8) + (2 x − 12) = (3x + 8) − (2 x − 12)
= 5x − 4 = x + 20
Find f g
( f g )( x ) = f ( g ( x ))
Ex: f(x)=2x + 5 and g(x) = x - 3
• You can work out a single “rule” for the composite function in
terms of x. g ( f ( x))
Find ( f g )( x ) ( g f )( x ) = g (2 x + 5)
= (2 x + 5) − 3
= 2x + 2
• Do you think ( f g )(x) will give you the same result?
( f g )(x ) = f (x − 3)
= 2( x − 3) + 5 NO!
= 2x − 6 + 5
= 2x −1
REMEMBER ( g f )( x ) = 2 x + 2
You Try….
f(x) = 2x + 2 g(x) = (x + 2)2
= 4 x + 8 x + 8 x + 16
2 = 2x 2 + 8x + 10
= 4 x 2 + 16x + 16
You may need to evaluate a composite function for a
particular value of x.
f ( x ) = 5 − 3 x and g ( x ) = x 2 + 4 . Find ( f g )(3 ).
Method 1:
Work out the ( f g )(x ) = 5 − 3(x 2 + 4)
composite = −3 x 2 − 7
function.
Then substitute
3 for x.
( f g )(3) = −3(3)2 − 7
= −27 − 7
= −34
You may need to evaluate a composite function for a
particular value of x.
f ( x ) = 5 − 3 x and g ( x ) = x 2 + 4 . Find ( f g )(3 ).
g (3) = (3) + 4 = 13
Method 2: 2
Substitute 3 into
g(x).
Method 1: Method 2:
(g f )(− 5) = (− 5 − 2) 2
= g (−7)
= (−7) = 49
2
= (−7) = 49
2