Introduction to Function

Last Updated : 8 Jul, 2026

A function is a special type of relation that assigns each element of a set A to exactly one element of a set B. Here, set A is called the domain, and set B is called the codomain.

A function is denoted as f: A→B, where for every a∈A, there exists a unique b∈B such that f(a) = b.

The set of all actual output values is called the range. In a function, different elements of the domain may have the same image in the codomain.

A simple example of a function in math is f(x) = 2x, which is defined on R → R; here, any variable in the domain is related to only one variable in the range.

Mathematical Definition

A function in mathematics f is defined as y = f(x), where x is the input value, and for each input value of x, we get a unique value of y. Various examples of the functions in math defined on R→R are,

Example 1: y = f(x) = 3x + 4

This is a linear function.

  • If x = 2: f(2) = 3(2) + 4 = 6 + 4 = 10. So, the output is 10.
  • Domain: All real numbers.
  • Range: All real numbers.

Example 2: y = f(x) = sin(x) + 3

This is a trigonometric function.

  • If x = π/2: f(π/2) = sin⁡(π/2) + 3 = 1 + 3 = 4. The output is 4.
  • Domain: All real numbers.
  • Range: [2, 4].

Example 3: y = f(x) = -3x² + 3

This is a quadratic function.

  • If x = 1: f(1) = −3(1)2 + 3 = −3 + 3 = 0. The output is 0.
  • Domain: All real numbers.
  • Range: y ≤ 3.

Condition for a Function

For any two non-empty sets A and B, a function f: A→B denotes that f is a function from A to B, where A is a domain and B is a co-domain.

For any element, a ∈ A, a unique element, b ∈ B, is there such that (a,b) ∈ f. The unique element b, which is related to a, is denoted by f(a) and is read as f of a.

Function

Note: The Vertical line test is used to determine whether a curve is a function or not. If any curve cuts a vertical line at more than one point, then the curve is not a function.

Domain and Range of a Function

The domain and range of a function are fundamental concepts in mathematics.

  • Domain: The set of all possible input values (x-values) for which the function is defined.
  • Range: The set of all possible output values (y-values) that the function can produce.

The Domain and Range of a function are the input and output value of a function, respectively.

For example: f(x) = x2

  • The domain is all real numbers (R) because any real number can be squared.
  • The range is all non-negative real numbers ([0, ∞)) because squaring any number always gives a positive or zero result.

Representation of Functions

We can define a function in mathematics as a machine that takes some input and gives a unique output. The function f(x) = x2 is defined below as,

Function in Maths

For the above function: f(x) = x2:

  • Input: x: {1, 2, 3, … }
  • Function: Squares each input.
  • Output: {1, 4, 9, … } which consists of perfect squares.

We can represent a function in math by the three methods,

1. Set of Ordered Pairs

For instance, for a function, "f(x) = x3
The set of ordered pairs is: f = {(1, 1), (2, 8), (3, 27)}
Each pair follows the rule f(x) = x3, meaning each x-value has a unique y-value.

2. Table Form

A function can also be represented in tabular format, listing input values (x) and their corresponding function values f(x).
Lists x-values and their corresponding f(x)-values in a structured format.

3. Graphical Form

A function can be represented visually using a graph on a coordinate plane. The graph shows the relationship between x and y.
Represents the function visually on a coordinate plane, showing how x and y relate.
For example:

  • The function f(x) = x2 produces a parabola.
  • The function f(x) = x3 results in a cubic curve.

➣Practice: Solved Examples

Comment

Explore