Types of Functions: Classification, Graphs and Examples

#Algebra
TL;DR
Types of functions are grouped by mapping, degree, range and family. Each type below has its definition, conditions, a graph or mapping diagram and a checked example, with practice answers at the end.
MV
Madhukar VLast updated on October 13, 202615 min read

What Are The Types of Functions?

A function f:A→Bf: A \to B is a rule that assigns every element of the set AA exactly one element of the set BB, and the types of functions describe how that rule behaves. They are classified in four main ways: by how inputs are paired with outputs (mapping), by the highest power in the rule (degree), by the kind of output (range), and by the family the rule belongs to (algebraic, trigonometric, exponential, logarithmic). A few more names describe symmetry (even, odd, periodic) or how functions combine (inverse, composite).

Three words carry every classification below:

  • Domain: the set AA of allowed inputs.

  • Codomain: the set BB the outputs are declared to lie in.

  • Range: the outputs that actually occur. The range is always inside the codomain, but it can be smaller.

A function's type can depend on its domain and codomain, so every mapping example on this page states both. The notation f(x)f(x) itself is Euler's: he introduced it in 1734 (MacTutor: Leonhard Euler). For the difference between a function and a general relation, see relations and functions.

Classified by

Question it answers

Types

Mapping

How are inputs paired with outputs?

One-one, many-one, onto, into, bijective

Degree

What is the highest power of xx?

Constant, identity, linear, quadratic, cubic, polynomial

Range

What kind of output does the rule give?

Modulus, signum, greatest integer

Family

Which kind of rule is it?

Algebraic (including rational), trigonometric, inverse trigonometric, exponential, logarithmic

Symmetry and combination

How does it behave or combine?

Even, odd, periodic, inverse, composite

One function can belong to several types at once: f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=x3f(x) = x^3 is cubic, bijective, algebraic and odd.

Types of Functions Based on Mapping

Type

Condition

Example (domain and codomain stated)

One-one (injective)

Different inputs always give different outputs: f(a)=f(b)f(a) = f(b) only when a=ba = b

f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=2x+1f(x) = 2x + 1

Many-one

At least two different inputs share an output

f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=x2f(x) = x^2, since f(2)=f(−2)=4f(2) = f(-2) = 4

Onto (surjective)

Every element of the codomain is an output: range = codomain

f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=x3f(x) = x^3

Into

Some element of the codomain is never an output: range is smaller than the codomain

f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=x2f(x) = x^2, since no input gives −1-1

Bijective

Both one-one and onto

f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=x+5f(x) = x + 5

The two questions are independent, so every function on finite or infinite sets falls into one cell of this grid:

Onto

Into

One-one

f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=2x−3f(x) = 2x - 3 (bijective)

f:Z→Zf: \mathbb{Z} \to \mathbb{Z}, f(n)=2nf(n) = 2n (odd integers never appear)

Many-one

f:R→[0,∞)f: \mathbb{R} \to [0, \infty), f(x)=x2f(x) = x^2

f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=x2f(x) = x^2

A constant function such as f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=7f(x) = 7 is many-one and into: every input gives 77, and no other number is ever an output.

Types of Functions Based on Mapping

Testing one-one and onto from a graph

The horizontal line test checks a graph of f:R→Rf: \mathbb{R} \to \mathbb{R}: draw horizontal lines y=cy = c across it. If some line crosses the graph more than once, ff is not one-one. If some line y=cy = c, with cc in the codomain, misses the graph completely, ff is not onto. (The vertical line test is different: it checks whether a graph is a function at all.)

Horizontal line test for types of functions on the parabola y = x^2 and the line y = 2x - 3

Types of Functions Based on Degree

These are polynomial functions, sorted by the highest power of xx with a non-zero coefficient.

Type

Rule and condition

Degree

Example

Graph

Constant

f(x)=cf(x) = c

0 if c≠0c \neq 0

f(x)=7f(x) = 7

Horizontal line

Zero function

f(x)=0f(x) = 0

Undefined

f(x)=0f(x) = 0

The x-axis

Identity

f(x)=xf(x) = x on a set AA, mapping AA to AA

1

f(x)=xf(x) = x

Line through the origin, slope 1

Linear

f(x)=ax+bf(x) = ax + b, a≠0a \neq 0

1

f(x)=2x+3f(x) = 2x + 3

Straight line with slope aa

Quadratic

f(x)=ax2+bx+cf(x) = ax^2 + bx + c, a≠0a \neq 0

2

f(x)=x2−4f(x) = x^2 - 4

Parabola

Cubic

f(x)=ax3+bx2+cx+df(x) = ax^3 + bx^2 + cx + d, a≠0a \neq 0

3

f(x)=x3−xf(x) = x^3 - x

S-shaped curve

Polynomial

f(x)=anxn+⋯+a1x+a0f(x) = a_n x^n + \dots + a_1 x + a_0, an≠0a_n \neq 0

nn

f(x)=x4−3x+1f(x) = x^4 - 3x + 1

Smooth curve with at most n−1n - 1 turning points

The conditions matter. If a=0a = 0 in ax+bax + b, the rule is the constant bb, not a linear function; if a=0a = 0 in ax2+bx+cax^2 + bx + c, the rule is at most linear. A polynomial of degree nn has at most nn real zeros. More on each type: polynomials, quadratic equations and cubic polynomials.

Types of Functions Based on Range

These functions are named for the kind of output they produce.

Type

Rule

Domain and range

Example

Modulus (absolute value)

f(x)=∣x∣f(x) = \lvert x \rvert: xx if x≥0x \geq 0, and −x-x if x<0x < 0

Domain R\mathbb{R}, range [0,∞)[0, \infty)

f(−3)=3f(-3) = 3

Signum

sgn⁡(x)=1\operatorname{sgn}(x) = 1 if x>0x > 0, 00 if x=0x = 0, −1-1 if x<0x < 0

Domain R\mathbb{R}, range −1,0,1{-1, 0, 1}

sgn⁡(−5)=−1\operatorname{sgn}(-5) = -1

Greatest integer (floor)

⌊x⌋\lfloor x \rfloor = the largest integer less than or equal to xx

Domain R\mathbb{R}, range Z\mathbb{Z}

⌊3.7⌋=3\lfloor 3.7 \rfloor = 3, ⌊−2.3⌋=−3\lfloor -2.3 \rfloor = -3

All three are many-one on R\mathbb{R}: for example ∣3∣=∣−3∣\lvert 3 \rvert = \lvert -3 \rvert and ⌊3.2⌋=⌊3.9⌋\lfloor 3.2 \rfloor = \lfloor 3.9 \rfloor.

Types of Functions Based on Family

Family

Rule and condition

Domain and range

Example

Algebraic

Built from xx with ++, −-, ×\times, ÷\div, powers and roots: polynomials, rational and root functions

Depends on the rule

f(x)=xf(x) = \sqrt{x}, domain [0,∞)[0, \infty)

Rational (algebraic)

f(x)=P(x)Q(x)f(x) = \frac{P(x)}{Q(x)}, with polynomials PP, QQ and QQ not the zero polynomial

All reals except the zeros of QQ

f(x)=1xf(x) = \frac{1}{x}, x≠0x \neq 0

Trigonometric

sin⁡x\sin x, cos⁡x\cos x, tan⁡x\tan x and their reciprocals

sin⁡x\sin x: domain R\mathbb{R}, range [−1,1][-1, 1]

sin⁡π2=1\sin \frac{\pi}{2} = 1

Inverse trigonometric

sin⁡−1x\sin^{-1} x, cos⁡−1x\cos^{-1} x, tan⁡−1x\tan^{-1} x, defined after restricting each trigonometric function to a one-one piece

sin⁡−1x\sin^{-1} x: domain [−1,1][-1, 1], range [−π2,π2][-\frac{\pi}{2}, \frac{\pi}{2}]

sin⁡−11=π2\sin^{-1} 1 = \frac{\pi}{2}

Exponential

f(x)=axf(x) = a^x, with a>0a > 0 and a≠1a \neq 1

Domain R\mathbb{R}, range (0,∞)(0, \infty)

23=82^3 = 8

Logarithmic

f(x)=log⁡axf(x) = \log_a x, with a>0a > 0 and a≠1a \neq 1; the inverse of axa^x

Domain (0,∞)(0, \infty), range R\mathbb{R}

log⁡28=3\log_2 8 = 3

The base conditions are not decoration. With a=1a = 1, 1x=11^x = 1 for every xx, which is a constant function; with a<0a < 0, a value like (−4)12(-4)^{\frac{1}{2}} is not a real number.

Other Types: Even, Odd, Periodic, Inverse and Composite

Type

Condition

Example

Even

f(−x)=f(x)f(-x) = f(x) for every xx in the domain; graph symmetric about the y-axis

x2x^2, cos⁡x\cos x, ∣x∣\lvert x \rvert

Odd

f(−x)=−f(x)f(-x) = -f(x) for every xx in the domain; graph symmetric about the origin

x3x^3, sin⁡x\sin x

Neither

Fails both tests

x2+xx^2 + x

Periodic

f(x+T)=f(x)f(x + T) = f(x) for all xx; the smallest such T>0T > 0 is the period

sin⁡x\sin x has period 2π2\pi; tan⁡x\tan x has period π\pi

Inverse

f−1(b)=af^{-1}(b) = a exactly when f(a)=bf(a) = b; exists only when ff is bijective

f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=x+5f(x) = x + 5 has f−1(x)=x−5f^{-1}(x) = x - 5

Composite

(f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x)): apply gg first, then ff

f(x)=x2f(x) = x^2, g(x)=x+1g(x) = x + 1 give (f∘g)(x)=(x+1)2(f \circ g)(x) = (x + 1)^2

Graphs of types of functions: linear, quadratic, cubic, modulus, exponential and log, and sine

What The Type Tells You

  • Inverses: only a bijective function has an inverse. To invert x2x^2, first restrict it to f:[0,∞)→[0,∞)f: [0, \infty) \to [0, \infty); its inverse is then x\sqrt{x}.

  • Graph shape: the type predicts the graph before you plot a point (see the grid above).

  • Number of solutions: a linear equation ax+b=0ax + b = 0 with a≠0a \neq 0 has exactly one solution; a polynomial equation of degree nn has at most nn real solutions.

  • Modelling: periodic functions model tides, sound waves and the length of daylight across a year; exponential functions model compound interest and early, unchecked population growth.

Examples of Types of Functions

Example 1

Show that f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=2x−3f(x) = 2x - 3 is bijective, and find its inverse.

One-one: suppose f(a)=f(b)f(a) = f(b).

2a−3=2b−32a - 3 = 2b - 3

2a=2b2a = 2b

a=ba = b

Onto: take any yy in the codomain R\mathbb{R} and solve f(x)=yf(x) = y.

2x−3=y2x - 3 = y

x=y+32x = \frac{y + 3}{2}

This xx is a real number for every real yy, so every element of the codomain is an output.

Final answer: ff is bijective (and linear, since a=2≠0a = 2 \neq 0), with f−1(x)=x+32f^{-1}(x) = \frac{x + 3}{2}.

Example 2

Is f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=x2f(x) = x^2 one-one?

The tempting argument: "every xx gives exactly one value of x2x^2, so the function is one-one." That sentence describes every function. One-one asks something stronger: do different inputs always give different outputs?

Test two different inputs:

f(2)=4f(2) = 4

f(−2)=4f(-2) = 4

Two inputs share the output 44, so ff is many-one. It is also into, because no real input gives −1-1.

Final answer: not one-one. Restricted to f:[0,∞)→[0,∞)f: [0, \infty) \to [0, \infty), the same rule becomes bijective.

Example 3

Is g(x)=x3−xg(x) = x^3 - x even, odd or neither? What about h(x)=x2+xh(x) = x^2 + x?

For gg, replace xx with −x-x:

g(−x)=(−x)3−(−x)g(-x) = (-x)^3 - (-x)

g(−x)=−x3+xg(-x) = -x^3 + x

g(−x)=−(x3−x)=−g(x)g(-x) = -(x^3 - x) = -g(x)

So gg is odd. For hh, test x=1x = 1:

h(1)=1+1=2h(1) = 1 + 1 = 2

h(−1)=1−1=0h(-1) = 1 - 1 = 0

Since h(−1)≠h(1)h(-1) \neq h(1) and h(−1)≠−h(1)h(-1) \neq -h(1), hh is neither even nor odd.

Final answer: gg is odd; hh is neither.

Example 4

Let f(x)=x2f(x) = x^2 and g(x)=x+1g(x) = x + 1. Find (f∘g)(3)(f \circ g)(3) and (g∘f)(3)(g \circ f)(3).

(f∘g)(3)=f(g(3))=f(4)=16(f \circ g)(3) = f(g(3)) = f(4) = 16

(g∘f)(3)=g(f(3))=g(9)=10(g \circ f)(3) = g(f(3)) = g(9) = 10

Final answer: 1616 and 1010. The order of a composite changes the result.

Example 5

Find ⌊−2.3⌋\lfloor -2.3 \rfloor, ⌊4⌋\lfloor 4 \rfloor and sgn⁡(−0.5)\operatorname{sgn}(-0.5).

The first instinct on ⌊−2.3⌋\lfloor -2.3 \rfloor is to drop the decimal and write −2-2. But −2-2 is greater than −2.3-2.3, and the floor must be less than or equal to the input. On the number line, the integers either side of −2.3-2.3 are −3-3 and −2-2, and only −3-3 is at or below it.

⌊−2.3⌋=−3\lfloor -2.3 \rfloor = -3

⌊4⌋=4\lfloor 4 \rfloor = 4

sgn⁡(−0.5)=−1\operatorname{sgn}(-0.5) = -1

Final answer: −3-3, 44 and −1-1.

Common mistakes with types of functions

Mistake 1: Deciding "onto" without looking at the codomain

Where it slips in: Questions that state the codomain in the notation f:A→Bf: A \to B, where students check the formula and skip the BB.

Don't do this: Calling f(x)=x2f(x) = x^2 "onto" or "not onto" from the formula alone.

The correct way: Compare the range with the stated codomain. For f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=x2f(x) = x^2 is not onto, because negative numbers have no pre-image (no input gives −1-1). For f:R→[0,∞)f: \mathbb{R} \to [0, \infty), the same rule is onto, because every y≥0y \geq 0 equals (y)2(\sqrt{y})^2.

Types of functions mistake: x squared is not onto R but is onto the non-negative reals

Mistake 2: Assuming even degree means even function

Where it slips in: Symmetry questions on polynomials, because "even" appears in both names.

Don't do this: Calling f(x)=x2+xf(x) = x^2 + x even because its degree is 2.

The correct way: Test f(−x)f(-x). Here f(−x)=x2−xf(-x) = x^2 - x, which is neither f(x)f(x) nor −f(x)-f(x), so the function is neither even nor odd. A polynomial is even only when every power of xx in it is even (a constant counts as x0x^0).

Mistake 3: Ignoring the condition on the leading coefficient or base

Where it slips in: Classifying a rule written with letters, such as f(x)=ax2+3x+1f(x) = ax^2 + 3x + 1 or f(x)=axf(x) = a^x, before checking the value of aa.

Don't do this: Calling f(x)=ax2+3x+1f(x) = ax^2 + 3x + 1 quadratic when a=0a = 0, or calling f(x)=1xf(x) = 1^x exponential.

The correct way: Check the condition first. With a=0a = 0, ax2+3x+1=3x+1ax^2 + 3x + 1 = 3x + 1, which is linear. An exponential function needs a>0a > 0 and a≠1a \neq 1, and 1x=11^x = 1 is constant.

Frequently Asked Questions

What are the main types of functions?

The types of functions are grouped by mapping (one-one, many-one, onto, into, bijective), by degree (constant, identity, linear, quadratic, cubic, polynomial), by range (modulus, signum, greatest integer) and by family (algebraic, trigonometric, inverse trigonometric, exponential, logarithmic). Even, odd, periodic, inverse and composite functions describe further properties.

What is the difference between an into function and an onto function?

An onto function reaches every element of its codomain. An into function misses at least one. Every function is exactly one of the two.

Can a function be both one-one and onto?

Yes. That is a bijective function, for example f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=2x−3f(x) = 2x - 3.

Is every linear function one-one?

Yes, as a function from R\mathbb{R} to R\mathbb{R}. When a≠0a \neq 0, f(x)=ax+bf(x) = ax + b is one-one and onto, with inverse f−1(x)=x−baf^{-1}(x) = \frac{x - b}{a}. If a=0a = 0, the rule is a constant function, which is many-one.

The Short Version

  • The types of functions are grouped by mapping, degree, range and family, and one function can belong to several types.

  • Mapping types (one-one, onto, bijective) depend on the stated domain and codomain, so always state both.

  • Degree types need a non-zero leading coefficient; exponential and logarithmic functions need a base a>0a > 0 with a≠1a \neq 1.

  • Only bijective functions have inverses.

  • Even and odd are symmetry tests on f(−x)f(-x), not statements about the degree.

Practice Problems With Answers

  1. Classify f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=x3+2xf(x) = x^3 + 2x by degree, mapping, family and symmetry.

  2. Show that f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=3x+1f(x) = 3x + 1 is bijective and find its inverse.

  3. Is f(x)=x4−x2f(x) = x^4 - x^2 even, odd or neither?

  4. Find ⌊−0.5⌋\lfloor -0.5 \rfloor, sgn⁡(−0.5)\operatorname{sgn}(-0.5) and ∣−0.5∣\lvert -0.5 \rvert.

  5. With f(x)=x−1f(x) = x - 1 and g(x)=2xg(x) = 2x, find (f∘g)(4)(f \circ g)(4) and (g∘f)(4)(g \circ f)(4).

Answers:

  1. Cubic (degree 3), bijective, algebraic and odd. One-one: if a<ba < b then a3<b3a^3 < b^3 and 2a<2b2a < 2b, so f(a)<f(b)f(a) < f(b). Onto: a cubic on R\mathbb{R} takes every real value. Odd: f(−x)=−x3−2x=−f(x)f(-x) = -x^3 - 2x = -f(x).

  2. From 3a+1=3b+13a + 1 = 3b + 1 we get a=ba = b; solving 3x+1=y3x + 1 = y gives x=y−13x = \frac{y - 1}{3} for every real yy. So ff is bijective with f−1(x)=x−13f^{-1}(x) = \frac{x - 1}{3}.

  3. Even: f(−x)=(−x)4−(−x)2=x4−x2=f(x)f(-x) = (-x)^4 - (-x)^2 = x^4 - x^2 = f(x).

  4. ⌊−0.5⌋=−1\lfloor -0.5 \rfloor = -1, sgn⁡(−0.5)=−1\operatorname{sgn}(-0.5) = -1 and ∣−0.5∣=0.5\lvert -0.5 \rvert = 0.5.

  5. (f∘g)(4)=f(8)=7(f \circ g)(4) = f(8) = 7 and (g∘f)(4)=g(3)=6(g \circ f)(4) = g(3) = 6.

If Example 2 or Mistake 1 still feels slippery, redo them with the mapping diagrams above. Want a live Bhanzu trainer to work through more function problems? Book a free demo class.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What are the main types of functions in math?
Three classifications: by mapping (one-one, onto, bijection), by degree (constant, linear, quadratic, cubic, polynomial), by concept (algebraic, trigonometric, exponential, logarithmic). Additional named types include modulus, rational, even/odd, periodic, greatest-integer, inverse, and composite.
How do you determine the type of a function?
Look at three things. The highest power of xx tells you the degree-type. The mapping between domain and codomain tells you mapping-type (test by picking two inputs). The form of the rule tells you the concept (does it have a trig function? an exponential? a polynomial?).
What is the difference between an into function and an onto function?
An onto function hits every element of the codomain. An into function misses at least one element of the codomain. They are opposites.
Can a function be both one-one and onto?
Yes — that is precisely the definition of a bijection. Bijections are the functions that have a proper two-sided inverse.
Is f(x)=x2f(x) = x^2 a function?
Yes. Every input xx produces exactly one output x2x^2. It is a function. It happens to be a many-one function (not one-one) because both xx and −x-x give the same output.
What type of function is always continuous?
All polynomial functions, all exponential functions, sin⁡x\sin x and cos⁡x\cos x, and the modulus function ∣x∣|x| are continuous everywhere. Rational functions are continuous except where the denominator is zero. The greatest-integer function has jumps at every integer.
What is a periodic function?
A function whose values repeat: f(x+T)=f(x)f(x + T) = f(x) for some positive number TT (the period). sin⁡x\sin x has period 2π2\pi. tan⁡x\tan x has period π\pi.
✍️ Written By
Madhukar V
Madhukar V
Math Columnist & Analyst
I see mathematics as more than just numbers and formulas—it is a way of thinking, questioning, and understanding the world around us. I work at the intersection of mathematics, EdTech, technology, and AI-powered learning, I enjoy exploring how mathematical ideas can be made simple, meaningful, and relatable. Through my articles, I aim to present mathematics with curiosity and a practical perspective, helping readers see the beauty and relevance behind every concept in a Bhanzu way.
LinkedIn
Related Articles
Book a FREE Demo ClassBook Now →