Home » Math Theory » Graphs and Charts » Domain, Co-Domain and Range of a Function

# Domain, Co-Domain and Range of a Function

## Introduction

Functions form one of the most important building blocks of Mathematics. The word “ Function “ has been derived from a Latin word meaning operation and the words mapping and map are synonymous with it. There are many standard defined functions that we use such as modulus functions, logarithmic functions, exponential functions etc.

## Definition – Domain, Co-domain and Range of a Function

Domain – The set of all possible values which qualify as inputs to a function is known as the domain of the function. In other words, the domain of a function can be defined as the entire set of values possible for independent variables.

Co-Domain – The set of all the outputs of a function is known as the range of the function or after substituting the domain, the entire set of all values possible as outcomes of the dependent variable.

Range – The set of all the outputs of a function is known as the range of the function or after substituting the domain, the entire set of all values possible as outcomes of the dependent variable.

Mathematically, the domain, co-domain and range of a function can be defined as –

Let f : A → B. then the set A is known as the domain of f and the set B is known as the range co-domain of f. The set of all f-images of elements of A is known as the range of f or image set of A under f and is denoted by f ( A ).

Thus f ( A ) = { f (x)  : x A } = Range of f

In simple terms, we can thus define domain, co-domain and range of a function as –

Domain refers to what can go into a function. Codomain on the other hand refers to what may possibly come out of a function. The range of a function refers to what actually comes out of a function.

Let us now understand, the domain, co-domain and range of some common functions.

## Modulus Function

The function f ( x) is defined by

f ( x ) = | x | = {-x,  x<0 x}  x≥0

is called a modulus function. It is also called an absolute value function.

### Domain and Range of a Modulus Function

We can observe that the domain of the modulus function is the set R of all real numbers and the range is the set of all non-negative real numbers. This means that,

R+ = { x ∈ R : x ≥ 0 }

### Graph of Modulus Function

The graph of the modulus function is shown in the below figure.

It is important to note here that for x > 0 the graph of the modulus function coincides with the graph of the identity function, i.e. the line y =  x and for x < 0 it is coincident with the line y =  -x.

## Logarithmic Function

If a > 0 and a ≠ 1 then the function defined by f ( x )  = x , x > 0 is called the logarithmic function.

The logarithmic function is an inverse function.

Recall that in the case of inverse functions,

Let f : A → B be a bijection. Then a function g : B → A which associates each element y B to a unique element x A such that f ( x )  = y is called the inverse of f.

Now, since the logarithmic function is an inverse function, this means,

x = y ⬄ x = ay

Let us now check the domain and the range of this piecewise function.

### Domain and Range of Logarithmic Function

We observe that the domain and the range of the logarithmic function is the set of all positive real numbers. This means that ( 0, ∞) is the domain of the function and the range is the set R of all real numbers.

As a > 0 and a ≠ 1, So we have the following cases –

Case 1 When a > 1

In this case, we have

y = x {<0 for 0<x<1 =0 for x=1 >0 for x>1

Also, the values of y increase with the increase in x.

Now, let us consider the second case, where a lies between 0 and 1

Case 2 When 0 < a  < 1

In this case, we have,

y = x {  >0 for 0<x<1 =0 for x=1 <0 for x>1

### Graph of Logarithmic Function

We have learnt above the definition of a logarithmic function. We have also discussed about two different cases depending upon the values of a.

So, there are two different graphs based on these different values.

Let us first plot the graph for the first case where b > 1

y = x {<0 for 0<x<1 =0 for x=1 >0 for x>1

The graph of this function will be represented as –

Now let us plot the graph of case 2.

Case 2 When 0 < a  < 1

In this case, we have,

y = x {  >0 for 0<x<1 =0 for x=1 <0 for x>1

The graph of this function will be represented as –

## Exponential Function

If a is a positive real number other than unity, then a function that associates each x R to a x is called the exponential function. In other words, an exponential function is a Mathematical function in the form f (x) = a x, where “x” is a variable and “a” is a constant which is called the base of the function and it should be greater than 0.

### Formula for Exponential Function

A function f : R → R defined by f ( x )  = a x , where a > 0 and a ≠ 1 is the formula for the exponential function. Hence, we have

f ( x )  = a x

where

a > 0 and a ≠ 1 and x is a real number

It is important to note here that if we have negative values for the variable, the exponential function is not defined when – 1 < x < 1.

The curve of the exponential graph is dependent upon the exponential function which further is dependent upon the value of x. Therefore, it is the value of x that defines the curve of the graph of the exponential function.

What are the domain and the range of an exponential function? Let us find out.

### Domain and Range of an exponential function

We know that the domain of a function y = f ( x ) is the set of all x-values where it can be computed and the range is the set of all y-values of the function. The domain of an exponential function is R the set of all real numbers. The range of an exponential function is the set ( 0 , ∞) as it attains only positive values.

### Graph of Exponential Function

Case 1 : When a > 1

Let us observe the values of y = f ( x  )  = a x  as the value of x increases.

Also, we know that

f ( x ) = {<1 for x<0  =1 for x=0 >1  for x>0

Therefore, the graph of an exponential function f ( x ) =  b x for b > 1 will be given by –

For example, let us consider the graph of y =  2 x.

The graph of this function will be

We can see that the above exponential function increases rapidly.

Also, we can clearly observe that –

1. 2 x < 3 x < 4 x  < …… for all x > 1
2. 2 x = 3 x = 4 x  < ……  = 1 for all x = 0
3. 2 x > 3 x > 4 x  > …… for all x < 1

Hence, the graphs of f ( x ) = 2 x , f ( x ) = 3 x , f ( x ) = 4 x in accordance with the graph shown above.

Case 2 :  When 0 < a < 1

In this case, the values of y = f ( x ) = a x decrease with the increase in x and y > 0  for all x R. Also, we know that –

f ( x ) = {<1 for x<0  =1 for x=0 >1  for x>0

Thus, the graph of f ( x ) =  b x for 0 < b < 1 as shown below –

## Real Functions

A function f : A → B is called a real function, if B is a subset of R ( set of all real numbers ). If A and B are subsets of R, then f is called a real function.

### Domain and Range of Real Functions

Mathematically to define a function for has to provide its domain, co-domain and the images of elements in its domain either by giving a general formula or by listing them one by one. As the domain and codomain of real functions are subsets of R, therefore, conventionally real functions are described by providing the general formula for finding the images of elements in it. In such cases, the domain of the real function f ( x ) is the set of all those real numbers for which the expression for f ( x ) or the formula for f ( x ) assumes real values only. In other words, the domain of f ( x ) is the set of all those real numbers for which f ( x ) is meaningful.

Let us understand it through an example.

Suppose we have a real function described by the formula, f ( x ) = $\frac{3 x -2}{x^2-1}$ . This function assumes the real values of all x R except for x =  ∓1 because the denominator of $\frac{3 x -2}{x^2-1}$ becomes zero for x =  ∓1. Therefore, the domain of f ( x ) will be the set of all real numbers other than  – 1 and 1, i..e the domain of will be the domain  ( f ) = R – {- 1,1}

The range of a real function of a real variable is the set of all real values taken by f ( x ) at points in its domain. The following algorithm is used to find the range of a real function f ( x )  –

1. Put y = f ( x )
2. Solve the equation y = f ( x ) for x in terms of y. let x = ∅ ( y )
3. Find the values of y for which the values of x obtained from x = ∅ ( y ) are real in the domain of f.
4. The set of values obtained in the above step is the range of f.

## Solved Examples

Example 1 Find the domain and range of f ( x ) given by f ( x ) = $\frac{x-2}{3-x}$

Solution We have been given the function f ( x ) =  $\frac{x-2}{3-x}$ and we need to find its domain and range. Let us find them one by one.

Domain of f

We can see that f is defined for all x satisfying 3 – x ≠ 0. This means that x ≠ 3. Therefore, the domain of the function f ( x ) = $\frac{x-2}{3-x}$ will be Domain ( f ) =  R – { 3 }

Range of f

We shall use the above discussed above to find the range of the given function.

Let y = f ( x ). Then, we have

y = $\frac{x-2}{3-x}$

⇒ y ( 3 – x ) = x – 2

⇒ 3 y – x y = x – 2

⇒ x ( y + 1 )  = 3 y + 2

⇒ x = $\frac{3 y+2}{y+1}$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 1 )

We can see from equation ( 1 ) that x assumes real values of all y except y + 1 = 0. This means that y = – 1

Hence, the range of the function f ( x ) =  $\frac{x-2}{3-x}$ will be Range ( f ) = R – { – 1 }

Example 2 Find the domain and range of the function f ( x ) = $\frac{1}{2-sin 3 x}$

Solution We have been given the function f ( x ) = $\frac{1}{2-sin 3 x}$ and we need to find its domain and range. Let us find them one by one.

Domain of f

We know that – 1 sin 3 x 1 for all x  ∈ R

⇒ – 1 – sin 3 x 1 for all x  ∈ R

⇒  1 2 – sin 3 x 3 for all x  ∈ R

⇒ f ( x ) = $\frac{1}{2-sin 3 x}$ is defined for all x  ∈ R

Hence, the domain of the function f ( x ) = $\frac{1}{2-sin 3 x}$ will be Domain f( f ) = R

Range of f

We have already discussed above that 1 2 – sin 3 x 3 for all x  ∈ R

⇒  13  $\frac{1}{2-sin 3 x}$ 1 for all x  ∈ R

⇒  13 f ( x ) 1 for all x  ∈ R

⇒ f ( x ) = [ 1 / 3 , 1 ]

Hence, the range of the function f ( x ) = $\frac{1}{2-sin 3 x}$ will be Range ( f ) = [ 1 / 3 , 1 ]

## Key Facts and Summary

1. Let A and B be two non-empty sets. A relation f from A to B, i.e. a subset of A x B is called a function or a mapping or a map from A to B is,
• For each a  ∈ A there exists b ∈ B such that ( a, b ) ∈ f
• ( a, b ) ∈ f and ( a, c ) ∈ f ⇒ b = c
2. Let f : A → B. then the set A is known as the domain of f and the set B is known as the range co-domain of f. The set of all f-images of elements of A is known as the range of f or image set of A under f and is denoted by f ( A ).
3. The function f ( x) is defined by f ( x ) = | x | = {-x,  x<0 x,  x≥0 is called a modulus function. It is also called an absolute value function.
4. If a > 0 and a ≠ 1 then the function defined by f ( x )  = x , x > 0 is called the logarithmic function.
5. A function f : R → R defined by f ( x )  = a x , where a > 0 and a ≠ 1 is the formula for the exponential function. The domain of an exponential function is R the set of all real numbers. The range of an exponential function is the set ( 0 , ∞) as it attains only positive values.
6. A function f : A → B is called a real function, if B is a subset of R ( set of all real numbers ). If A and B are subsets of R, then f is called a real function. The domain of f ( x ) is the set of all those real numbers for which f ( x ) is meaningful. The range of a real function of a real variable is the set of all real values taken by f ( x ) at points in its domain.