• Written By Ritesh Kumar Gupta
  • Last Modified 25-01-2023

Functions: Definition, Types, Solved Examples

img-icon

Functions are mathematical representations of several real-world input-output conditions. Consider how a soda/snack/stamp machine works. What is the relationship between a circle’s circumference and its diameter? What is the relationship between arm length and height? How is the efficiency of a car measured in miles per gallon of gasoline determined?

What is the relationship between a weekly salary and an hourly wage? What is the formula for calculating compound interest? In this article, we will provide you with all the detailed information about Functions, their types, and their real-life applications. Scroll down to learn more!

What are Functions?

Definition: A function is defined as a relationship between a set of inputs and a set of possible outputs, with each input relating to exactly one output.

This implies that a function \(f\) can map the object \(x\) to exactly one object \(f(x)\) in the set of possible outputs (called the co-domain). If the object \(x\) is in the set of inputs (called the domain).

The concept of a function can be easily interpreted using a functioning device, which takes in an object as input and gives out another object as output based on that input.

Functions

What is Function in Mathematics?

In mathematics, a function is an expression, rule, or law that establishes a relationship between one variable (the independent variable) and another variable (the dependent variable). In mathematics, functions are everywhere, and they’re crucial for formulating physical relationships in the sciences.

Given a set of possible inputs \(X\) (domain) and a set of possible outputs \(Y\) (co-domain), a function is defined as a set of ordered pairs \(x,\,y\) where \(x\, \in \,X\) and \(y\, \in \,Y\), subject to the restriction that there can only be one ordered pair with the same value of \(x\). The function notation \(f:X \to Y\) can be used to write the declaration that f is a function from \(X\) to \(Y\).

Function Notation
Function

Examples of Function

A person’s fingerprints have a distinct set of characteristics. That is, there is a function (labelled \(f\)) that connects the set of people to the set of fingerprint sets. The function is only known for those who have had their fingerprints taken. Any collection of fingerprints can be used to identify an individual.

Every cell in the human body carries a copy of a specific DNA molecule for each person. As a result, a function connects a group of people to a set of molecular structures known as DNA.

\(f\left( x \right) = {x^2}\) is a typical notation of a function that is used to find the square of a number \(x\). Similarly, a quadratic function, in general, is represented as \(f(x) = a{x^2} + bx + c\) which is the second degree simplest polynomial, whereas \(f\left( x \right) = constant\) and \(f\left( x \right) = x\) are the constant and identity function, respectively.

Difference Between Function and Relation

The distinction between relations and functions may be confusing since they are closely related.

The relation is defined in mathematics as a collection of ordered pairs containing an object from one set to the other. For example, if \(X\) and \(Y\) are two sets, and \(‘a’\) is an object from set \(X\) and \(‘b’\) is an object from set \(Y\), we can say that the objects are related if the order pairs \(a\), \(b\) are related. The function is the relation that connects a set of inputs to a set of outputs. Each input in the set \(X\) has exactly one output in the set \(Y\) in function.

A relation is a link between two or more sets of values and it is the subset of the Cartesian product of two or more sets. While a function is a relation in which each input has only one output. A relation is generally denoted by \(“R”\) whereas a function is generally represented by \(“F”\) or \(“f”\).

Every function is a relation, but every relation is not a function. That means, in a nutshell, we can say that functions are a subset of relations.

For example: \(y = x + 3\) and \(y = {x^2}-1\) are functions because every \(x\)-value produces a different \(y\)-value. But \({y^2} = x\) is not a function as for input \(x = 4\) correspond to \(y =  – 2,\,2\) but it is a relation as \(x\) and \(y\) are related to each other.

Difference between Function and Relation

Conditions for Function

A function takes a specific input and returns a specific output. So, a function \(f:A \to B\) reads as a function \(f\) from \(A\) to \(B\), where \(A\) is a domain and \(B\) is a co-domain.

So, if an element \(a \in A\) is related to a unique element \(b \in B\), then we can say \( \left({a,b} \right) \in f\) or \(f\left( a \right) = b\) . If \(f\left( a \right) = b\), then \(b\) is called the image of \(a\) under \(f\) or \(b\) is the output value corresponding to input value a under \(f\).

\(f\left( a \right) = b\) is called a function from \(A\) to \(B\) if every element present in set \(A\) is related to a unique element in set \(B\). For example: Just see the example given below; out of the two examples given, the first one is a function, but the second one is not.

The second example is not a function as \(f\left( 1 \right)\) has two images \(0\) and \(15\), which is not possible for \(f\) to be function.

Conditions for Function

The most common test to find if a given curve is a function or not is the vertical line test. The vertical line test is used to see if a curve is a function. A curve is not a function if it cuts a vertical line at more than one point.

For example: Out of the two graphs given below, a circle is not a function as a vertical line cut the circle at two points.

Vertical Line Test

Types of Functions

The various types of functions that are commonly used are as follows:

  1. One – One or Injective Function
  2. Many – One Function
  3. Onto or Surjective Function
  4. Into Function
  5. Bijective Function
  6. Polynomial Function
  7. Identical Function
  8. Rational Function
  9. Algebraic Function
  10. Modulus Function
  11. Signum Function
  12. Greatest Integer Function
  13. Fractional Part Function
  14. Even and Odd Function
  15. Periodic Function
  16. Composite Function
  1. One – One or Injective Function

If no two elements in the domain of \(f\) correspond to the same element in the range of \(f\), the function is a one-one or injective function. This implies that there would be a unique value of \(f\left( x \right)\) for each value of \(x\).

For example: \(f\left( x \right) = \sqrt x \) is one-one function as for every input \(x\) we get a unique output \(f\left( x \right)\)

While \(g\left( x \right) = {x^2}\) is not a one-one function as for input \(x =  – 2,\,2\) we get the same output \(4\)

One – One or Injective Function

2. Many – One Function

If there are two or more different elements in \(X\) that have the same image in \(Y\), the function \(f:X \to Y\) is said to be a many-one function.

For example: Suppose input set \(X = \left\{{1,\,2,\,3,\,4,\,5} \right\}\) and output set \(Y = \left\{{x,\,y,\,z} \right\}\) are related as shown in the below figure. This is a many-one function as the value corresponding to \(1,\,2\), and \(3\) corresponds to the same output value \(x\).

Many – One Function

3. Onto or Surjective Function

A function \(f:A \to Y\) is called an Onto or Surjective function if the range of \(f\) is the co-domain of \(f\), i.e. \(Y\).

Onto or Subjective Function

In the first case, Range of  \(f \ne\) Co-domain of \(f \), hence it is not onto. But in the second case, Range of  \(f = \) Co-domain of \(f\), hence it is onto.

4. Into Function

A function \(f:A \to B\) is called an Into function if there exists a single element in \(B\) having no pre-image in \(A\). Example:

Into Function

In the above diagram, we can see that there is no pre-image in \(A\) corresponding to \(4\) in \(B\); hence, it is into function.

5. Bijective Function

If a function \(f:A \to B\) satisfies both the injective (one-to-one function) and surjective (onto function) properties, it is said to be a bijective function. It implies that for every element “\(b\)” in the co-domain \(B\), there is exactly one element “\(a\)” in the domain \(A\).

The function is also said to be one-to-one correspondence if it meets this condition. In short, we can say that a bijective function is one-one as well as onto both.

6. Polynomial Function

A function  \(f(x) = {a_n}{x^n} + {a_{n – 1}}{x^{n – 1}} + {a_{n – 2}}{x^{n – 2}} +  \ldots  + {a_2}{x^2} + {a_1}{x^1} + {a_0}\) is called a polynomial function if the power of each variable is a non-negative integer. The degree of the polynomial is \(n\) if \({a_n} \ne 0\) because the degree is the highest power in the expression.

The following are the various forms of polynomial functions depending on degree:

  1. If the degree is zero, the polynomial function is called a Constant function, i.e. \(f\left( x \right) = {a_0}\) where \({a_0}\) is a constant.
  2. If the degree is one, the polynomial function is called a Linear function. i.e. \(f(x) = {a_1}x + {a_0}\) where \({a_1},\,{a_0}\) are coefficients.
  3. If the degree is two, the polynomial function is a Quadratic function. i.e. \(f(x) = {a_2}{x^2} + {a_1}x + {a_0}\) where \({a_2},\,{a_1},\,{a_0}\) are coefficients.
Polynomial Function
Polynomial Function

7. Identical Function

Two functions \(f\) and \(g\) are called an identical function, if

  1. The domain of \(f = \) The domain of \(g\)
  2. The range of \(f =\) The range of \(g\)
  3. For all \(x \in \)  Domain of \(f\) or \(g,\,f\left(x\right) = g\left( x\right)\)

For example: \(f\left( x \right) = \frac{1}{x}\)   and \(g\left(x\right) = \frac{x}{{{x^2}}}\)  where \(x \ne 0\) are identical functions as they satisfy all the above criteria.

8. Rational Function

The function of the type  \(\frac{{f\left( x \right)}}{{g\left( x \right)}},\left({g\left( x \right) \ne 0} \right)\) are called rational function where \(f\left(x \right)\) and \(g\left( x\right)\) are polynomial functions of \(x\) defined in its domain.

For example: \(f\left( x \right) = \frac{{{x^2} + 4}}{{x + 9}}\)  is a rational function where \(x \in R – \{  – 9\}\).

9. Algebraic Function

An algebraic equation is a function with a finite number of terms involving powers and roots of the independent variable x and basic operations, including addition, subtraction, multiplication, and division.

For example: \(f(x) = \frac{{x + 4}}{{7x + 9}},\,f(x) = \frac{{\sqrt x  + 4}}{{8x + 9}},\,f(x) = {x^3} + 3x + 1\), are algebraic function.

10. Modulus Function

The function \(f:R \to {R^ + } \cup 0\)  defined by

\(f(x)=\left|x\right|=\left\{\begin{array}{l}x,\;x\geq0\\–x,\;x<0\end{array}\right.\)

is the called Modulus function. It is denoted with the symbol  \({\text{| |}}\). It is also called an absolute value function.

It’s domain is \(R\) and range is \({R^ + } \cup 0\) i.e. positive real number including 0.

For example: \(\left|{3.5} \right| = 3.5\)
\(\left|{ – 3.7}\right| = – \left({ – 3.7}\right) = 3.7\)

Modulus Function

11. Signum Function

The function \(f:R \to \{  – 1,0,1)\)  defined by:

\(\begin{array}{l}f(x)=\left\{\begin{array}{l}\frac{\left|x\right|}x,x\neq0\\0,x=0\end{array}\right.=\left\{\begin{array}{l}\begin{array}{l}1,x>0\\0,x=0\end{array}\\-1,x<0\end{array}\right.\\\\\end{array}\)

is the called Signum function or sign function. It is denoted as \(\operatorname{sgn} \left( x \right)\).

For example: \(\operatorname{sgn} \left({1000}\right) = 1\)
\(sgn\left({- 6.9} \right) = – 1\)
\(sgn\left({0} \right) = 0\)
\(sgn(\left|x\right|+2)=1\)

12. Greatest Integer Function

The function \(f:R \to I\) defined by \(f\left( x \right) = \left[ x \right]\) is the greatest integer function (G.I.F.), gives the value of the greatest integer less than or equal to \(x\). The G.I.F. always gives integral value as output. ( where \(R\) is a real number and \(I\) is an integer)

For Examples: \(\left[{3.5} \right] = 3\)
\(\left[{ – 3.5} \right] =  – 4\)
If \(0 \leqslant x < 1\) then \(\left[ x \right] = 0\)

Greatest Integer Function

13. Fractional Part Function

The function \(f:R \to \left[{0,\,1}\right)\) defined by \(f\left( x \right) = \left[ x \right]\) , is the fractional part function which value fractional value i.e. \([0,1)\). As \(x = \left[ x \right] + \left\{ x \right\} \Rightarrow \left\{ x \right\} = x – \left[ x \right]\) . Its domain is \(R\) and range is \([0,1)\).

For example: \({3.4} =0.4\)
\({-3.4}=-3.4-[-3.4]=-3.4-(-4)=0.6\)
If \(0≤x<1\) then \({x}=x\)
If \(1≤x<2\) then \(x=x-1\)

Fractional Part Function

14. Even and Odd Function

If \(f(x) = f(-x)\), the function is an even function, and if \(f(x) = -f(-x)\), the function is an odd function.

For example: \(f\left( x \right) = \sin x\) is an odd function as \(\sin \left({ – x}\right) =  – \sin \left( x \right)\) while \(f\left( x\right) = \cos x\) is an even function as \(\cos \left({ – x}\right) = \cos x\)

15. Periodic Function

A periodic function is one whose values repeat at regular intervals. A function \(f\) is said to periodic function for some nonzero constant \(T\) if  \(f\left({x + T}\right) = f\left(x \right)\) for all \(x \in \) Domain of \(f\)

For example : \(f\left( x\right) = \sin x\) or \(\cos x\) is a periodic function with period \(2\pi \) as \(\sin \left({x + 2\pi }\right) = \sin x\) or \(\cos \left({x + 2\pi } \right) = \cos x\)

16. Composite Function

Let \(f:A\, \to \,B\) and \(g:B \to C\) be two functions. Then the composition of \(f\) and \(g\), denoted by \(g o f\), is defined as the function \(gof:A \to C\) given by \(g{\text{ }}o{\text{ }}f\left( x \right) = g\left({f\left(x\right)}\right),\,\forall x \in A.\,g\left({f{\text{ }}\left( x \right)} \right)\) is read as “\(g\) of \(f\) of \(x\)”.

For example \(f\left( x \right) = x + 3\) and \(g\left( x\right) = \sin x\) then \(g\,of(x) = g(f(x)) = ( \sin (f(x)) = \sin (x + 3)\)

Function: Real-life Applications

Functions are mathematical representations of several input-output conditions in the real world. Some of the real-life applications of Functions are as follows:

  1. In the soda machine, a snack machine, or a stamp machine; When the user inserts money and presses a specific button, a specific item appears in the output slot.
  2. A circle’s circumference is proportional to its diameter. So, A Circle’s circumference is a function of diameter.
  3. The length of one’s arms is a function of height.
  4. In terms of miles per gallon of fuel, a car’s efficiency is a function. A car’s performance can be affected by its design (such as weight, tires, and aerodynamics), its speed, the temperature inside and outside the vehicle, and other factors.
  5. The hourly wage rate and the number of hours worked are used to assess a weekly salary.
  6. Compound interest is calculated as a function of the initial expenditure, the interest rate, and the passage of time.
  7. The law of supply and demand. Demand decreases as the price rises. Demand and supply are related to each other.
  8. A shadow’s length is a function of its height and the time of day.
  9. Scuba diving is something we all like to do. Here, the pressure of the water is a constant function of depth.
  10. School grades are a function of the number of hours of study.
  11. Taxi fare is a function of distance travelled.

Solved Examples on Functions

Q.1. Evaluate \(f(1)\), if  \(f(x) = 3x+5\).
Ans: \(f(1)= 3×1 + 5=8\)

Q.2. For the function  \(f\left( x \right) = {\text{ }}{x^2} + 3x + 5\), compute  \(f(-1)\).
Ans: \(f\left({ – 1}\right) ={\left({ – 1}\right)^2} + 3(- 1) + 5 = 3\)

Q.3. If \(f(x) = {x^2} + 3x + 5\) and \(g(x) = {x^2} + 2x + 1\), then evaluate \((f – g)(0)\).
Ans: \((f – g)(0) = f(0) – g(0) = 5 – 1 = 4\)

Q.4. If  \(f(x) = 3x+5\), then compute the value of \(f(f(2))\).
Ans: \(f(f(2)) = 3f(2) + 5 = 3(3 \times 2 + 5) + 5 = 3(11) + 5 = 38\)

Q.5. If \(f(x) = {x^2} + 3x\) and \(g\left(x\right) = {\text{ }}{x^2} + 1\), then evaluate \(\left({fg}\right)\left( 2 \right)\).
Ans. \((fg)(2) = f(2)g(2) = \left({{2^2} + 3 \times 2} \right)\left({{2^2} + 1}\right) = 10 \times 5 = 50\)

Summary

Functions are mathematical representations of several input-output conditions in the real world. Functions have become the backbone for mathematics, particularly for algebra and calculus. It has immense use in the real world that leads to significant importance in the mathematical world.

A function is a mathematical relationship between two sets of numbers in which each element in the first set corresponds to one number in the second set. Functions can be classified into various types based on several factors. One – One or Injective Function, Many – One Function, Onto or Surjective Function, Into Function, are some of the common types of functions.

FAQs on Functions

Q.1. What is a function?
Ans: A function is defined as a relationship between a set of inputs and a set of possible outputs, with each input relating to exactly one output. The concept of a function can be easily interpreted using the metaphor of a function machine, which takes in an object as input and spits out another object as output based on that input.

Q.2. What are the 4 types of functions?
Ans: There are various types of functions, out of which 4 which are frequently used are:

  1. One – One or Injective Function
  2. Many – One Function
  3. Onto or Surjective Function
  4. Into Function

Q.3. How do you solve a function?
Ans: When we have a function given, evaluating the function is a simple task. We just put the input value in the function to get the required result. For example: If \(f(x) = 3x+5\), then the value of \(f(1)\) can be found by just putting the value in the function. So, in this case, \(f(1) =8\).

Q.4. How do you understand a function in math?
Ans: In mathematics, a function is an expression, rule, or law that establishes a relationship between one variable (the independent variable) and another variable (the dependent variable) (the dependent variable). A function is a mathematical relationship between two sets of numbers in which each element in the first set corresponds to exactly one number in the second set.

Q.5. What is the function of calculus?
Ans: The function of calculus includes calculations involving area, volume, arc length, the centre of mass, function, and pressure. Power series and Fourier series are examples of more complex implementations. Calculus will also help you understand the essence of space, time, and motion more precisely.

Now that you are provided with all the necessary information on Functions and we hope this detailed article is helpful to you. If you have any queries, please reach us through the comment box below and we will get back to you as soon as possible.

Unleash Your True Potential With Personalised Learning on EMBIBE