Introduction to Function (original) (raw)

Last Updated : 27 Apr, 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.

Examples of Functions

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.

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

This is a trigonometric function.

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

This is a quadratic function.

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. This can be better understood from the image below:

Function

Vertical Line Test

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.

notafunction1

Domain and Range of a Function

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

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

**For example: f(x) = x2

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:

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

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.

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.

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:

Identifying a Function

The function is classified as a special type of relation in math. There are the following rules that can be used to identify a function:

**Types of Function

Different Types of Functions are used to solve various types of mathematical problems, especially related to curves and equations. Three major types of functions in mathematics are based on the element mapping from set A to set B.

Algebra of Functions

Algebra of Functions involves the algebraic operations performed between two functions. The algebraic operation for two functions f(x) and g(x) defined on the real values of x are mentioned below:

Composition of Functions

If f: A → B and g: B→ C are two functions. Then the composition of f and g is denoted as f(g), and it is defined as the function fog = f(g(x)) for x ∈ A.

Let's take two functions f(x) = x + 3 and g(x) = 2x2

fog = f(g(x))
⇒ fog = f(2x2)
⇒ fog = 2x2 + 3

Graph of Function

A function can be easily represented on a graph. Any function on the graph represents a curve (including a straight line) in the x-y plane, mapped for its input and corresponding output values.

To plot a function on a graph , first find some points that lie on the function and then join these points according to the locus of the function. For example, to graph the function (straight line) f(x) = y = x +3, we need some point on the graph. To find the point the point on the graph, we first take the random values of x and then find their corresponding values of y.
When x = 0, y = 3

Similarly,

As a result, we may plot the graph for the function x + 3 using these values.

Graph of Function for y = x + 3

Common Functions

Some Common Functions that are commonly used in mathematics are discussed below:

**Real Function

Real function in maths refers to a function whose domain and range are subsets of the real numbers (denoted as ℝ). In simpler terms, a real function is a mathematical rule or relationship that assigns a real number value to each real number input.

Real Functions

Real Functions

**Polynomial Function

The function in which the exponents of algebraic variables are non-negative integers is called a Polynomial Function. If the power of the variable is 1, it is called a linear function, if the power is 2, it is called a quadratic function, and if the power is 3, it is called a cubic function. Some examples of polynomial functions are mentioned below:

Polynomial functions can further classified into the following types:

**Linear function: Linear Functions are those in which the maximum power of a variable is 1. The general Form of a Linear Function is y = mx + c

**Quadratic Function: A Quadratic Function is one in which maximum power of the variable is 2. The General Form of a quadratic function is, ax2 + bx + c = 0

**Cubic Function: A Cubic Function is those in which maximum power of variable is 3. General Form of cubic function is given as ax3 + bx2 + cx + d = 0

**Inverse Function: Inverse Function is the function containing the inverse of another function. Let's say we have a function y = f(x) then its inverse function will be x = f-1(y). In y = f(x), the domain is x and the range is y while in the case of x = f-1(y), the domain is y and the range is x. Thus we can say that the domain of the original function is the range of its inverse function and the range of the original function is the domain of the original function. Some examples of inverse functions are,

Area Function

Area function typically refers to a mathematical function that calculates the area of a geometric shape or region. The area function takes one or more parameters as input and returns the area of the corresponding shape. Some of the area functions are discussed below:

**Area of Circle Function: The Area of Circle (A) is a function of its radius(r) such that,

A = πr2

**Area of Triangle Function: The Area of Triangle (A) is a function of its base(b) and height(h) such that,

A = (bh)/2

Exponential Function

Exponential function is the one which is represented as f(x) = ex. It is often used to show rapid growth or decay.

**Logarithmic Function

Logarithmic function is a mathematical function that represents the inverse operation of exponentiation. It is represented as f(x) = log x.

**Ceiling Function

Ceiling function denoted as ⌈x⌉, rounds a real number x up to the nearest integer that is greater than or equal to x. In other words, it finds the smallest integer value that is greater than or equal to x.

Floor Function

Floor function denoted as ⌊x⌋, rounds a real number x down to the nearest integer that is less than or equal to x. In other words, it finds the largest integer value that is less than or equal to x.

Modulus Function

Modulus function also known as the absolute value function, returns the magnitude or "size" of a real number without regard to its sign. Modulus function is denoted as ∣x∣, where x is the input value.

Signum Function

Signum function, also known as the sign function or signum function, is a mathematical function that returns the sign of a real number. It indicates whether the number is positive, negative, or zero.

Trigonometric Functions

Trigonometric functions are mathematical functions that relate the angles of a right triangle to the lengths of its sides. The six primary trigonometric functions are sine (sin), cosine (cos), tangent (tan), cosecant (cosec), secant (sec), and cotangent (cot).

Complex Functions

Any function in which the input variable are complex function are called the complex function. A complex number is a number that can be plotted on the complex plane. In a complex number, we have real number and imaginary number. A complex number(z) is represented as, z= x + iy and a complex function is represented as, f(z) = P(x, y) + iQ(x, y)

**Applications of Functions

When we say that a variable quantity y is a function of a variable quantity x, we indicate that y is dependent on x and that y's value is determined by x's value. This dependency can be expressed as follows: y = f (x).

Solved Examples of Function

**Example 1: For two functions _f and _g are defined as, f(x) = x2 and g(x) = ln(2x). Find the composite function (gof )( x )

**Solution:

Given:

(gof )( x ) = g (f (x))

[g (f (x)] = ln(2f(x)) = ln(2x2) = 2 ln(√2x)

Thus, (gof)(x) = 2 ln(√2x)

**Example 2: Find the output of the function g(t) = 6t2 + 5t at

(i) t = 0

(ii) t = 2

**Solution:

Given Function: g(t) = 6t2 + 5t

(i) t = 0

g(0) = 6(0)2+5(0) = 0 + 0

g(0) = 0

(ii) t = 2

g(2) = 6(2)2 + 5(2)
g(2) = 24 + 10
g(2) = 34

**Example 3: The length of a rectangle is five times its breadth, express the area of the rectangle as a function of its length.

**Solution:

Let, length of the rectangle be l and the breadth of the rectangle is, b

Now, b = l/5

Area of Rectangle(A) = l × l/5 = l2/5

Thus, area of rectangle as the function of its length is,

A(l) = l2/5

Practice Questions on Functions

**Question 1: Given the function f(x) = 3x + 5

**Question 2: Given the function g(x) = x2 - 4x + 3

**Question 3: Given two functions f(x) = x + 2 and h(x) = 2x - 3