Last updated on July 9th, 2025
Functions can be grouped based on the mapping, degree, and mathematical concepts; moreover, based on the properties like periodicity, symmetry, continuity, etc. The way a function is written helps to identify the type of function. In this article, we will learn more about the types of functions and graphs.
A function is a mathematical rule where each output has only one input. In other words, every element of the domain is mapped to one element in the codomain. It is generally denoted as y = f(x), where x is the input and f(x) the output. In a function, the domain is the set of input values (x-values). A domain can be the set of numbers, angles, decimals, or fractions, depending on the type of function. Range is the set of all possible output values (y-values) of the function.
To show the relationship between the domain and the range, we represent functions in three ways. Let’s now look at the three common representations.
Algebraic Form
In an algebraic form, a function can be expressed as an equation like y = f(x), which shows how each input value x relates to the y-values. Examples:
f(x) = x³
f(x) = sin x
These equations help us find the output for any given input.
Graphical Form
A function can also be represented graphically using a coordinate plane. The graphical representation helps us to understand the function, that is if the function is increasing, decreasing, or constant. By plotting points on the graph, we can observe a pattern or trend in the function’s behavior.
Roster Form
To represent a function as a collection of ordered pairs we use the roster form. In this form, each element of the domain (x) is matched with exactly one corresponding element in the range(f(x)). For example, if
f(x) = 2x, where x is a natural number ≤ 4, then the function can be represented as:
{(1, 2), (2, 4), (3, 6), (4, 8)}.
Here, the first number in each pair is from the domain, and the second is from the range.
In a function f: X → Y, the set X is called the domain, and it consists of all possible values. The set Y is the codomain, and it includes all outputs of f. The range of the function refers to the actual output values (images) of elements from the domain and is always a subset of the codomain.
The given image illustrates the domain, codomain, and range of the function. Note that only the elements in the codomain that are actually mapped from the domain are included in the range.
For the given function:
Learning the different types of functions helps us analyze their properties more effectively. We classify the function y = f(x) into different types based on certain factors like their mapping, degree, and mathematical concepts.
The different types of functions are:
Based on Mapping
As we have learned, a function is a rule that gives one output for each input. Functions can be classified based on how their elements map to the codomain. The types of functions based on mapping are:
1. One-to-One Function (Injective):
In this function, each input gives a different output.
Example:
f(x) = x + 1
i.e., If x = 1 → f(x) = 2, and if x = 2 → f(x) = 3
In a one-to-one function, no two inputs have the same output.
2. Many-to-One Function
As the term suggests, in this type, different inputs give the same output.
Example:
f(x) = x²
If x = 2 → f(x) = 4, and if x = −2 → f(x) = 4
i.e., two different inputs have the same output
3. Onto Function (Surjective)
When every value in the codomain is mapped with the domain, then it is said to be an onto function.
Example:
f(x) = 5 − x where x ∈ {1, 2, 3, 4, 5} and output set is {0, 1, 2, 3, 4}
(Each value in the output set is matched)
4. Into Function
When some values in the output set are not utilized, it is said to be an into function.
Example:
f(x) = x², where x ∈ {1, 2, 3}, codomain = {1, 2, 3, 4, 5, 6, 7, 8, 9}
Since f(x) only gives 1, 4, and 9, it’s an into function.
We classify functions based on their degree, that is, the highest exponent of the variable in the equation. Such functions are also called polynomial functions. Let’s look at its different types in detail:
Identity Function
The identity function is a function in which all elements in the domain are mapped to the range. It is written in the form f(x) = x or y = x. When plotted on a graph, the identity function forms a straight line.
Constant Function:
A constant function is a function in which every element in the domain maps to the same value in the range.
Form: f(x) = K (K is a constant)
In this type of function, the output remains constant for all input values.
Example: f(x) = 5 → Output is always 5.
Linear Function
The type of polynomial function in which the highest power of the variable is 1 is known as a linear function.
Form: f(x) = mx + c
Here,
m represents the slope.
c represents the y-intercept
Example: f(x) = 2x + 3, f(x) = x
The linear function is represented by a straight line graph (increasing, decreasing, or constant). One special case of a linear function is the identity function f(x) = x, where the output = input.
Quadratic Function
A quadratic function is a second-degree polynomial, where the highest degree of the variable is 2. The graph of a quadratic function is a parabola (U-shaped curve)
Form: f(x) = ax² + bx + c (a ≠ 0)
Example: f(x) = x² - 4x + 3
Cubic Function
In a cubic function, the highest power of x is three.
Form: f(x) = ax³ + bx² + cx + d (a ≠ 0)
Example: f(x) = x³ - 2x² + x
The visual representation of this function on a graph gives a curve that may bend or change direction, often displaying a shape more complex than that of a quadratic function.
Polynomial Function
A polynomial function can be represented in the form:
f(x) = anxⁿ + an-1xⁿ⁻¹ + ... + a₁x + a₀
Where
n represents a nonnegative integer.
x represents a variable.
Both the domain and range of a polynomial function are R.
Polynomial functions can be classified as quadratic, cubic, and so on, depending on the highest power (exponent) of the variable in the equation. The degree depends on the highest exponent of x.
Functions are widely utilized in various areas of mathematics. Depending on the concept they are used in, functions are further divided into different types. For example, the functions that are used in trigonometry are called trigonometric functions. The functions based on mathematical concepts are listed below:
Algebraic Functions
Algebraic functions involve operations like addition, subtraction, multiplication, division, and powers of variables. They include constants, coefficients, and variables. A general form of an algebraic function is:
f(x) = aₙxⁿ + aₙ₋₁xⁿ⁻¹ + ... + a1x + a0
Algebraic functions can be represented graphically and are further classified based on the degree of the polynomial:
Trigonometric Functions
Trigonometric functions relate angles to the ratios of sides in a right-angled triangle. They are based on the Pythagorean theorem. The six basic trigonometric functions are:
The angle measured in degrees or radians is the θ
Inverse Trigonometric Functions
The functions that are the reverse of trigonometric functions are known as inverse trigonometric functions. They help to find angles when the trigonometric ratio is known. The six inverse functions are:
In these functions, the domain is a real number, and the range is an angle. Since their values repeat over intervals, they are known as periodic functions.
Logarithmic and Exponential Functions
Logarithmic function is the inverse of exponential function.
The logarithmic function is generally denoted in the form:
y = logₐx
Where
a is the base and it indicates the number of times the base must be raised to get x.
The corresponding exponential form is:
x = aʸ
These functions are widely used in higher-level mathematics and real-world applications such as compound interest, population growth, and scientific calculations.
In addition to these types of functions, there are several other important functions used across different mathematical contexts. These are described below:
Modulus Function
The modulus function outputs the distance of a number from zero on the number line without considering its sign. It is denoted as:
f(x) = |x|
This means that whether x is positive or negative, the output is always non-negative. The graph of the modulus function appears in the first and second quadrants because the output y = |x| is always positive or zero. For example, points (x, y), there is a corresponding point (-x, y), making the graph symmetric with respect to the y-axis.
Rational Function
A rational function is a fraction made up of two algebraic expressions, typically in the form:
f(x) = p(x)/q(x), where q(x) ≠ 0
A function is undefined at any point where its denominator equals zero. The graph of a rational function often includes asymptotes—horizontal or vertical lines that the graph approaches but never touches.
Signum Function
The signum function (or sign function) indicates the sign of the input number. It doesn’t give a specific value but specifies whether it is positive, negative, or zero. The range of this function is: {-1, 0, 1}
If x > 0 → f(x) = 1
If x = 0 → f(x) = 0
If x < 0 → f(x) = -1
This function is commonly used in programming and logic-based applications like conditional branching, sign detection in algorithms, and many more.
Even and Odd Functions
These functions are categorized based on how they behave when the input is replaced by its negative:
A function is even if:
f(-x) = f(x)
(The graph is symmetric about the y-axis)
Examples: f(x) = x², f(x) = cos x
A function is odd if:
f(-x) = -f(x)
(The graph is symmetric about the origin)
Examples: f(x) = x³, f(x) = sin x
Periodic Function
A function is called periodic if it repeats its values in regular intervals. In simple terms, for some value T, the function satisfies:
f(x + T) = f(x) for all x
Trigonometric functions like sin x and cos x are classic examples, repeating every 2π. For instance, f(x) = sin x has a period of 2π and a range of [-1, 1].
Inverse Function
The inverse function of f(x), written as f⁻¹(x), essentially reverses the effect of f(x). In the inverse:
When the domain is f(x) then the range is f⁻¹(x)
The range of f(x) becomes the domain of f⁻¹(x)
An inverse function exists only if the original function is bijective (both one-to-one and onto).
Example:
If f(x) = x², then the inverse of f⁻¹(x) = √x (with domain restrictions).
For sin x, the domain is R, and the range [-1, 1]. For the inverse function sin⁻¹x, the domain is [-1, 1], and the range R is -2, 2, not R.
Greatest Integer Function
Also known as the floor function, this function maps any real number to the greatest integer less than or equal to it. It is written as:
f(x) = ⌊x⌋
Example: ⌊2.8⌋ = 2, ⌊-1.3⌋ = -2
The output is always an integer, and the graph appears as a step curve due to its jump at every integer value.
Domain: All real numbers (ℝ)
Range: Integers (ℤ)
Composite Function
A composite function is formed by applying one function to the output of another. If f(x) and g(x) are two functions, then the composite function is:
f∘g(x) = f(g(x))
In this case, the output of g(x) becomes the input for f(x).
Example:
Let f(x) = 2x + 3 and g(x) = x + 1
Then, f∘g(x) = f(g(x)) = f(x + 1) = 2(x + 1) + 3 = 2x + 5.
Graphs of Different Types of Functions
Each type of function has a unique graphical representation and must satisfy the vertical line test to be considered a function. The shape of the graph varies based on the type of function. For example:
The figure below shows the graphs of various other types of function types. Many of these graphs include horizontal, vertical, or even both types of asymptotes, depending on the nature of the function.
Learning the different types of functions helps students solve real-life problems. Let’s now look at some real-life applications:
Functions are widely used in math to represent how one quantity changes in response to another. Students might make some mistakes when learning different types of functions. Here are a few common mistakes and tips to avoid them:
Function: f(x) = 2x + 3 Find: f(2)
f(2) = 7
Here, the identify of the input value: x = 2
Let’s replace x with 2 in the function:
→ f(2) = 2(2) + 3
= 2 × 2 = 4
Simplify the function: 4 + 3 = 7
Therefore, f(2) = 7.
Function: f(x) = 2ˣ Find: f(3)
f(3) = 8
Identify the input value: x = 3
Next, we replace x with 3 in the function:
→ f(3) = 2³
Now, simplify the function 2³: 2 × 2 × 2 = 8
Therefore, f(3) = 8.
Function: f(x) = |x - 4| Find: f(2)
f(2) = 2
Here, the identify the input value: x = 2
To find f(2), we replace x with 2:
→ f(2) = |2 – 4|
Simplifying the expression: 2 – 4 = -2
Taking absolute value: |-2| = 2
Therefore, f(2) = 2.
Function: f(x) = x² - 4x + 5 Find: f(3)
f(3) = 2
The input value we need to identify is: x = 3
Substituting the value of x with 3 in the function:
→ f(3) = (3)² - 4(3) + 5
= 9 – 12 + 5
Now, simplify the function: -3 + 5 = 2
Therefore, f(3) = 2.
Function: f(x) = 7 Find: f(10)
f(10) = 7
Understand the function:
Here, the function f(x) = 7 is a constant function, which means it gives the same output for any input.
Finding the value of f(10), x = 10.
Apply the function rule:
As the function says f(x) = 7 (for all values of x),
f(10) = 7
Therefore, f(10) = 7
Jaskaran Singh Saluja is a math wizard with nearly three years of experience as a math teacher. His expertise is in algebra, so he can make algebra classes interesting by turning tricky equations into simple puzzles.
: He loves to play the quiz with kids through algebra to make kids love it.