One to One Functions in Mathematics
Last Updated :
13 Sep, 2024
One to One Function or One-One Function is one of the types of functions defined over domain and codomain and describes the specific type of relationship between domain and the codomain. One to One Function is also called the Injective Function. One to One Function is a mathematical function where each element in the domain maps to a unique element in the codomain.
This article explores the concept of One to One Function or One-One Function in detail including its definition and examples which help you understand the concept with ease. We will also discuss some sample problems and provide some practice problems for you to solve. So, let's learn about this important concept in mathematics known as one-to-one function.
What is a One-to-One Function?
A one-to-one function, also known as an injective function, is one where different elements of A have different elements related to B or different elements of A have different images in B.
If there are different images for a function that means it is only possible for one-to-one if the pre-images were different if B set has different elements that means it is only possible when A set had different elements for which these were the pre-images.
One to One Function Definition
A function 'f' from a set 'A' to set 'B' is one-to-one if no two elements in 'A' are mapped to same element in 'B.'

Let's consider these two diagrams. For diagram A we realize that 10 maps to 1, 20 maps to 2 and 30 maps to 3.
However for diagram B it is clear that 10 and 30 maps to 3 and then 20 maps to 1.
Since we have elements in the domain corresponding to distinct values in the each domain for diagram A it makes the function one-to-one, thus our diagram B is not one to one.
This can be expressed mathematically as
f(a) = f(b) â a = b
Example of One-to-One Functions
- Identity Function: The identity function is a simple example of a one-to-one function. It takes an input and returns the same value as the output. For any real number x, the identity function is defined as:
f(x) = x
Every distinct input x corresponds to a distinct output f(x), making it a one-to-one function.
- Linear Function: A linear function is one where the highest power of the variable is 1. For example:
f(x) = 2x + 3
This is a one-to-one function because no matter what value of x you choose, you will get a unique value for f(x).
- Square Function: The square function defined on positive real numbers f(x)= x2 is also a one-to-one function. For any positive real number x, the square value function returns a non-negative value, and different values of x will result in different values.
Let's prove one such examples for one-to-one function.
Example: Prove that the function f(x) = 1/(x+2), xâ 2 is one-to-one.
Solution:
According one-to-one function we know that
f(a) = f(b)
replace a with x and x with b
f(a) = 1/(a+2) , f(b) = 1/(b+2)
â 1/(a+2) = 1/(b+2)
cross multiply the above equation
1(b+2)=1(a+2)
b+2=a+2
â b=a+2-2
âī a=b
Now, since a = b the function is said to be one-to-one function.
Properties One-to-One Functions
Let's consider f and g are two one-to-one function, the properties are as follows:
- If f and g are both one to one, then f â g follows injectivity.
- If g â f is one to one, then function f is one to one, but function g may not be.
- f: X â Y is one-one, if and only if, given any functions g, h : P â X whenever f â g = f â h, then g = h. In other words, one-one functions are exactly the monomorphisms in the category set of sets.
- If f: X â Y is one-one and P is a subset of X, then f-1(f(A)) = P. Thus, P can be retrieved from its image f(P).
- If f: X â Y is one-one and P and Q are both subsets of X, then f(P âĐ Q) = f(P) âĐ f(Q).
- If both X and Y are limited with the same number of elements, then f: X â Y is one-one, if and only if f is surjective or onto function.
Graph of one-to-one function
Let's see one of the graph representation of one-to-one function

The above graph of function f(x)= âx show the graphical representation of one-to-one function.
Horizontal Line Test
A function is one-to-one if each horizontal line does not intersect the graph at more that one point.
a

In the above example it only intersect the horizontal line only at one point. So f(x) is one-to-one function which means that it has an inverse function.
Inverse of one-to-one function
Let f be a one-to-one function with a domain A and Range B. Then the inverse of f is a function with domain B and Range A defined by f-1 (y) =x if and only if f(x)=y for any y in B. Always remember a function has an inverse if and only if it is one-to-one. A function is one-to-one if the highest exponent is an odd number. But if the highest number is an even number or an absolute value this is not one-to-one function.
Example: f(x)=3x+2 find the inverse of the function
Solution:
write the function in y=f(x) form
â y=3x+2
lets interchange y and x variables
â x=3y+2
solve y in terms of x
â x-2=3y
divide the equation with 3
â (x-2)/3=3y/3
â y=(x-2)/3
âī f-1(x)=(x-2)/3
One to One Function and Onto Function
The key differences between One to One and Onto Functions are listed in the following table:
| Property | One-to-One (Injective) Function | Onto (Surjective) Function |
|---|
| Definition | A function in which no two different elements in the domain map to the same element in the codomain. In other words, each element in the domain maps to a unique element in the codomain. | A function in which every element in the codomain is mapped to by at least one element in the domain. In other words, the range of the function equals the entire codomain. |
|---|
| Symbolic Representation | f(x1) â f(x2) if x1 â x2 for all x1, x2 in the domain. | For every y in the codomain, there exists an x in the domain such that f(x) = y. |
|---|
| Graphical Representation | The graph of a one-to-one function never has a horizontal line that intersects it at more than one point. | The graph of an onto function may not cover every point on the codomain, but it covers every point that it can, meaning there are no "gaps" in the codomain. |
|---|
| Example | f(x) = 2x is one-to-one because no two distinct values of x produce the same output. | f(x) = âx is onto for non-negative real number as its codomain because, all non-negative real numbers has a preimage in this function. |
|---|
| Inverse Function | A one-to-one function generally has an inverse function. | An onto function may or may not have an inverse function. |
|---|
| Cardinality | The cardinality of the domain and codomain can be equal or different for one-to-one functions. | The cardinality of the codomain is usually greater than or equal to the cardinality of the domain for onto functions. |
|---|
The following illustration provide the clear difference between one one and onto function:

Read More,
Solved Problems on One to One Function
Let's solve some problems to illustrate one-to-one functions:
Problem 1: Determine if the following function is one-to-one: f(x) = 3x - 1
Solution:
Solution 1: To check if it's one-to-one, we need to show that no two distinct x-values map to the same y-value.
Suppose f(a) = f(b), where a â b.
3a - 1 = 3b - 1
3a = 3b
a = b
Since the only way for f(a) = f(b) is when a = b, this function is indeed one-to-one.
Problem 2: Determine if the following function is one-to-one: g(x) = x2
Solution:
Solution 2: We'll use the horizontal line test by graphing the function. If any horizontal line intersects the graph more than once, it's not one-to-one.
The graph of g(x) = x^2 is a parabola opening upwards. Any horizontal line only intersects the graph once, so this function is not one-to-one.
Practice Problems on One to One Functions
Problem 1: Determine whether the following function is one-to-one:
- f(x) = 2x + 3
- g(x) = 3x2 - 1
- h(x) = 3âx
Problem 2: Find a function that is one-to-one from the set of real numbers to the set of real numbers.
Problem 3: Given the function g(x) = x2 + 1, determine if it is one-to-one on its entire domain.
Problem 4: Consider the function h(x) = ex. Is it a one-to-one function?
Problem 5: Find the inverse function of f(x) = 4x - 7 and determine its domain.
Problem 6: Determine if the function p(x) = âx is one-to-one.
Problem 7: Given q(x) = x/2, find the domain and range of the function.
Problem 8: Check whether the function r(x) = sin (x) is one-to-one over the interval [0, Ï].
Problem 9: Consider the function s(x) = |x|. Is it a one-to-one function?
Problem 10: Determine if the function t(x) = 1/x is one-to-one and find its domain.
One to One Functions - FAQs
What is a one-to-one function?
A one-to-one function is a mathematical function that maps each element in its domain to a unique element in its codomain. In other words, it doesn't map two different elements in the domain to the same element in the codomain.
How can I determine if a function is one-to-one?
You can use the horizontal line test. If no horizontal line intersects the graph of the function more than once, it is a one-to-one function.
What is the difference between a one-to-one function and an onto function?
A one-to-one function ensures that no two distinct elements in the domain map to the same element in the codomain, while an onto function, also known as a surjective function, ensures that every element in the codomain is mapped to by at least one element in the domain.
Are all linear functions one-to-one?
No, not all linear functions are one-to-one. For example, f(x) = 2x is one-to-one, but g(x) = 2x + 1 is not because it maps two different x-values to the same y-value (e.g., g(1) = 3 and g(2) = 5).
Get 90% Course fee refund on completing 90% course in 90 days! Take the Three 90 Challenge today.
The next 90 Days of focus & determination can unlock your full potential. The Three 90 challenge has started and this is your chance to upskill and get 90% refund. What more motivation do you need? Start the challenge right away!
Similar Reads
One to One Functions in Mathematics
One to One Function or One-One Function is one of the types of functions defined over domain and codomain and describes the specific type of relationship between domain and the codomain. One to One Function is also called the Injective Function. One to One Function is a mathematical function where e
9 min read
Onto Functions in Mathematics
Onto Function is one of the many types of functions defined based on the relationship between its domain and codomain. For any function to be onto, it needs to relate two sets with a very specific mapping between elements, meaning that each element of the codomain has at least one element in the dom
11 min read
Mathematics | Total number of Possible Functions
In this article, we are discussing how to find a number of functions from one set to another. For understanding the basics of functions, you can refer to this: Classes (Injective, surjective, Bijective) of Functions. Number of functions from one set to another: Let X and Y be two sets having m and n
5 min read
Functions in Discrete Mathematics
Functions are an important part of discrete mathematics. This article is all about functions, their types, and other details of functions. A function assigns exactly one element of a set to each element of the other set. Functions are the rules that assign one input to one output. The function can b
9 min read
Trigonometric Functions in MATLAB
In this article, we are going to discuss trigonometric functions and their types in MATLAB. Trigonometric functions are the mathematical functions that can result in the output with the given input. There are six trigonometric functions - Sine (sin)Cosine(cos)Tangent(tan)CoTangent(cot)Secant(sec)CoS
5 min read
Function Notation in Math
Function notation is a mathematical way to express the relationship between inputs and outputs in a precise and simplified form. Instead of using the typical y = format, function notation replaces y with a function like f(x), where f represents the function's name, and x is the input variable. This
8 min read
Constant Function in Mathematics
Constant Function is a specific type of mathematical function that, as its name suggests, outputs will always be the same value for any input. In other words, the output of a constant function remains constant. This is why it is called a constant function. Constant Function can be expressed simply a
10 min read
Many One Functions
Many-to-One or Many One Function is one of the various types of functions that represent relationships between different entities. As we know, a function is a very specific type of relation in which each input has a unique output. In a many-one function, many inputs can have the same output. For exa
7 min read
Math Functions in PL/SQL
In PL/SQL, mathematical functions play a important role in performing calculations and manipulating numeric data. These functions allow us to execute a wide range of mathematical operations from basic arithmetic to complex computations within our PL/SQL code. In this article, we will learn about Mat
4 min read
Function Table in Math
A function table in math is a helpful tool used to understand the relationship between input values (also called domain values) and their corresponding output values. It is a structured way to organize and visualize the data that results from applying a mathematical function to various inputs. Funct
10 min read
Inverse Functions Practice Questions
Inverse functions are those functions which reverse the actions of another function and reversing its operation. It swaps input and output values, allowing for the retrieval of the original input from a given output. This article consist of a series of Inverse Functions Practice Questions focused at
5 min read
Mathematics | Unimodal functions and Bimodal functions
Before diving into unimodal and bimodal functions, it's essential to understand the term "modal." A mode refers to the value at which a function reaches a peak, typically a maximum point. The behavior of functions can vary depending on how many peaks or modes they contain, giving rise to classificat
5 min read
What is a Function in Maths?
A function in maths is a rule that relates one value, called the input, to another value, called the output. In simple terms, itâs like a machine that takes something in, processes it, and gives something out. Every input has a specific output. Functions are a fundamental part of mathematics and are
15+ min read
Riemann Zeta Function
Riemann Zeta Function, denoted by Îķ(s), is a mathematical function that is defined for complex numbers. It's named after the German mathematician Bernhard Riemann, who introduced it in 1859. In this article, we will understand the meaning of the Riemann zeta function, the properties of the Riemann z
9 min read
Importance of Subtraction In Mathematical Foundations
Subtraction plays a key role since it is the basic foundation of Mathematics. We use this Subtraction in various places in our day-to-day life. There are generally four main arithmetic operations Addition, Multiplication, Division and one of the most important Operations is Subtraction. Subtraction
7 min read
Inverse Trigonometric Functions Practice Problems
Inverse trigonometric functions are fundamental classes or types of mathematics instruments that are frequently employed in engineering and science to solve problems related to angles and trigonometric ratios. In this article, we have covered, the basics of Inverse Trigonometric Functions, their pra
6 min read
Injective Functions
Injective Functions, also called one-to-one functions are a fundamental concept in mathematics because they establish a unique correspondence between elements of their domain and codomain, ensuring that no two distinct elements in the domain map to the same element in the codomain. In the world of i
7 min read
Invertible Functions
As the name suggests Invertible means "inverse", and Invertible function means the inverse of the function. Invertible functions, in the most general sense, are functions that "reverse" each other. For example, if f takes a to b, then the inverse, f-1, must take b to a. Table of Content Invertible F
15+ min read
Transcendental Functions
Transcendental function in mathematics is a function that cannot be expressed as finite combination of algebraic expressions and operations of addition, subtraction, multiplication, division, power and root. Examples of transcendental functions include log x, sin x, cos x, ex and functions containin
8 min read