Download presentation
Presentation is loading. Please wait.
Published byDwight Lane Modified over 8 years ago
1
1 Lecture 5 Functions
2
2 Functions in real applications Curve of a bridge can be described by a function Converting Celsius to Fahrenheit
3
3 Function Definition 32 Let A and B be nonempty sets. A function f from a set A to a set B is a relation that assigns to each element a in the set A exactly one element b in the set B. The set A is the domain (or set of inputs) of the function f, and the set B contains the range (or set of outputs).
4
4 Example
5
5 Definition 33 Suppose f is a function from A to B, if a A, b B, and f(a)=b, we say that b is the image of a and a is the preimage of b.
6
6 Introduction f a b=f(a) A B f The function f maps A to B b is image of a under function f a is pre-image of b under function f
7
7 Example f(a) = Z the image of d is Z the domain of f is A = {a, b, c, d} the range is {Y, Z} f(a) = {Z} the preimage of Y is b the preimages of Z are a, c and d
8
8 Function as graph We can represent a function mapping pairs (a, f(a)) in a graph. A pair becomes a point in the graph space. By connecting the points in a graph, it becomes line.
9
9 Function as graph Range/Julat domain
10
10 Characteristics of a function from set A to set B Each element of A must be matched with an element of B. Some elements of B may not be matched with any element of A. Two or more elements of A may be matched with the same element of B. An element of A (the domain) cannot be matched with two different elements of B.
11
11 Representations of Functions The graph of a function is a curve in the xy-plane. But the question arises: Which curves in the xy-plane are graphs of functions? This is answered by the following test.
12
12 Representations of Functions If each vertical line x = a intersects a curve only once, at (a, b), then exactly one functional value is defined by f (a) = b. But if a line x = a intersects the curve twice, at (a, b) and (a, c), then the curve can’t represent a function because a function can’t assign two different values to a.
13
13 Which is and which is not a function?
14
14 Algebraic Functions A function f is called an algebraic function if it can be constructed using algebraic operations (such as addition, subtraction, multiplication, division, and taking roots) starting with polynomials. Any rational function is automatically an algebraic function. Here are two more examples:
15
15 Function as Algebra Expression y = 2x 2 + 2 the function maps x to y Domain is all values taken by x Range is values of y produced by x. Must fulfill all the criterion to be a function.
16
16 Function vs Equation Equations Functions a) A function which is not an equation. A function that assign different coloured shapes to their colours. b) An equation which is not a function. y 2 + x 2 = 3 c) An example of both function and equation. y = x + 1
17
17 Example 1 x 2 + y = 1 y = 1 – x 2 Each value of x corresponds to exactly one value of y. So, y is a function of x.
18
18 Example 2
19
19
20
20
21
21
22
22 Introduction Definition 34 Let f be a function from the set A to the set B and let S be a subset of A. The image of S is the subset of B that consists of the images of the elements of S. We denote the image of S by f(S), so that f(S) = {f(s) | s S}
23
23 Example Let A={a, b, c, d, e} and B = { 1, 2, 3, 4} with f(a)=2, f(b) =1, f(c)=4, f(d)=1, and f(e)=1. The image of the subset S = {b, c, d} is the set f(S)= {1, 4}.
24
24 Property of a function One-to-one function – injection Many-to-one function – surjection
25
25 One-to-One functions Definition 35 A function f is said to be one-to-one, or injective, if and only if f(a)=f(b) implies that a=b for all a and b in the domain of f. A function is said to be an injection if it is one-to-one. Note: A function f is one-to-one if and only if f(a) f(b) whenever a b.
26
26 Example 1 a b c d 1 2 3 4 5 A one-to-one function
27
27 Example 2 Determine whether the function f(x)= x 2 from the set of integers to the set of integers is one-to- one. Solution: The function f(x)=x 2 is not one-to-one because, for instance f(1)=f(-1)=1, but -1 1.
28
28 Proving a function is one-to-one Method 1: Direct method Suppose f(x)=f(y) …. therefore x = y. Therefore f is one-to-one.
29
29 Proving a function is one-to-one Method 2: Contrapositive If f(x) = f(y) then x = y. Its contrapositive is If x y, then f(x) f(y). Suppose x y…Therefore f(x) f(y). Therefore f is one-to-one.
30
30 Proving a function is one-to-one Method 3: Contradiction Suppose f(x) = f(y) but x y, obtained the contradiction that f(x) f(y), therefore x = y and f is one-to-one.
31
31 Example Let f: Z by f(x) = 3x + 4. Prove that f is one-to- one. Solution: Direct proof. Suppose f(x)=f(y). Then 3x + 4 = 3y + 4. Solving it we get x = y. Therefore f is one-to-one.
32
32 Example Let f: Z by f(x) = 3x + 4. Prove that f is one-to- one. Contrapositive method: Suppose x y, then f(x) = 3x + 4, and f(y) = 3x + 4. Since x y, f(x) f(y). f is one-to-one.
33
33 Example Let f: Z by f(x) = 3x + 4. Prove that f is one-to- one. Contradiction: Suppose f(x) = f(y) and x y. Consequently 3x + 4 = 3y + 4. Solving it we get x = y which contradict to our assumption x y. Therefore, x must be equal to y. f is one-to-one.
34
34 Onto functions Definition 36 A function f from A to B is called onto, or surjective, if and only if for every element b B there is an element a A with f(a)=b. A function f is called a surjection if it is onto.
35
35 Example a b c d 1 2 3 An Onto function
36
36 Onto functions Example: Is the function f(x) = x 2 from the set of integers to the set of integers onto? Solution: The function f is not onto since there is no integer x with x 2 =-1, for instance.
37
37 One-to-One and Onto functions Example: Is the function f(x)=x + 1 from the set of integers to the set of integers onto? Solution: The function f(x) = x + 1 is a onto function because for arbitrary value of x, we can find a value y such that x = y – 1, such that x is an image of y under function f.
38
38 One-to-One correspondence functions Definition 37 The function f is a one-to-one correspondence, or a bijection, if it is both one-to-one and onto.
39
39 One-to-One correspondence functions Example: Let f be the function from {a, b, c, d} to {1, 2, 3, 4} with f(a) =4, f(b)=2, f(c)=1, and f(d)=3. Is f a bijection? Solution: The function f is one-to-one and onto. It is one-to-one since the function takes on distinct values. It is onto since all four elements of the codomain are images of elements in the domain. Hence, f is a bijection.
40
40 Example Surjection but not an injection
41
41 Example Injection but not a surjection
42
42 Compositions of functions Definition 39 Let g be a function from the set A to the set B and let f be a function from the set B to the set C. The composition of the functions f and g, denoted by f g, is defined by (f g)(a) = f(g(a)). Note: Composition of f g, cannot be defined unless the range of g is a subset of the domain of f.
43
43 Compositions of functions
44
44 Compositions of functions Example: Let g be the function from the set {a, b, c} to itself such that g(a)=b, g(b)=c, and g(c) = a. Let f be the function from the set {a, b, c} to the set {1, 2, 3} such that f(a)=3, f(b)=2, and f(c)=1. Find f g and g f? Solution: (f g)(a) = f(g(a)) = f(b) = 2 (f g)(b) = f(g(b)) = f(c) = 1 (f g)(c) = f(g(c)) = f(a) = 3 g f is not defined, because the range of f is not a subset of the domain of g.
45
45 Compositions of functions Let f(x)= 2x + 3 and g(x) = 3x +2 where both functions are defined from the set of integers to a set of integers. f g = (f g)(x)= f(g(x)) = f(3x + 2) = 2(3x + 2) + 3 = 6x + 7.
46
46 Some important functions
47
47 Some important functions Example:
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.