Understanding Functions in Mathematics: Definitions, Illustrations, and Examples

Functions in Mathematics: Definition, Illustration, and Examples

Functions - Definition, Illustration, Example, Solution

Introduction to Functions

Among several relations that exist between two non-empty sets, some special relations are important for further exploration. Such relations are called “Functions”.

Illustration 8

A company has 5 employees in different categories. If we consider their salary distribution for a month as shown by arrow diagram in Fig.1.11, we see that there is only one salary associated for every employee of the company.

Arrow diagram showing employee salary distribution

Here are various real life situations illustrating some special relations:

  1. Consider the set A of all of your classmates; corresponding to each student, there is only one age.
  2. You go to a shop to buy a book. If you take out a book, there is only one price corresponding to it; it does not have two prices corresponding to it. (of course, many books may have the same price).
  3. You are aware of Boyle’s law. Corresponding to a given value of pressure P, there is only one value of volume V.
  4. In Economics, the quantity demanded can be expressed as \(Q = 360 - 4P\), where P is the price of the commodity. We see that for each value of P, there is only one value of Q. Thus the quantity demanded Q depend on the price P of the commodity.

We often come across certain relations, in which, for a given element of a set A, there is only one corresponding element of a set B. Such relations are called functions. We usually use the symbol f to denote a functional relation.

Definition

A relation f between two non-empty sets X and Y is called a function from X to Y if, for each \(x \in X\) there exists only one \(y \in Y\) such that \((x, y) \in f\).

That is, \(f = \{(x,y)| \text{ for all } x \in X, y \in Y \}\).

Diagram defining a function from set X to set Y

A function f from X to Y is written as \(f: X \to Y\).

Comparing the definitions of relation and function, we see that every function is a relation. Thus, functions are subsets of relations and relations are subsets of cartesian product.

A function f can be thought as a mechanism (or device), which gives a unique output \(f(x)\) to every input x.

Notes

If \(f: X \to Y\) is a function then

  • The set X is called the domain of the function f and the set Y is called its co-domain.
  • If \(f(a) = b\), then b is called ‘image’ of a under f and a is called a ‘pre-image’ of b.
  • The set of all images of the elements of X under f is called the ‘range’ of f.
  • \(f: X \to Y\) is a function only if
    1. every element in the domain of f has an image.
    2. the image is unique.
  • If A and B are finite sets such that \(n(A) = p\), \(n(B) = q\) then the total number of functions that exist between A and B is \(q^p\).
  • In this chapter we always consider f to be a real valued function.
  • Describing domain of a function
    1. Let \(f(x) = \frac{1}{x + 1}\). If \(x = -1\) then \(f(-1)\) is not defined. Hence f is defined for all real numbers except at \(x = -1\). So domain of f is \(\mathbf{R} - \{-1\}\).
    2. Let \(f(x) = \frac{1}{x^2 - 5x + 6}\). If \(x = 2, 3\) then \(f(2)\) and \(f(3)\) are not defined. Hence f is defined for all real numbers except at \(x = 2\) and \(3\). So domain of f = \(\mathbf{R} - \{2, 3\}\).

Illustration 9 - Testing for functions

Representation by Arrow diagram

Arrow diagrams illustrating functions vs. non-functions

Functions play very important role in the understanding of higher ideas in mathematics. They are basic tools to convert from one form to another form. In this sense, functions are widely applied in Engineering Sciences.

Note: The range of a function is a subset of it’s co-domain.

Example 1.6

Let \(X = \{1, 2, 3, 4\}\) and \(Y = \{2, 4, 6, 8,10\}\) and \(R = \{(1,2),(2,4),(3,6),(4,8)\}\). Show that R is a function and find its domain, co-domain and range?

Solution

Pictorial representation of R is given in Fig.1.14. From the diagram, we see that for each \(x \in X\), there exists only one \(y \in Y\). Thus all elements in X have only one image in Y. Therefore R is a function.

Arrow diagram for Example 1.6

Domain X = {1,2,3,4}; Co-domain Y = {2,3,6,8,10}; Range of f = {2,4,6,8}.

Example 1.7

A relation ‘f’ is defined by \(f(x) = x^2 - 2\) where, \(x \in \{-2, -1, 0, 3\}\)

(i) List the elements of f

(ii) Is f a function?

Solution

\(f(x) = x^2 - 2\) where \(x \in \{-2, -1, 0, 3\}\)

(i) \(f(-2) = (-2)^2 - 2 = 2\); \(f(-1) = (-1)^2 - 2 = -1\)

\(f(0) = (0)^2 - 2 = -2\); \(f(3) = (3)^2 - 2 = 7\)

Therefore, f = {(-2, 2), (-1,-1), (0,-2), (3, 7)}

(ii) We note that each element in the domain of f has a unique image. Therefore f is a function.

Example 1.8

If \(X = \{-5,1,3,4\}\) and \(Y = \{a,b,c\}\), then which of the following relations are functions from X to Y?

(i) \(R_1 = \{(-5,a), (1,a), (3,b)\}\)

(ii) \(R_2 = \{(-5,b), (1,b), (3,a),(4,c)\}\)

(iii) \(R_3 = \{(-5,a), (1,a), (3,b),(4,c),(1,b)\}\)

Solution

(i) \(R_1 = \{(-5,a), (1,a), (3,b)\}\)

We may represent the relation \(R_1\) in an arrow diagram (Fig.1.15(a)).

Arrow diagram for R1

\(R_1\) is not a function as \(4 \in X\) does not have an image in Y.

(ii) \(R_2 = \{(-5,b), (1,b), (3,a),(4,c)\}\)

Arrow diagram of R2 is shown in Fig.1.15(b).

Arrow diagram for R2

\(R_2\) is a function as each element of X has an unique image in Y.

(iii) \(R_3 = \{(-5,a), (1,a), (3,b),(4,c),(1,b)\}\)

Representing \(R_3\) in an arrow diagram (Fig.1.15(c)).

Arrow diagram for R3

\(R_3\) is not a function as \(1 \in X\) has two images \(a \in Y\) and \(b \in Y\).

Note that the image of an element should always be unique.

Example 1.9

Given \(f(x) = 2x - x^2\),

find (i) \(f(1)\) (ii) \(f(x+1)\) (iii) \(f(x) + f(1)\)

Solution

(i) Replacing x with 1, we get

\(f(1) = 2(1) - (1)^2 = 2 - 1 = 1\)

(ii) Replacing x with \(x+1\), we get

\(f(x+1) = 2(x + 1) - (x + 1)^2 = 2x + 2 - (x^2 + 2x + 1) = -x^2 + 1\)

(iii) \(f(x) + f(1) = (2x - x^2) + 1 = -x^2 + 2x + 1\)

[Note that \(f(x) + f(1) \neq f(x + 1)\). In general \(f(a + b)\) is not equal to \(f(a) + f(b)\)]