Menu Top
Complete Course of Mathematics
Topic 1: Numbers & Numerical Applications Topic 2: Algebra Topic 3: Quantitative Aptitude
Topic 4: Geometry Topic 5: Construction Topic 6: Coordinate Geometry
Topic 7: Mensuration Topic 8: Trigonometry Topic 9: Sets, Relations & Functions
Topic 10: Calculus Topic 11: Mathematical Reasoning Topic 12: Vectors & Three-Dimensional Geometry
Topic 13: Linear Programming Topic 14: Index Numbers & Time-Based Data Topic 15: Financial Mathematics
Topic 16: Statistics & Probability


Content On This Page
One-to-One (Injective) Functions Onto (Surjective) Functions Bijective Functions
Many-to-One Functions Into Functions


Types of Functions



One-to-One (Injective) Functions

Functions can be classified based on how elements from the domain map to elements in the codomain. A key classification is whether distinct input values always produce distinct output values.

Definition of a One-to-One Function

A function $f: A \to B$ is called a one-to-one function or an injective function (or simply an injection) if and only if every element in the codomain $B$ that is an image of some element in $A$ has exactly one pre-image in $A$. Put simply, distinct elements in the domain are mapped to distinct elements in the codomain.

Formal Condition:

A function $f: A \to B$ is one-to-one (injective) if for all $x_1, x_2$ in the domain $A$,

If $f(x_1) = f(x_2)$, then $x_1 = x_2$

An equivalent way to state this condition (using the contrapositive) is:

If $x_1 \neq x_2$, then $f(x_1) \neq f(x_2)$

This means that if you pick any two different input values from the domain, their corresponding output values in the codomain must also be different.

In terms of ordered pairs, a function is injective if no two distinct ordered pairs have the same second component.

Methods to Check for Injectivity

  1. Algebraic Method:

    This is the standard method for functions defined by an equation or rule.
    • Assume that $f(x_1) = f(x_2)$ for two arbitrary elements $x_1$ and $x_2$ from the domain $A$.
    • Using the function's rule, manipulate the equation $f(x_1) = f(x_2)$ algebraically.
    • If, through valid algebraic steps, you can logically conclude that $x_1$ must be equal to $x_2$ (and this is the only possibility), then the function is injective.
    • If you can show or find a specific counterexample where $f(x_1) = f(x_2)$ is true for two distinct values $x_1 \neq x_2$, then the function is not injective.
  2. Graphical Method (Horizontal Line Test):

    This applies to functions whose domain and codomain are subsets of real numbers, allowing their graph to be drawn on the Cartesian plane ($y=f(x)$).
    • Draw the graph of the function $y = f(x)$.
    • Draw any horizontal line across the coordinate plane.
    • If you can draw even one horizontal line that intersects the graph at more than one point, the function is not one-to-one.
    • If every possible horizontal line intersects the graph at at most one point (meaning it might intersect once or not at all), the function is one-to-one.
    • Reasoning: A horizontal line corresponds to a fixed output value $y=c$. If this line intersects the graph at two different points $(x_1, c)$ and $(x_2, c)$ with $x_1 \neq x_2$, it means $f(x_1) = c$ and $f(x_2) = c$. This directly violates the definition of injectivity ($f(x_1)=f(x_2)$ but $x_1 \neq x_2$).
    Two graphs: Left shows y=x^2 failing the horizontal line test, Right shows y=x^3 passing the horizontal line test.
    (Imagine an image showing two graphs on coordinate planes. The left graph is $y=x^2$; a horizontal line intersects it at two points. The right graph is $y=x^3$; any horizontal line intersects it at most once. $y=x^2$ fails the test (not 1-1), $y=x^3$ passes the test (is 1-1)).
  3. Arrow Diagram Method:

    For functions between finite sets represented by arrow diagrams ($f: A \to B$).
    • Examine the arrows that point to elements in the codomain $B$.
    • If any element in the codomain $B$ has more than one arrow pointing towards it (meaning it is the image of multiple distinct elements in the domain A), the function is not one-to-one.
    • If every element in the codomain $B$ has at most one arrow pointing towards it (meaning it receives either one arrow or no arrows), the function is one-to-one.
    Two arrow diagrams: Left shows two arrows converging on one element in B (not 1-1). Right shows each element in B having at most one incoming arrow (is 1-1).
    (Imagine an image showing two arrow diagrams from A to B. In the left diagram, elements $a_1$ and $a_2$ from A both map to $b_1$ in B. In the right diagram, elements from A map to distinct elements in B; no two arrows point to the same element in B).

Example 1. Let $A = \{1, 2, 3\}$, $B = \{p, q, r, s\}$. Is the function $f: A \to B$ defined by $f = \{(1, p), (2, q), (3, r)\}$ one-to-one?

Answer:

Given: $A = \{1, 2, 3\}$, $B = \{p, q, r, s\}$, function $f = \{(1, p), (2, q), (3, r)\}$.

To Determine: Is $f$ one-to-one?

Solution:

We check if distinct elements in the domain map to distinct elements in the codomain.

$f(1) = p$, $f(2) = q$, $f(3) = r$.

  • $1 \neq 2$, and $f(1) = p \neq q = f(2)$.
  • $1 \neq 3$, and $f(1) = p \neq r = f(3)$.
  • $2 \neq 3$, and $f(2) = q \neq r = f(3)$.

For any pair of distinct elements in the domain A, their images are distinct elements in the codomain B.

Alternatively, using the definition $f(x_1) = f(x_2) \implies x_1 = x_2$:

  • If $f(x_1) = f(x_2)$, the possible output values are p, q, or r.
  • If $f(x_1) = p$, then $x_1$ must be 1. If $f(x_2) = p$, then $x_2$ must be 1. So $x_1 = x_2 = 1$.
  • If $f(x_1) = q$, then $x_1$ must be 2. If $f(x_2) = q$, then $x_2$ must be 2. So $x_1 = x_2 = 2$.
  • If $f(x_1) = r$, then $x_1$ must be 3. If $f(x_2) = r$, then $x_2$ must be 3. So $x_1 = x_2 = 3$.

In every case where the outputs are equal, the inputs must also be equal.

Using the Arrow Diagram perspective (imagine the diagram): Arrows point to p, q, r. Each of these receives exactly one arrow. Element 's' receives no arrows, which is fine for injectivity.

Therefore, the function $f$ is one-to-one (injective).


Example 2. Is the function $g: \mathbb{R} \to \mathbb{R}$ defined by $g(x) = x^2$ one-to-one?

Answer:

Given: Function $g: \mathbb{R} \to \mathbb{R}$ defined by $g(x) = x^2$.

To Determine: Is $g$ one-to-one?

Solution:

We check the condition for injectivity: $g(x_1) = g(x_2) \implies x_1 = x_2$.

Let $x_1, x_2 \in \mathbb{R}$ such that $g(x_1) = g(x_2)$.

$x_1^2 = x_2^2$

Taking the square root of both sides introduces $\pm$: $x_1 = \pm x_2$.

This means $x_1 = x_2$ or $x_1 = -x_2$.

For the function to be one-to-one, we must conclude that $x_1 = x_2$ is the *only* possibility. However, $x_1 = -x_2$ allows for cases where $x_1 \neq x_2$.

For example, choose $x_1 = 5$ and $x_2 = -5$. $x_1 \neq x_2$.

$g(x_1) = g(5) = 5^2 = 25$.

$g(x_2) = g(-5) = (-5)^2 = 25$.

Here, we have $g(x_1) = g(x_2)$ (both equal to 25), but $x_1 \neq x_2$ (5 $\neq$ -5).

Since we found distinct input values that produce the same output value, the function $g(x) = x^2$ on $\mathbb{R}$ is not one-to-one (not injective).

Graphical Method: The graph of $y = x^2$ is a parabola opening upwards. A horizontal line drawn at $y = 4$ (for example) intersects the graph at $x=2$ and $x=-2$. Since one horizontal line intersects the graph at two points, the function fails the Horizontal Line Test.


Example 3. Is the function $h: \mathbb{N} \to \mathbb{N}$ defined by $h(x) = x+5$ one-to-one?

Answer:

Given: Function $h: \mathbb{N} \to \mathbb{N}$ defined by $h(x) = x+5$. Domain and Codomain are $\mathbb{N} = \{1, 2, 3, ...\}$.

To Determine: Is $h$ one-to-one?

Solution:

Assume $h(x_1) = h(x_2)$ for $x_1, x_2 \in \mathbb{N}$.

$x_1 + 5 = x_2 + 5$

Subtract 5 from both sides:

$x_1 = x_2$

... (i)

Since the assumption $h(x_1) = h(x_2)$ led directly and only to the conclusion $x_1 = x_2$, the function satisfies the condition for injectivity.

Therefore, the function $h(x) = x+5$ on $\mathbb{N}$ is one-to-one (injective).

This makes sense: if you add 5 to two different natural numbers, you will always get two different results ($1+5=6, 2+5=7, 3+5=8, ...$).


Onto (Surjective) Functions

Another way to classify functions relates to whether the function "covers" its entire specified codomain. A function is onto if every element in the codomain is actually produced as an output for some input from the domain.

Definition of an Onto Function

A function $f: A \to B$ is called an onto function or a surjective function (or simply a surjection) if and only if for every element $y$ in the codomain $B$, there exists at least one element $x$ in the domain $A$ such that $f(x) = y$.

Formal Condition:

A function $f: A \to B$ is onto (surjective) $\iff \forall y \in B, \exists x \in A \text{ such that } f(x) = y$

This condition means that every element in the codomain $B$ is the image of at least one element in the domain $A$. No element in the codomain is "left out" as a possible output value.

An equivalent definition of a surjective function is that its range is equal to its codomain.

$f \text{ is onto (surjective) } \iff \text{Range}(f) = \text{Codomain}(f)$

Methods to Check for Surjectivity

  1. Conceptual Method (Comparing Range and Codomain):

    • Determine the range of the function $f: A \to B$. This is the set of all actual output values $\{f(x) \mid x \in A\}$.
    • Compare the determined range with the given codomain $B$.
    • If the Range is exactly the same set as the Codomain ($Range(f) = B$), the function is onto.
    • If the Range is a proper subset of the Codomain ($Range(f) \subset B$), meaning there are elements in B that are not in the Range, the function is not onto.
  2. Algebraic Method:

    This is useful for functions defined by a rule or equation.
    • Take an arbitrary element $y$ from the codomain $B$.
    • Set the function's rule equal to $y$, i.e., set $f(x) = y$.
    • Try to solve this equation for $x$ in terms of $y$.
    • If, for *every* possible choice of $y$ from the codomain $B$, you can find at least one value of $x$ that is in the domain $A$ and satisfies $f(x)=y$, then the function is onto.
    • If you can find even one specific element $y_0$ in the codomain $B$ such that the equation $f(x) = y_0$ has no solution for $x$ within the domain $A$, then the function is not onto.
  3. Arrow Diagram Method:

    For functions between finite sets represented by arrow diagrams ($f: A \to B$).
    • Examine the elements in the codomain oval (Set B).
    • If every element in $B$ has at least one arrow pointing towards it from elements in $A$, the function is onto.
    • If there is any element in $B$ that has no arrows pointing towards it, the function is not onto.
    Two arrow diagrams: Left shows an element in B with no incoming arrows (not onto). Right shows every element in B having at least one incoming arrow (is onto).
    (Imagine an image showing two arrow diagrams from A to B. In the left diagram, element $b_3$ in B receives no arrows. In the right diagram, every element in B receives at least one arrow).

Example 4. Let $A = \{1, 2, 3, 4\}$, $B = \{a, b, c\}$. Is the function $f = \{(1, a), (2, b), (3, a), (4, c)\}$ onto?

Answer:

Given: $A = \{1, 2, 3, 4\}$, $B = \{a, b, c\}$, function $f = \{(1, a), (2, b), (3, a), (4, c)\}$.

To Determine: Is $f$ onto?

Solution:

The domain is $A = \{1, 2, 3, 4\}$. The codomain is $B = \{a, b, c\}$.

We find the range of the function, which is the set of all actual output values:

The outputs are the second components of the ordered pairs in $f$: a, b, a, c.

The set of distinct output values is $\{a, b, c\}$.

Range$(f) = \{a, b, c\}$

Now, compare the Range with the Codomain.

Range$(f) = \{a, b, c\}$

Codomain$(f) = \{a, b, c\}$

Since Range$(f) = \text{Codomain}(f)$, the function $f$ is onto (surjective).

Using the Arrow Diagram perspective (imagine the diagram from Example 1 of I1, relation (ii)): Arrows point to a, b, c. Element 'a' receives arrows from 1 and 3, 'b' receives from 2, 'c' receives from 4. Every element in the codomain B (a, b, c) has at least one arrow pointing to it.


Example 5. Is the function $h: \mathbb{N} \to \mathbb{N}$ defined by $h(x) = x+5$ onto?

Answer:

Given: Function $h: \mathbb{N} \to \mathbb{N}$ defined by $h(x) = x+5$. Domain and Codomain are $\mathbb{N} = \{1, 2, 3, ...\}$.

To Determine: Is $h$ onto?

Solution:

The domain is $\mathbb{N}$ and the codomain is $\mathbb{N}$.

We need to find the range of the function. The range is the set of all possible values of $h(x) = x+5$ where $x \in \mathbb{N}$.

If $x=1$, $h(1) = 1+5 = 6$.

If $x=2$, $h(2) = 2+5 = 7$.

If $x=3$, $h(3) = 3+5 = 8$.

The output values are $6, 7, 8, 9, ...$. This is the set of natural numbers greater than or equal to 6.

Range$(h) = \{y \in \mathbb{N} \mid y \ge 6\} = \{6, 7, 8, ...\}$

Now, compare the Range with the Codomain.

Range$(h) = \{6, 7, 8, ...\}$

Codomain$(h) = \mathbb{N} = \{1, 2, 3, 4, 5, 6, 7, 8, ...\}$

The Range is a proper subset of the Codomain (e.g., elements 1, 2, 3, 4, 5 are in the codomain but not in the range; they are not images of any element in the domain $\mathbb{N}$).

Since Range $\neq$ Codomain, the function $h$ is not onto (not surjective).

Algebraic Check: Choose $y=1$ from the codomain $\mathbb{N}$. Can we find $x \in \mathbb{N}$ such that $h(x) = x+5 = 1$? $x = 1-5 = -4$. Is $-4 \in \mathbb{N}$ (the domain)? No. Since we found an element in the codomain (1) which has no pre-image in the domain, the function is not onto.


Summary for Competitive Exams

Function ($f: A \to B$): Every element in A maps to exactly one element in B.

Types of Functions:

  • One-to-One (Injective): Distinct inputs map to distinct outputs. $f(x_1)=f(x_2) \implies x_1=x_2$. Each element in the range has exactly one pre-image.
  • Onto (Surjective): Every element in the codomain B is an image of at least one element in the domain A. Range$(f) = $ Codomain$(f)$. Each element in the codomain has at least one pre-image.

Checking Tips:

  • Injectivity (1-1): Algebraic ($f(x_1)=f(x_2) \implies x_1=x_2$), Graphical (Horizontal Line Test - intersects $\le$ once), Arrow Diagram (each element in B gets $\le$ 1 arrow).
  • Surjectivity (Onto): Conceptual ($Range(f) = $ Codomain$(f)$), Algebraic (for every $y$ in Codomain, $f(x)=y$ has solution $x$ in Domain), Arrow Diagram (every element in B gets $\ge$ 1 arrow).


Bijective Functions

Bijective functions represent a special and powerful type of mapping between two sets. They are functions that are simultaneously both injective (one-to-one) and surjective (onto).

Definition of a Bijective Function

A function $f: A \to B$ is called a bijective function (or a bijection or a one-to-one correspondence) if and only if it satisfies both of the following conditions:

  1. $f$ is Injective (One-to-One):

    Distinct elements in the domain $A$ map to distinct elements in the codomain $B$.

    $\forall x_1, x_2 \in A, f(x_1) = f(x_2) \implies x_1 = x_2$

  2. $f$ is Surjective (Onto):

    Every element in the codomain $B$ is the image of at least one element in the domain $A$.

    $\forall y \in B, \exists x \in A \text{ such that } f(x) = y$

    This is equivalent to saying that the Range of $f$ is equal to its Codomain: Range$(f) = B$.

A bijective function establishes a perfect pairing between the elements of the domain and the codomain. Each element in the domain is matched with exactly one element in the codomain, and each element in the codomain is matched with exactly one element in the domain (each element in B has exactly one pre-image in A).

If a bijection exists between two finite sets $A$ and $B$, then the number of elements in $A$ must be equal to the number of elements in $B$. This is often used to count elements in finite sets.

If $f: A \to B$ is a bijection and A, B are finite, then $|A| = |B|$

Significance of Bijective Functions

Bijective functions are particularly important because they are precisely the functions that have a well-defined inverse function. If $f: A \to B$ is a bijection, then there exists a unique function $f^{-1}: B \to A$ such that for every $x \in A$ and $y \in B$, $f^{-1}(y) = x$ if and only if $f(x) = y$. The inverse function "undoes" the action of the original function.


Example 1. Determine if the following functions are bijective:

(i) $f: \{1, 2, 3\} \to \{a, b, c\}$ defined by $f = \{(1, a), (2, c), (3, b)\}$

(ii) $g: \mathbb{Z} \to \mathbb{Z}$ defined by $g(x) = x + 1$

(iii) $h: \mathbb{R} \to \mathbb{R}$ defined by $h(x) = x^2$

Answer:

Given: Functions as described.

To Determine: Are they bijective?

We need to check both injectivity and surjectivity for each function.

  • (i) $f: \{1, 2, 3\} \to \{a, b, c\}$ defined by $f = \{(1, a), (2, c), (3, b)\}$

    Domain $A=\{1, 2, 3\}$, Codomain $B=\{a, b, c\}$.

    • Injectivity: Check if distinct inputs map to distinct outputs. $f(1)=a, f(2)=c, f(3)=b$. The outputs a, c, b are all distinct. So, $f$ is one-to-one (injective).
    • Surjectivity: Find the range. Range$(f) = \{a, c, b\} = \{a, b, c\}$. The codomain is $\{a, b, c\}$. Since Range = Codomain, $f$ is onto (surjective).

    Since $f$ is both injective and surjective, it is bijective.

  • (ii) $g: \mathbb{Z} \to \mathbb{Z}$ defined by $g(x) = x + 1$

    Domain $\mathbb{Z}$, Codomain $\mathbb{Z}$.

    • Injectivity: Assume $g(x_1) = g(x_2)$ for $x_1, x_2 \in \mathbb{Z}$.

      $x_1 + 1 = x_2 + 1$

      Subtracting 1 from both sides gives $x_1 = x_2$. So, $g$ is one-to-one (injective).

    • Surjectivity: Is every integer in the codomain $\mathbb{Z}$ an image of some integer in the domain $\mathbb{Z}$?

      Let $y$ be an arbitrary integer in the codomain $\mathbb{Z}$. Can we find an integer $x$ in the domain $\mathbb{Z}$ such that $g(x) = y$? Set $x+1 = y$. Solving for $x$ gives $x = y - 1$. If $y$ is an integer, then $y-1$ is also an integer. So, for every $y \in \mathbb{Z}$ (codomain), we found an $x = y-1 \in \mathbb{Z}$ (domain) such that $g(x)=y$. Thus, $g$ is onto (surjective).

      (Alternatively, Range$(g) = \{x+1 \mid x \in \mathbb{Z}\} = \{..., -1+1, 0+1, 1+1, ...\} = \{..., 0, 1, 2, ...\} = \mathbb{Z}$. Since Range = Codomain, $g$ is onto).

    Since $g$ is both injective and surjective, it is bijective.

  • (iii) $h: \mathbb{R} \to \mathbb{R}$ defined by $h(x) = x^2$

    Domain $\mathbb{R}$, Codomain $\mathbb{R}$.

    • Injectivity: We checked this in Example 2 of I1. We found that $h(x_1) = h(x_2)$ does not imply $x_1=x_2$ (e.g., $h(2) = h(-2) = 4$). So, $h$ is not one-to-one (not injective).
    • Surjectivity: We need to check if every real number in the codomain $\mathbb{R}$ is the image of some real number in the domain $\mathbb{R}$. The range of $h(x)=x^2$ on $\mathbb{R}$ is $[0, \infty)$ (all non-negative real numbers). The codomain is $\mathbb{R}$. Since Range $[0, \infty) \neq$ Codomain $\mathbb{R}$ (e.g., negative numbers like -5 are in the codomain but not the range), $h$ is not onto (not surjective).

    Since $h$ is neither injective nor surjective, it is not bijective.


Many-to-One Functions

A function is classified as many-to-one if it fails the condition of being one-to-one. This means that at least two different input values from the domain map to the same output value in the codomain.

Definition of a Many-to-One Function

A function $f: A \to B$ is called a many-to-one function if there exist at least two distinct elements $x_1, x_2$ in the domain $A$ (i.e., $x_1 \neq x_2$) such that they are mapped to the same element in the codomain $B$ (i.e., $f(x_1) = f(x_2)$).

Equivalently, a function is many-to-one if it is not injective.

This implies that there is at least one element in the range of the function that is the image of more than one element from the domain.

Examples of Many-to-One Functions

In an arrow diagram, a many-to-one function is characterized by having at least one element in the codomain oval with two or more arrows pointing to it from the domain oval.

Graphically (for functions on $\mathbb{R}$), a many-to-one function is characterized by failing the Horizontal Line Test. If a horizontal line intersects the graph in more than one point, those points correspond to distinct inputs having the same output.


Into Functions

An into function is simply a function that is not surjective. This means that the function's actual output values do not cover the entire specified codomain; there are elements in the codomain that are never produced as outputs.

Definition of an Into Function

A function $f: A \to B$ is called an into function if and only if it is not surjective (not onto).

This is equivalent to saying that the range of the function $f$ is a proper subset of its codomain $B$.

$f \text{ is an into function } \iff \text{Range}(f) \subset B \quad (\text{and } \text{Range}(f) \neq B)$

The condition $Range(f) \subset B$ means that there exists at least one element $y$ in the codomain $B$ such that $y$ is not in the range of $f$. In other words, there is at least one element $y \in B$ for which there is no element $x \in A$ such that $f(x) = y$.

Examples of Into Functions

In an arrow diagram, an into function is characterized by having at least one element in the codomain oval (Set B) that has no arrows pointing to it from elements in A.

Classification Grid

Combining the classifications based on injectivity and surjectivity provides a comprehensive way to categorize functions $f: A \to B$:

Surjective (Onto)Not Surjective (Into)
Injective (One-to-One) Bijective Injective Only
Not Injective (Many-to-One) Surjective Only Neither Injective Nor Surjective

Any given function falls into exactly one of these four categories.

Key Consideration: The type of function depends critically on the explicitly defined domain and codomain, not just the rule. For example, $f(x) = x^2$:


Summary for Competitive Exams

Types of Functions ($f: A \to B$):

  • Injective (1-1): $f(x_1)=f(x_2) \implies x_1=x_2$. Distinct inputs give distinct outputs.
  • Surjective (Onto): Range$(f) = $ Codomain$(f)$. Every codomain element is an image.
  • Bijective: Both Injective AND Surjective (1-1 Correspondence).
  • Many-to-One: NOT Injective (at least two inputs map to same output).
  • Into: NOT Surjective (Range is proper subset of Codomain).

Classification Grid:

SurjectiveInto
InjectiveBijectiveInjective Only
Many-to-OneSurjective OnlyNeither

Function classification depends entirely on the specified Domain and Codomain.