Injective Functions (original) (raw)

Last Updated : 27 Dec, 2025

An injective function (also called a one-to-one function) is a function where different inputs always give different outputs. In an injective function, no two distinct elements of the domain map to the same element in the codomain.

Injective-Function-1

Consider two sets, Set A (domain) and Set B (codomain). A function f: A→B is injective if every element of Set A is mapped to a distinct element of Set B. This means:

So, in a diagram, each element of Set B is connected to at most one element from Set A.

Injective Function Definition

Formally, a function f: A → B is said to be injective if, for all elements a1 and a2 in the domain A, such that

**f(a 1 ) = f(a 2 ) implies that a 1 = a 2

**OR

**f(a 1 ) ≠ f(a 2 ) implies that a 1 ≠ a 2

Injective Function Example

Some examples of Injective functions are:

Properties of Injective Function

There are various properties of Injecive functions, some of those are listed as follows:

Some more properties of Injective function include:

Graph of Injective Function

One such example of Injective Function is f(x) = x3, and graph the injective function f(x) is provided as below:

Graph of Injective Function

Horizontal Line Test

For any injective function plotted on a coordinate plane, no horizontal line can intersect the graph more than once. In other words, the graph of an injective function never has horizontal line segments that cross it more than once.

Horizontal Line Test

Injective vs Surjective vs Bijective Function

The key differences between Injective, Surjective and Bijective Functions are listed in the following table:

**Injective Function (One-to-One) **Surjective Function (Onto) **Bijective Function (One-to-One and Onto)
A function where each element in the domain maps to a unique element in the codomain. A function where the codomain is completely covered by the elements in the domain. A function that is both injective and surjective.
f: A ↣ B f: A ↠ B f: A ⤖ B
Each element in the domain maps to a unique element in the codomain. Multiple elements in the domain may map to the same element in the codomain. Each element in the domain maps to a unique element in the codomain.
Yes, every element in the domain is mapped to a unique element in the codomain. Not necessarily. There may be elements in the codomain with no pre-image in the domain. Yes, every element in the domain is mapped to a unique element in the codomain.
Not necessarily. Some elements in the codomain may not have pre-images in the domain. Yes, every element in the codomain has at least one pre-image in the domain. Yes, every element in the codomain has exactly one pre-image in the domain.
f(x) = 2xf: R → R f(x) = x2f: R → R+ f(x) = xf: R → R

Following illustration shows the difference between all three function:

injective

Solved Example on Injective Function

**Example 1: Let's take a simple function, f(x) = 2x. Is this function injective?

**Solution:

Yes, f(x) = 2x is indeed an injective function. For every distinct input, you will always get a distinct output.

f(x) = 2x

**Example 2: Consider the function f:R→R defined as f(x) = x2. Is this function injective?

**Solution:

No, f(x) = x2 is not an injective function because different inputs (e.g., x = 2 and x = -2) can result in the same output (f(2) = 4 and f(-2) = 4).

**Example 3: Consider the function f:R→R defined as f(x) = x3. Is this function injective?

**Solution:

Yes, f(x) = x3 is an injective function. Every unique input will result in a unique output.

Practice Problems on Injective Function

**Problem 1: Determine whether the following function is injective:

**Problem 2: Determine whether the function h(x) = sin x is injective on the interval [0, π]

**Problem 3: Consider the function p(x) = 1/x for x ≠ 0: Is p(x) an injective function?

**Problem 4: Given the function r(x) = |x|, where x is a real number, is r(x) an injective function?

**Problem 5: Consider the function s(x) = √x for x ≥ 0: Is s(x) injective?

**Problem 6: Determine whether the function t(x) = cos x is injective on the interval [0, 2π]