Injective Function
2026-02-28 08:31 Diff

169 Learners

Last updated on October 30, 2025

An injective function, or one-to-one function, is a function where each input is mapped to a unique output. In this article, we will learn about injective functions, their properties, graphs, and how to identify them.

What is Injective Function?

What Is Algebra? 🧮 | Simple Explanation with 🎯 Cool Examples for Kids | ✨BrightCHAMPS Math

In mathematics, a function is a relationship between one input and one output. A function is said to be injective if every element in the domain maps to a unique element in the codomain, that is, no two different inputs have the same output.

A function f: A → B is injective if, for all x1, x2 ∈ A, whenever f(x1) = f(x2), then x1 = x2. 

Difference Between Injective and Surjective Functions 

In mathematics, two important types of functions are injective and surjective. They differ in the way the elements of the domain are associated with the elements in the codomain. In this section, we will learn how injective and surjective functions differ. 

Injective Function 

Surjective Function 

An injective function maps every element of the domain to a unique element in the codomain, where no two inputs share the same output.

A surjective function is one in which every element of the codomain is mapped to at least one element from the domain. 

It is represented as f: A ↣ B

It is represented as f: A↠B

Every input is mapped to different outputs

Multiple inputs are mapped to the same output

Here, not all elements in the codomain are mapped

Every element in the codomain should be mapped 

For example, f(x) = 2x (R → R)

For example, f(x) = x2 (R → R+) is not surjective unless codomain is adjusted.

Properties of Injective Function

Injective functions have specific properties that help students identify and analyze them. Some of the key properties are:

  • In an injective function, each element of the domain maps to a unique element in the codomain, and no two different inputs have the same output.
     
  • Injective functions are often strictly increasing or decreasing, as monotonic behavior ensures that each element in the input is mapped to a unique output. However, not all injective functions are monotonic. 
     
  • An injective function has no direct link to critical points, that is the point where the derivative is zero or undefined, within its domain.
     
  • When a function is injective and also surjective, then the function is bijective.  
     
  • The composition of two injective functions is also injective. 

Graph of Injective Function


The graph of an injective function is used to visually represent the function. If a function is injective, its graph will pass the horizontal line test, which means that no horizontal line intersects the graph more than once. 
 

To check whether the graph is injective or not, we use the horizontal line test. In the horizontal line test, we will check how many times a horizontal line crosses the graph. 
 

  • If the horizontal line crosses the graph once, then the function is injective.
     
  • If the horizontal line crosses the graph at multiple points, then it's not injective.

How to Identify an Injective Function?


To check whether the function is injective, we use an algebraic method or the horizontal line test. Now let’s learn them in detail. 

Algebraic Method

In the algebraic method, we will check whether the function has different inputs for the same output. In other words, check if f(x1) = f(x2) and show that x1 = x2. 

For example, for f(x) = 2x + 3
Assuming f(x1) = f(x2)
2x1 + 3 = 2x2 + 3
Then x1 = x2
So, the function is injective

Horizontal Line Test


To check whether the function is injective, we use the horizontal line test. To check, follow these steps: 
 

Step 1: First, represent the function in a graph
 

Step 2: Draw a horizontal line across the graph and check how many times the graph intersects the graph. If the line touches the graph once, the function is an injective function. If it intersects more than once, the function is not injective. 
 

Tips and Tricks to Master Injective Functions

Here are some useful tips and tricks for students to master injective functions: 

  • Always check: If two inputs give the same output, then the function is not injective.
     
  • Apply the horizontal-line test, On a graph of 𝑦=𝑓(𝑥), if any horizontal line touches the graph more than once, the function fails injectivity.
     
  • Use the algebraic test, Set f(x1​)=f(x2​) and try to show that x1 = x2. If you can, the function is injective.
     
  • For real-valued functions, strictly increasing or strictly decreasing functions are usually injective (though not every injective function must be monotonic).
     
  • Even if every input is different, if two inputs map to the same output, you lose injectivity.

Explore Our Programs

Common Mistakes and How to Avoid Them in Injective Functions

Understanding and learning the injection function is an important concept in algebra, calculus, and advanced mathematics. However, students make errors when working with an injective function. Here are a few common mistakes and ways to avoid them in an injective function. 
 

Real-World Applications of Injective Functions

Injective functions are used to understand the uniqueness and accuracy in various fields. In this section, we will learn about how it is used in real life.  

  • In database systems, injective functions help ensure that each input such as students' IDs, employee IDs, social security numbers maps to a unique individual. This one-to-one mapping prevents duplication and maintains data integrity.  
  • In inventory systems, the injective function is used to assign a unique barcode and QR code to each product
  • In banks, an injective function in account numbers or credit card numbers so that each number is unique to each customer.
  • In programming and memory allocation, we use injective functions to assign a unique memory address to each variable. To prevent memory conflicts and overwriting in software systems. 
  • In healthcare, an injective function is used to assign a unique record number to patients to track their data. It helps in identifying the patients and ensuring accurate treatment and record keeping. 
     

Download Worksheets

Problem 1

Determine whether the function f(x) = 2x + 3 is injective.

Okay, lets begin

 The function f(x) = 2x + 3 is injective 
 

Explanation

 Checking if f(x1) = f(x2) and show that x1 = x2, to verify whether the function is injective
Let f(x1) = f(x2)
Then, 2x1 + 3 = 2x2 + 3
2x1 = 2x2 + 3 -3
2x1 = 2x2
Dividing by 2: x1 = x2
Since, x1 = x2, the function is injective 
 

Well explained 👍

Problem 2

Check whether the function k(x) = ex is injective.

Okay, lets begin

Yes, the function is injective 
 

Explanation

The value of ex increases for all real x
So, if k(x1) = k(x2)
ex1 = ex2
Thus, x1 = x2
So, the function k(x) is injective 
 

Well explained 👍

Problem 3

Is the function g(x) = x2 - 4x + 4 injective?

Okay, lets begin

No, the function g(x) is not injective
 

Explanation

Given, g(x) = x2 - 4x + 4
Simplifying g(x): g(x) = (x - 2)2
Finding the value of g(x) by substituting x with real numbers 
 g(1) = (1 - 2)2 = 1 
g(2) = (2 - 2)2 = 0
 g(3) = (3 - 2)2 = 1 
Here, the values of g(1) and g(3) are the same, so the function g(x) is not injective. 
 

Well explained 👍

Problem 4

Check whether the function h(x) = sin x is injective on the interval [0, π].

Okay, lets begin

 No, the function h(x) is not injective 
 

Explanation

To check whether the function h(x) is injective on [0, π]
For example, sin(π/6) = ½
sin(5π/6) = ½
As, the value sin(π/6) and sin(5π/6) are same, so the function is not injective
 

Well explained 👍

Problem 5

Check if the function r(x) = |x| is injective

Okay, lets begin

No, the function r(x) is not injective
 

Explanation

 To determine if a function is injective, we check whether it maps distinct inputs to distinct outputs. 
Here, r(x) = |x|
If x = 2, r(2) = |2| = 2
If x = -2, r(-2) = |-2| = 2
Since the output is the same for two distinct inputs, the function is not injective. 
 

Well explained 👍

FAQs on Injective Function

1.What is an injective function?

An injective function is a function where every element in the domain is mapped to a distinct codomain.  
 

2.What is a surjective function?

The surjective function is a function where every element in the codomain is mapped to at least one element in the domain. 
 

3.What is the difference between an injective and a surjective function?

Injective and surjective are two types of functions. An injective function is one where no two elements in the domain map to the same element in the codomain. Whereas, a surjective function is where every element in the codomain is mapped to at least one element from the domain. 
 

4.What are the methods to check if a function is injective?

To check whethe rthe function is injective, the common methods we use are the algebraic method and the graphical method. 

5.Give an example of an injective function

Examples of an injective function are f(x) = 3x + 2, it is injective as it has different outputs. 

6.Why is learning about injective functions important for students?

Injective functions help students understand how inputs and outputs are related in algebra. This concept lays the foundation for more advanced math topics like inverse functions, calculus, and computer algorithms.

7.How can parents help children identify whether a function is injective?

Encourage them to check whether two different x-values ever produce the same y-value. They can also use the “horizontal line test” on a graph, if any horizontal line crosses the curve more than once, the function is not injective.

Jaskaran Singh Saluja

About the Author

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.

Fun Fact

: He loves to play the quiz with kids through algebra to make kids love it.