BrightChamps Logo
Login

Summarize this article:

Live Math Learners Count Icon106 Learners

Last updated on October 16, 2025

Injective Function

Professor Greenline Explaining Math Concepts

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.

Injective Function for US Students
Professor Greenline from BrightChamps

What is Injective Function?

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.


 

Professor Greenline from BrightChamps

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. 
 

Professor Greenline from BrightChamps

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. 
     
Max Pointing Out Common Math Mistakes

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. 
 

Mistake 1

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

 Confusing injective with surjective function
 

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Students mix up injective functions with surjective functions by assuming that the injective function must map to every element in the codomain. This is wrong because in the injective function, every element in the input is mapped to a distinct codomain. 
 

Mistake 2

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Assuming all functions are injective 
 

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Sometimes students assume that a function is injective without verifying, especially when the functions that appear simple, like f(x) = x2. So, to avoid this error, always verify whether the function is injective or not by using the algebraic method or the horizontal line test. 
 

Mistake 3

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Misapplying the definition of injective
 

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

 Students sometimes misapply or forget the definition of an injective function. For example, students assume x1 = x2, then f(x1) = f(x2) is true for any function. To avoid this, always understand and use the correct definition, that is, if f(x1) = f(x2), then it must follow that x1 = x2.  
 

Mistake 4

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Confusing with domain and codomain restriction
 

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Students confuse the domain and codomain of an injective function and assume that a function is injective without checking the domain and codomain restrictions. To avoid this, always check the domain clearly, and students should memorize the definition of the injective function. 
 

Mistake 5

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Errors while using the horizontal line test 

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

When using the horizontal line test to check whether the function is injective, students make errors by misinterpreting the graph. So, students should be careful when using the graphical method and also should remember that if any horizontal line intersects the graph more than once, then the function is not injective. 
 

arrow-right
Max from BrightChamps Saying "Hey"
Hey!

Solved Examples on Injective Function

Ray, the Character from BrightChamps Explaining Math Concepts
Max, the Girl Character from BrightChamps

Problem 1

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

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
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 
 

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 2

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

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
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 
 

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 3

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

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
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. 
 

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 4

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

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
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
 

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 5

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

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
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. 
 

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Ray Thinking Deeply About Math Problems

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.  
 

Math FAQ Answers Dropdown Arrow

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. 
 

Math FAQ Answers Dropdown Arrow

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. 
 

Math FAQ Answers Dropdown Arrow

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. 


 

Math FAQ Answers Dropdown Arrow

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. 

Math FAQ Answers Dropdown Arrow
Math Teacher Background Image
Math Teacher Image

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.

Max, the Girl Character from BrightChamps

Fun Fact

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

INDONESIA - Axa Tower 45th floor, JL prof. Dr Satrio Kav. 18, Kel. Karet Kuningan, Kec. Setiabudi, Kota Adm. Jakarta Selatan, Prov. DKI Jakarta
INDIA - H.No. 8-2-699/1, SyNo. 346, Rd No. 12, Banjara Hills, Hyderabad, Telangana - 500034
SINGAPORE - 60 Paya Lebar Road #05-16, Paya Lebar Square, Singapore (409051)
USA - 251, Little Falls Drive, Wilmington, Delaware 19808
VIETNAM (Office 1) - Hung Vuong Building, 670 Ba Thang Hai, ward 14, district 10, Ho Chi Minh City
VIETNAM (Office 2) - 143 Nguyễn Thị Thập, Khu đô thị Him Lam, Quận 7, Thành phố Hồ Chí Minh 700000, Vietnam
UAE - BrightChamps, 8W building 5th Floor, DAFZ, Dubai, United Arab Emirates
UK - Ground floor, Redwood House, Brotherswood Court, Almondsbury Business Park, Bristol, BS32 4QW, United Kingdom