Mathematics

Post on 06-Jan-2016

25 views 1 download

description

Mathematics. Session. Set, Relation & Function Session - 3. Session Objectives. Session Objectives. F unction definition D omain, codomain and range S tandard real functions T ypes of functions N umber of various types of functions C omposition of functions I nverse of element - PowerPoint PPT Presentation

Transcript of Mathematics

Mathematics

Session

Set, Relation & FunctionSession - 3

Session Objectives

Session Objectives

1. Function definition

2. Domain, codomain and range

3. Standard real functions

4. Types of functions

5. Number of various types of functions

6. Composition of functions

7. Inverse of element

8. Inverse of function

Function

Let A and B be two non-empty sets having m and n elements respectively, then the number of relations possible from A to B is 2mn. Out of these 2mn relations some are called function (or mappings) from A to B provided following two conditions hold in the relation:

(i) All the elements of A are associated to elements of B.

(ii) Each element of A is associated to one and only one element of B, i.e. no element of A is associated to two (or more) elements of B.

Function ‘f’ from set A to set B associateseach element of A to unique (i.e. one andonly one) element of B denoted by (read as ‘f from A to B’)f : A B

Definition

Observations:

(i) A relation from A to B is not a function if it either violates condition 1 or 2 or both, i.e. either some element of A is not associated to element of B or some element of A is associated to more than one elements of B or both.

(ii) In a function from A to B, two elements of A can be associated to one element of B (examples R7, R10)

Observations(i) A relation from A to B is not a function

if it either violates condition 1 or 2 or both, i.e. either some element of A is not associated to element of B or some element of A is associated to more than one elements of B or both.

(ii) In a function from A to B, two elements of A can be associated to one element of B (examples R7, R10) A B

Valid forfunction

A B

Not valid forfunctions but valid for

relations (iii) If be the function, theno(f) = o(A) and Dom(f) = A.

f :A B

Domain, Codomain and Range of a Function

Let be the function, then set ‘A’is called the domain of f and set ‘B’ iscalled the codomain of f. The set ofthose elements of B which are relatedby elements of A is called range of f or image of set A under f and isdenoted by f(A), i.e. Range of f.

f :A B

f A f a |a A

Clearly, f A B.

Domain, Codomain and Range of a Function

For example:

1

2

A BR7

a

b

Dom (R7) = {a, b},Codomain = {1, 2}Range (R7) = {1}

1

2

A BR8

a

b

Domain (R8) = {a, b}Codomain (R8) = {1, 2}Range (R8) = {1, 2} = Codomain (R8)

Domain, Codomain and Range of a Function

For example:

1

2

A BR7

a

b

Dom (R7) = {a, b},Codomain = {1, 2}Range (R7) = {1}

1

2

A BR8

a

b

Domain (R8) = {a, b}Codomain (R8) = {1, 2}Range (R8) = {1, 2} = Codomain (R8)

Equal Functions

Two functions f and g are said to be equal iff

(i) Dom (f) = Dom (g)

(ii) Codom (f) = Codom (g)

If all these three conditions holds, thenwe can write f = g.

(iii) or Dom (g) f x g x x Dom f

Mathematical Way to Prove a Relation to be a Function

If A and B be two non-empty sets,f be the relation from A to B (i.e. ),then f is function from A to B if

f A B

(i) and a A b B st. a, b f

(ii) x y f x f y for any x, y A

Some Standard Real Functions and Their Graphs

Real functions

Functions in which both domain and codomain are the subsets of R, i.e. set of real numbers.

a b c

v

u

w y f x : a, c R, then

Domain of f is [a, c]

Codomain is R

Range is [u, w]

Some Standard Real Functions and Their Graphs

Constant function: f(x) = c

Let f : R R be the real function defined as f x c x R for some c R

Dom (f) = R, Codomain (f) = R,Range (f) = {c}

y

xO

(0, c) y = f(x) = c

Note: f : A B is constantfunction if f(a) = cfor some

a A,c B.

Some Standard Real Functions and Their Graphs

Identity function: f(x) = x

Let f : R R be the real function defined as f x x x R

Dom (f) = RCodomain (f) = RRange (f) = R

x

y

O

y = f(

x) =

x

Note: f : A A given by f(a) = a is identity function denotedby (same as identity relation)

a A

AI

Some Standard Real Functions and Their GraphsModulus function: f(x) = |x|

Let f : R R be the real function defined as

x, x 0f x x

x, x 0

Domain (f) = R, Codomain (f) = R,

Range (f) = (as ) x|x R, x 0 0, x 0

= set of non-negative real numbers.

x

y

O

f(x) = x

y = xy = – x

x < 0 x 0

Some Standard Real Functions and Their GraphsGreatest integer function: f(x) = [x]

Let f : R R be the real function defined as f x x x R

= greatest integer less than or equal to x.

For example:

[2.1] = 2, i.e. greatest integer less than or equal to 2.1 is 2, similarly

[–2.1] = –3

[2] = 2

[3 . 9] = 3

[–3 . 9] = –4

Some Standard Real Functions and Their Graphs

Hence [x] = 0

= 1

= 2

and so on.

0 x 1

1 x 2

2 x 3

Also [x] = –1

= –2 and so on.

Combining we get [x] = n for

1 x 0

2 x 1

n x n 1 n z

3

2

1

1 2 3 44 3 2 1– – – –1

2

3

O x

y

y = [x]

Some Standard Real Functions and Their Graphs

Filled circle means, point is on the graph.

1

2

3

4

4

3

2

1

1 2 3 44 3 2 1– – – – O x

y

y = [x]

unfilled circle means, point is not on the graph.

Dom(f) = R, Codomain (f) = R

Range (f) = z

Some Standard Real Functions and Their Graphs

Exponential function: f(x) = ax

Let f : R R be the real function defined as xf x a x R and a 0, a 1, a R

i.e. a 0, 1 1,

Case I: Let 0 < a < 1

Say , then 1

a2

xx

1y a

2

x0123–1–2–3

y1 2481

2

1

41

8

4

3

2

1

1 2 3 43 2 1– – – O x

y

y = ax

0 < a <1

Some Standard Real Functions and Their Graphs

Case II: Let a > 1

Say a = 2, then

y = ax = 2x

0123–1–2–3

12481

2

1

4

1

8

4

3

2

1

1 2 3 43 2 1– – – O x

y

y = ax

1 < a

4–

Some Standard Real Functions and Their Graphs

Domain (f) = R, Codomain (f) = R,Range (f) = 0,

Special case

a = e > 1

y = f(x) = ex 3

2

1

1 2 32 1– – O x

y

y = ex

Some Standard Real Functions and Their Graphs

Logarithmic function: y = logbx

Let be the real function defined as f : 0, R

bf x log x x 0 and b 0, b 1, b R

i.e. b 0, 1 1,

Case 1: 0 < b < 1

x b 1y 1 0 1

O x

y

1b

y = l o g b x0 < b < 1

Some Standard Real Functions and Their Graphs

Case 2: 1 < b

x 1 by 0 1

1

O x

y

1 b

y = l o g b x

b < 1Domain (f) = Codomain (f) = R

Range (f) = R

Types of Functions

One-one function (or injective)

A function is said to be one-onefunction or injective if different elementsof A have different images in B, i.e. if

f : A B

a, b A s.t. a b f a f b

Thus iff f : A B is 1 1

a b f a f b a, b A

or f a f b a b a, b A

Types of Functions

For example: Let be thefunction given by

f : a, b 1, 2

1

2

A Bf : A B

a

b(i) (ii)

1

2

A Bf : A B

a

b

(iii) 1

2

A Bf : A B

a

b(iv)

1

2

A B

a

b

f : A B

Types of Functions

Here only (ii) and (iii) are one-one functions

Hence (i) and (iv) are not one-one functions.

In (i) a b but f a f b 1

In (iv) a b but f a f b 2

(i) To check injectivity of functions Let f(x) = f(y) if it gives x = y only, then f is a one-one function.

Observation:

(ii) is true for all the functions (condition 2) but its converse is true for one-one function.

x y f x f y

Types of Functions

(iii) Injectivity of f(x) can also be checked by itsgraph. If all lines parallel to x-axis cut f(x) innot more than one point, then f(x) is one-onefunction, i.e. f(x) is not a one-one function ifat least one line parallel to x-axis cuts f(x)in more than one point.

(iv) If f : A B is 1 1,then o A o B

Types of Functions

Alternative: f(1) = f(–1) = 1 but 1 1

Using graphs

(i)

y

xO

y =

f(x) =

2x

Clearly, any line parallel to x-axis cuts f(x) = 2xonly at one point, thus f(x) is one-one.

Types of Functions

(ii)

– 2 2

4 f(x) = x2y = 4

y

xO

Clearly, y = 4 cuts y = x2 intwo points hence f(x) = x2

is not one-one

(iii)– 1 1

1

y = x

y

xO

— —

Clearly, y = 1 cuts y = |x|in two points hence f(x) = |x|is not one-one.

Types of Functions

Many-one function

A function which is not one-oneis many-one function, i.e. at least twodifferent elements of A have sameimage in B or s.t. Butf(x) = f(y).

f : A B

x, y A x y

For example: given by , are both many-one functions as .

f, g : R R 2f x x or g x x x R

2 2 but f 2 f 2 4 or g 2 g 2 2

Types of Functions

Onto function (or surjective)

A function is said to be ontofunction or subjective if all theelements of B have preimage in A,i.e. for each

f : A B

b B some a A st f a b or a, b f

i.e. A function is not onto if s.t. thereis no for which f(a) = b.

b Ba A

Types of Functions

For example:

Let be the function given by f : a, b 1, 2

(i) 1

2

A Bf

a

b(ii)

1

2

A Bf

a

b

(iii) 1

2

A Bf

a

b(iv)

1

2

A B

a

b

f

Types of FunctionsHere functions (ii) and (iii) are onto functions as all the elements of B have pre-image in A.

In (i) have no pre-image in A and in(iv) have no pre-image in A, thus notonto functions.

2 B1 B

Observations:

(i) is onto function iff : A BRange (f) = Codomain (f) = B

Proof: (by definition) let ,then if f is onto it has pre-image in A

Range f Codomain f b B

(As range (f) contains those elementsof B which have pre-image in A).

b Range f

Types of Functions

Hence codomain (f)

Range (f) = Codomain (f)

(ii) To check surjectivity of function take some and follow the steps given below:

f : A B,y B

Step 1: Let f(x) = y

Step 2: Express x in terms of y from above equation say x = g(y)

Step 3: Now find the domain of g, if Dom (g) = Codomain (f) (i.e. B) then f is onto (or surjective)

(iii) If is onto, then f : A B o A o B

Types of Functions

Into function

A function which is not onto is into function, i.e. at least one element of B have no pre-image in A or such that there is no for which f(a) = b.

f : A B

b B

So in example given above, functions, (i) and(iv) are into functions.

Bijective function (or one-one and onto)

A function is said to be bijective if it isinjective as well as surjective, i.e.one-one as well as onto.

Types of Functions

In other words is bijective iff : A B

(i) f is one-one, i.e. and f x f y x y

(ii) f is onto, i.e. for each some st f(a) = b or

b Ba A

Range (f) = Codomain (f)

A B

a1a2

an

b1b2b3bn

f

Types of Functions

Observations:

(i) A function is not bijective if it is eithernot injective or not surjective or notboth.

(ii) If f is bijective, then it is injective o A o B

and surjective o A o B

Hence o(A) = o(B).

Number of Functions of Various Types

Let A and B be two non-empty sets, leto(A) = m, o(B) = n and be thefunction from A to B

f : A B

Number of functions from A to B

Each element of A can be associated to nelements of B, so total number of functionsthat can be formed from A to B isn × n × ... × n (m times), i.e. nm. Hencetotal number of functions from A to B = o A

o B

Number of Functions of Various Types

Number of functions from A to B

(i) Every function is a relation but not vice versa.

(ii) If A and B are two non-empty sets such that o(A) = m, o(B) = n, then number of relations possible from A to B is 2mn and number of functions possible from A to B is nm.

(iii) Number of relations from A to B which are not functions is 2mn – nm or .

o Ao A .o B2 o B

Number of Functions of Various Types

Number of one-one functions from A to B

Out of nm functions, from A to B some are one-one functions. Now if we order the elements of A from 1 to m say first, second, ..., mth then for first element of A we have n choices from set B, for second we have (n – 1) choices from set B (as function has to be one-one) and so on. Thus total number of one-one functions possible from A to B is n (n – 1) (n – 2) ... (n – m + 1), i.e. Here note that m has to be less than or equal to n, i.e. otherwise if m is greater than n, i.e. no 1-1 function is possible from A to B (as in that case first n elements of A will be associated to n elements of B and still m – n elements of A remains to be associated).

Hence number of 1-1 functions from A to B.

nmP . o A o B

o A o B

nmP if m n

0 m n

Number of Functions of Various Types

Observations:

(i) Out of functions from A to B, functions are one-one (provided ).

mn nmPm n

(ii) If functions from A to B are many-one functions.

m n, m nmn P

(iii) If m > n, then all the nm functions are many-one functions.

Number of Functions of Various Types

Number of bijective functionsfrom A to B

A function is bijective iff function is 1-1 as well as onto. This implies o(A) = o(B),i.e. m = n.

Hence for first element of A we have n options, for second we have (n – 1) options and so on, for last we have only one option.

Therefore, total number of bijective functions from A to B is

n (n – 1) ... 2.1 = n!

Number of Functions of Various Types

Show all bijective functions fromwhere A = {a, b, c} and B = {x, y, z}

A B;

a

b

c

x

y

z

a

b

c

x

z

y

a

b

c

y

x

z

a

b

c

y

z

x

a

b

c

z

x

y

a

b

c

z

y

x

Hence number of bijective functions n! if m n

0 if m n

Number of Functions of Various Types

Observations:

(i) If o(A) = o(B) and function is 1-1, then function is onto also and hence bijective.

(ii) If o(A) = o(B) and function is onto, then function is 1-1 also and hence bijective.

Composition of Functions

Let be two functions, then function gof : defined as

is called the composition of f and g

f : A B and g : B CA C

gof x g f x x A

A Bf

x

C

f (x)

g

gof

g f(x) Observations:

(i) For gof to exist, range of f must be subset of domain of g.

(ii) Similarly for fog to exit, range of g must be subset of domain of f.

Composition of Functions

Properties of composition of functions

(i) Composition of functions is non commutative, i.e. Note that its possible that fog may not exist even if gof exists.

fog gof

(ii) Composition of functions is associative, i.e.f, g, h be three functions.Then (fog) oh = fo (goh) (provided they exist)

(iii) If f and g are bijections, then gof is also a bijection (provided exist)

(iv) Composition of identity function with any function f : is f itself, i.e. .A B A AI of foI f

Inverse of Element

Let be the function fromA to B, then for any if f(a) = b,then a is called the pre-image of ‘b’or inverse of ‘b’ denoted by f–1(b).

f : A Ba A,

For example: Let be given by,f : A B

A B

a1a2

a4

b1b2b3

f

a3

11 1 2then f b a , a

12 3 4f b a , a

13f b

Note: Inverse of an element maynot be unique.

Inverse of Function

If be a bijective function,then we can define a new functionfrom B to A as inverse of f denotedby given by

f : A B

1f : B A

1f b a if f a b b B

i.e. each element of B is associated(or mapped) to its pre-image under f

A Bf : A B

a =(b)f

–1f (a)= b

f–1

: B A

Inverse of Function

How to find f–1

If is a bijective function, thenf–1 can be obtained using following steps:

f : A B

(i) Let y = f(x)

(ii) Express x in terms of y, say x = g(y)

(iii) Interchanging x with y, i.e. , we get y = g(x). Then g = f–1

x y

Note that before finding f–1, you have to provethat f is a bijective function (i.e. 1-1 as well asonto) by using the rules given before.

Inverse of Function

Properties of inverse function

(i) Function is invertible iff it is bijective.

(ii) Inverse of bijection is unique.

(iii) Inverse of bijection is also bijection.

(iv) If is a bijection, then f : A B 1 1

A Bf o f I and fof I

where are identity functions on A andB respectively,

A BI and I

i.e. 1 1f o f a a and f o f b b a A and b B

Inverse of Function

Corollary: If is bijection, then .

f : A A 1 1

Af o f f o f I

(v) If be two bijections, then inverse of gof : is given by

f : A B and g : B CA C

1 1 1gof f o g

(vi) If be two functions such that , then f and g are bijections and g = f–1

f : A B and g : B A A Bgof I and fog I

(vii) Domain (f) = Range (f–1) and Range (f) = Domain (f–1)

Class Test

Class Exercise - 1

f and h are relation from A to B whereA = {a, b, c, d}, B = {s, t, u} definedas follows:f(a) = t, f(b) = s, f(c) = sf(d) = u, h(a) = s, h(b) = th(c) = s, h(a) = u, h(d) = u

Which one of the following statements is true?(a) f and h are functions(b) f is a function and h is not a function(c) f and h are not functions(d) None of these

SolutionA B

a

b

c

d

s

t

u

f

Each element of A is associated tounique element of B, hence f is afunction. A B

a

b

c

d

s

t

u

h

Each element of A is associated to elements of B but is associated to two elements of B namely s and u violating second condition.

Hence h is not a function.

Ans. (b)

a A

Class Exercise - 2

The function (N is the set of natural numbers) defined by f(n) = 2n + 3 is

(a) surjective(b) injective(c) bijective(d) None of these

f : N N

Solution

Check one-one

Let f(m) = f(n)

2m + 3 = 2n + 3

m = nHence one-one

Let 2 N.

If f(n) = 2 2n 3 2

1

n N2

There is no pre-image of .2 N

Hence not onto.

f is injective only.

f is injective only.

Note that 2n + 3 is always odd and range = {5, 7, 9, ...}.

Hence, answer is (b).

Class Exercise - 3

The function defined byf(x) = (x – 1) (x – 2) (x – 3) is

(a) one-one but not onto(b) onto but not one-one(c) both one-one and onto(d) neither one-one nor onto

f : R R

Solution

Check for one-one

Let f(x) = f(y),

i.e. (x – 1) (x – 2) (x – 3) = (y – 1) (y – 2) (y – 3)

(x – 1) (x2 – 5x + 6) = (y – 1) (y2 – 5y + 6)

3 2 3 2x 6x 11x 6 y 6y 11y 6

3 3 2 2x y 6 x y 11 x y 0

2 2x y x y xy 6 x y 11 0

2 2x y x y xy 6x 6y 11 0

2 2x y or x x y 6 y 6y 11 0

26 y 3y 12y 8i.e. x = y or x

2

Solution contd..

Not one-one

Check for onto

Let b R (Codomain).

Let f(a) = b.

i.e. (a – 1) (a – 2) (a – 3) = b

This is cubic in ‘a’ hence there exist at leastone real root of a (as complex roots occur in pair) f is onto.

f is onto but not one-one

Solution contd..

Alternate method:

Draw the graph off(x) = (x – 1) (x – 2) (x – 3)

0 1 2 3 x

y

–6

b

a

y = f(x)Clearly f is not one-oneas line parallel to x-axiscuts the curve in morethan one point and anyline parallel to x-axis(in the codomain) mustcuts the curve.

Class Exercise - 4

Let defined as

check f for

one-one, onto.

f : 0, 1, 2, ... 0, 1, 2, ...

n 1, n is evenf n

n 1, n is odd

SolutionCheck for one-one.

Let f(x) = f(y) for some x, y 0, 1, 2, ...

Case 1: x, y both even

x 1 y 1

x y

Case 2: x even, y odd

x 1 y 1

y x 2

If x is even, y cannot be odd.

Case 3: x odd, y even

x –1 = y + 1

x = y + 2

If y is odd, x cannot be even.

Not possible

Case 4: x odd, y odd x 1 y 1 x y

Hence x = y f is 1–1

Solution contd..

Check for onto

f : {0, 1, 2, ...} {0, 1, 2, ...}f(0) = 0 + 1 = 1 0 is even

f(1) = 1 – 1 = 0 1 is odd

f(2) = 2 + 1 = 3 2 is even

f(3) = 3 – 1 = 2 3 is even

Range = {0, 1, 2, ...} = Codomain

f is onto

Hence f is one-one, onto

Class Exercise - 5

Show that defined byf((a, b)) = (b, a) is bijection

f : A B B A

a A and b B.

Solution

Check one-one

1 1 2 2Let f a , b f a , b .

1 1 2 2b , a b , a

1 2 1 2b b and a a

1 1 2 2a , b a , b

Hence one-oneCheck onto

Let where ,

then f((a, b)) = (b, a)

b, a B A b B, a A f is onto

Hence f is bijective.

Class Exercise - 6

The number of surjections fromA = {1, 2, ..., n}, onto B = {a, b} is

(a) nP2 (b) 2n – 2(c) 2n – 1(d) None of these

n 2

Solution

O(A) = n, O(B) = 2

n 2 o A o B

Hence number of surjections (onto) functions

o B

o(A)r o Br

r 0

1 C o B r

2

r n2 2 n 2 nr 0 1

r 0

1 C 2 r C 2 C 1 0

n2 2

Solution contd..

Alternative method:

Total number of functions from A to B is 2n. Number of functions which are not onto, i.e. all the elements of A are either associated to ‘a’ or ‘b’ is 2.

A B

1

2

n

a

b

f1

or

A B

1

2

n

a

b

f2

Onto functions = 2n – 2.

Class Exercise - 7If the functions f and g are defined fromthe set of real numbers R to R such that , then findfunctions fog and gof. Also find xf x e and g x 3x 2

1 1fog and gof .

Solution

(fog) (x) = f(g(x))

= f (3x – 2)

3x 2e

(gof) (x) = g(f(x))

xg e

x3e 2

1 3x 2fog let y eTo find

e3x 2 log y

elog y 2

x3

1 elog x 2

x y we get fog3

1 xgof let y 3e 2To find

1e e

y 2 x 2x log gof log

3 3

Class Exercise - 8

If f(x) = sin2x + sin2

, then

(gof) (x) =

(a) 1 (b) 0(c) sinx (d) None of these

5x cos x cos x and g 1

3 3 4

Solution(gof) (x) = g(f(x))

As g(x) is defined only for hence

we cannot find g(f(x)) in general, until

and unless f(x) turns out to be for all x.

5

x ,4

54

Now simplify f(x).

2 2f x sin x sin x cos xcos x3 3

22sin x sinxcos cos x . sin

3 3

cosx cosxcos sinxsin

3 3

Solution contd..

2

2 2sin x 3 3sin x cos x sinxcos x

4 4 2

2

2 2cos x 3 5 5sinxcosx sin x cos x

2 2 4 4

5g f x g 1

4

Hence, answer is (a).

Class Exercise - 9

If f: {1, 2, 3, ...} is defined by

y = f(x) = , then

(a) 100 (b) 199(c) 201 (d) 200

0, 1, 2, ...

xif x is even

2x 1

if x is odd2

–1f 100

Solution

1Let f 100 x

i.e. f(x) = 100

If x is even, then f(x) = x

1002

x 200 1, 2, 3, ...

x 1If x is odd, then f x 100

2

x – 1 = –200

x 199 1, 2, 3, ...

1f 100 200 Hence, answer is (d).

Class Exercise - 10

If such that ,

then

f : 0, R 3f x log x

1f x

(a) (b)

(c) (d)

xlog 3 x3

x31

x3

Solution

3y log x base 1 then

Domain = 0,

Codomain = R

Range = R = Codomain

Onto function

Let f(x) = f(y)

3 3log x log y x y

Hence f is one-one.

1f x exist

Step 1:

3Let y log x

Step 2:

yx 3

Step 3:

x y we get xy 3

1 xf x 3

Thank you