Skip to content Skip to navigation Skip to collection information

OpenStax_CNX

You are here: Home » Content » Functions » Functions

Navigation

Recently Viewed

This feature requires Javascript to be enabled.
 

Functions

Module by: Sunil Kumar Singh. E-mail the author

Function is a special relation. It is also conceived as a “rule”, because function is a relation between elements of two sets, following certain rule. Every element of a set (say A) is related to exactly one element of other set (say B). This relationship is described as mapping of all elements of one set to elements of another set.

In order to emphasize, we need to enumerate the way “function” relation is special :

  1. Every element of set “A” is related to elements in set “B”.
  2. An element of set “A” is related to exactly one element of “B”.

It can be deduced from the above characterization of a function that the element of set “B” may be paired with none or one or more elements of set “A”.

In order to illustrate function relation, let us consider an example. Let "A" and "B" be two sets as given here :

A = { - 1,0,1,2,3 } A = { - 1,0,1,2,3 }

B = { - 1, 0,1,2,3,4,5,6,7,8,9,10 } B = { - 1, 0,1,2,3,4,5,6,7,8,9,10 }

The two sets are related by the relation :

R = { x , y : y = x 2 1, x A , y B } R = { x , y : y = x 2 1, x A , y B }

The values of “y” for given values of “x” are :

F o r x = 1, y = 1 1 = 0 F o r x = 1, y = 1 1 = 0

F o r x = 0, y = 0 1 = 1 F o r x = 0, y = 0 1 = 1

F o r x = 1, y = 1 1 = 0 F o r x = 1, y = 1 1 = 0

F o r x = 2, y = 4 1 = 3 F o r x = 2, y = 4 1 = 3

F o r x = 3, y = 9 1 = 8 F o r x = 3, y = 9 1 = 8

The relation between two sets is pictorially shown with arrow diagram. We note that all elements of “A” are mapped. Further, elements in “A” are uniquely mapped i.e. they are paired to exactly one element of set “B”. It is, however, possible that few of the elements in set “A” are related to same element in “B” like "-1" and "1" in set "A" are related to "0" in set “B”. In the nutshell, we see that this relation meets both properties as enumerated for a function relation and hence is a function relation.

Figure 1: Every element of set “A” is related to exactly one element in set “B”.
Function relation
 Function relation  (f1.gif)

Looking in reverse direction, we see that elements in “B” may be paired – with no element (1,2,4,5,6,7,9,10) or with one element (-1,3,8) or with more than one element (0) in "A".

We generally drop word “relation” from “function relation” and call it simply as “function”. The function is denoted by a small letter like “f”. To elaborate the direction of function, we expand the symbol as :

f : A B f : A B

This means that function is mapped from “A” to “B”. Now, in order to define the function, we need to understand the concept of “image” and “pre-image” elements. We call first element “x” of set “A” in the ordered pair (x,y) of the function as the “pre-image” of second element “y” of set “B”. The second element “y” of set “B” is called the “image” of the first element “x” of set “A”.

The image is also denoted as “f(x)”. We read “f(x)” as image of “x” under rule “f”. For a particular value of x = a, "f(a)" is a particular instance of image :

f a = b f a = b

Definition 1: Function
A relation “f” is a function, if every element in set “A” has one and only one image in set “B”.

Domain, range and co-domain of function

As all the elements of set “A” are involved, it emerges that that the set of first elements in the ordered pairs i.e. domain set is same as set “A”. We can not say the same for set "B". The set “B” may have other elements than those, which have been mapped with the elements of “A”. The range is simply the set of images of the function. However, as defined earlier, the set “B” is co-domain of the relation and hence that of function in this special case. It is clear that range is a subset of co-domain "B".

Domain of "f" = A Domain of "f" = A

Co-domain of "f" = B Co-domain of "f" = B

Range of "f" = Set of images = { f x : x A } Range of "f" = Set of images = { f x : x A }

Equal functions

Two functions are equal, if each ordered pair in one of the two functions is uniquely present in other function. It means that if “g” and “h” be two equal functions, then :

g x = h x for all x g x = h x for all x

Two functions g(x) and h(x) are equal or identical, if all images of two functions are equal. Further, we can visualize equality of two functions in a negative context. If there exists “x” such that g(x)≠ h(x), then two functions are not equal. We state this symbolically as :

If g x h x , then f h If g x h x , then f h

The important question, however, is that whether equality of functions in terms of equality of images is a sufficient condition? We can see here that two functions can meet the stated condition even if they are constituted by different sets of ordered pair. There may be additional ordered pairs, which are present in one, but not in other.

In order to remove such possibilities, two equal functions should have same domain. This will ensure that set of ordered pairs in two functions are same. We conclude this discussion by saying that two functions are equal, iff

  1. g(x) = h(x) for all “x”
  2. Domain of “f” = Domain of “h”

It is clear that equality of functions, however, do not require that co-domains be equal.

Real function

If the range of a function is a set of real numbers, then the function is called “real valued function”. In other words, if the range of a function is either the set “R” or its subset, then it is a real valued function. We should emphasize here that “R” denotes set of real number and it is not the symbol for relation, which is also denoted as “R”.

Further, we distinguish “real valued function” from “real function”. The very terminology is indicative of the difference. The term “real valued function” means that the value of function i.e. image is real. It does not say anything about “pre-image”. Now, there can be a function, which accepts non-real complex numbers, but maps to a real value.

On the other hand, a real function has both image and pre-image as real numbers. It follows then that the domain of a “real function” is also either a set or subset of real numbers.

Definition 2: Real function
A function is a real function, if its domain and range are either “R” or subset of “R”.

Note:

Our discussion from this point onwards in the course relates to real function only – unless otherwise stated.

Interpretation of function relation

It is intuitive to find similarity of an algebraic equation to the “rule” of a function. Consider an equation,

y = x 2 + 1 y = x 2 + 1

This equation is valid for all real values of “x”. The set of real values of “x”, belongs to set “R”. The set of values of “y” also belongs to set of “R”. On the other hand, the equation itself is the rule that maps two sets comprising of values of “x” and “y”.

Alternatively, we can write the rule also as :

f x = x 2 + 1 f x = x 2 + 1

In terms of rule, we define function, saying that :

f : R R b y f x = x 2 + 1 f : R R b y f x = x 2 + 1

We read it as : “f” is a function from “R” to “R” by the rule given by f x = x 2 + 1 f x = x 2 + 1 .

From this description, we think a function as a relation, which is governed by a specified rule. The rule relates two sets known as domain and co-domain, which are sets of real numbers. One of the quantities “x” is independent of other quantity “y”. The other quantity “y” is a dependent on quantity “x”. In plain words, one of the interpretations is that function relates dependent and independent variables. As a matter of fact, we would attach additional meanings to the concept of function as we proceed to study it in details.

Example

Problem 1 : Let “A” be the set of first three natural numbers. A real function is defined as :

f : A N b y f x = x 2 + 1 f : A N b y f x = x 2 + 1

Find (i) domain of “f” (ii) range of “f” (iii) co-domain of “f” (iv) f(3) and (v) pre-images of 2 and 4.

Solution : Here set “A” is the domain of “f”. Hence,

Domain of "f" = A = { 1,2,3 } Domain of "f" = A = { 1,2,3 }

For determining the range, we need to find images for the each element of the domain as :

For x = 1, f x = x 2 + 1 = 1 2 + 1 = 2 For x = 1, f x = x 2 + 1 = 1 2 + 1 = 2

For x = 2, f x = x 2 + 1 = 2 2 + 1 = 5 For x = 2, f x = x 2 + 1 = 2 2 + 1 = 5

For x = 3, f x = x 2 + 1 = 3 2 + 1 = 10 For x = 3, f x = x 2 + 1 = 3 2 + 1 = 10

Hence, range of function is given as :

Range of "f" = A = { 2,5,10 } Range of "f" = A = { 2,5,10 }

Co-domain of the function is the second set on which the elements of first set are mapped. It is given that “f” is a function from set “A” to set “N”. Hence,

Co-domain of "f" = N Co-domain of "f" = N

The image of set for x = 3 has been already calculated. It is :

f 3 = x 2 + 1 = 3 2 + 1 = 10 f 3 = x 2 + 1 = 3 2 + 1 = 10

For pre-image of f(x) = 2, we have :

f x = 2 = x 2 + 1 f x = 2 = x 2 + 1

x 2 = 1 x 2 = 1

x = 1, - 1 x = 1, - 1

But, only "1" is an element of domain set "A" - not "-1". Hence, "pre-image" of "2" is "1".

For pre-image of f(x) = 4, we have :

f x = 4 = x 2 + 1 f x = 4 = x 2 + 1

x 2 = 3 x 2 = 3

x = 3, - 3 x = 3, - 3

But it is given that domain is first three natural numbers only. Thus, we conclude that “4” has no pre-image.

Numbers of functions

We can find out maximum numbers or total possible numbers of functions that can be generated by the rule from given domain and co-domain sets, provided these sets are finite sets. We have noted that the total numbers of relations generated from Cartesian product of two sets “A” and “B” is given by :

N = 2 p q N = 2 p q

where “p” and “q” are the finite numbers of elements in sets “A” and “B”.

However, function is a special relation, in which each element of set ”A” is related to exactly one element of set “B” - unlike in the case of power set in which we count all possible combinations. Hence, number of possible relations is not same as the numbers of possible functions.

For determining total numbers of functions from two given sets, let us consider that “m” and “n” denote the numbers of elements in domain “A” and co-domain “B” respectively. Then, an element of domain can combine with one of the “n” elements in “B”. Hence, total numbers of such relations for a total of “m” elements in set “A” is :

N f = m X n = m n N f = m X n = m n

Finite and infinite functions

The numbers of elements of ordered pair in the function set is equal to the numbers of elements in domain set. This follows from the fact that every element of domain set “A” is related to an unique element in “B”. Thus, if domain is a finite set, then the resulting function is finite. Consider the earlier example, when A = {1,2,3} and function is defined as :

f : A N b y f x = x 2 + 1 f : A N b y f x = x 2 + 1

The function set is a finite set :

f = { 1,2 , 2,5 , 3,10 } f = { 1,2 , 2,5 , 3,10 }

On the other hand, if we expand this function by defining the relation from the infinite set of natural numbers, “N” to “N”, then resulting set of ordered pair is an infinite set and so is the function :

g : N N b y f x = x 2 + 1 g : N N b y f x = x 2 + 1

The resulting function set, in the set builder form, is given as :

g = { x , y : y = x 2 + 1, w h e r e x , y N } g = { x , y : y = x 2 + 1, w h e r e x , y N }

Function graphs

Here, we shall introduce an alternative way to represent a function. We should be aware that we can define a function even with a graph. Graphical representation of function is intuitive and revealing about their characteristics.

Function is a set of ordered pairs between “x” and “y” from domain and co-domain sets respectively in accordance with certain rule. If we look closely at the function set, then it is easy to realize that the elements of ordered pair (x,y) can be considered to be coordinates “x” and “y” of a planar coordinate system.

We represent independent variable, “x” i.e. the element of domain set “A” as abscissa along x-axis and dependent variable, “y”, i.e. the element of co-domain “B” as ordinate along y-axis. A point on the plot represented by coordinate (x,y) is an instance of or value of the function for a given value of “x”. Compositely, the graph itself is the collection of all such points, which form part of the function set.

For example, we draw a graph, which is defined as :

f : N N b y f x = x , w h e r e x N f : N N b y f x = x , w h e r e x N

In order to plot the function, we evaluate function values for values of “x” :

F o r x = 1, y = 1 F o r x = 1, y = 1

F o r x = 2, y = 2 F o r x = 2, y = 2

F o r x = n , y = n F o r x = n , y = n

Figure 2: The plot is a collection of discrete points.
Function graph
 Function graph  (f2.gif)

Note that plot of the function is a collection of discrete points only.

For the plot to be continuous, it is clear that the domain and co-domain of the function should be set of real numbers. In that case, we can define the function as :

g : R R b y f x = x , w h e r e x R g : R R b y f x = x , w h e r e x R

The corresponding plot is a bisector straight line, passing through the origin, as shown in the figure here :

Figure 3: The plot is a continuous straight line passing through origin.
Function graph
 Function graph  (f3.gif)

Classification of real functions

Real functions can be classified from different point of views. Here, we present few major classifications.

Based on expression types

1: Algebraic function : The function (function rule) consists of algebraic expression, consisting of terms, which are constituted of constants and variables. The variables of algebraic expressions may be raised to a constant exponent. Example :

3 x 2 + 2 x ; x 0 3 x 2 + 2 x ; x 0

2: Transcendental function : The non algebraic functions are called transcendental functions. They include logarithmic, exponential, trigonometric and inverse trigonometric functions etc. Example :

sin x + cos x sin x + cos x

Based on independent and dependent variables

1: Explicit function : A function is an explicit function, if its dependent variable can be expressed in terms of independent variables only. Example :

y = x 2 + 1 y = x 2 + 1

2: Implicit function : A function is an implicit function, if its dependent variable can not be expressed in terms of independent variables only. Example :

x y = sin x + y x y = sin x + y

Collection Navigation

Content actions

Download module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add:

Collection to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks

Module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks