Skip to main content
Home
Pimath

Menu EN

  • Home
  • ๐ŸŒ EN
    • ๐Ÿ‡ฎ๐Ÿ‡น IT
    • ๐Ÿ‡ช๐Ÿ‡ธ ES
    • ๐Ÿ‡ต๐Ÿ‡น PT
    • ๐Ÿ‡ซ๐Ÿ‡ท FR
    • ๐Ÿ‡ท๐Ÿ‡ด RO
  • ๐Ÿ‘จโ€๐ŸŽ“ About Me
  • ๐Ÿšง Theory & Exercises
User account menu
  • Log in

Breadcrumb

  1. Home

Injective, Surjective, and Bijective Functions: Definitions, Meaning, and Examples

Profile picture for user Pimath
By Pimath, 11 June, 2026

Injective functions, surjective functions and bijective functions play a central role in the study of functions.

These three notions describe how a function links its domain to its codomain: some functions keep the elements of the domain perfectly distinct, others reach the whole codomain, and still others set up a one-to-one correspondence between the two sets.

The distinction between injectivity, surjectivity and bijectivity is essential for understanding the image of a function, the inverse function and the role played by the domain and the codomain in the very definition of a function.

Indeed, the same rule may have different properties depending on the sets over which it is considered. For this reason, when studying injective, surjective and bijective functions, one must always consider the function in its complete form:

\[ f:A\to B. \]


Contents

  • Injective, surjective and bijective functions: intuitive meaning
  • Definition of an injective function
  • Definition of a surjective function
  • Definition of a bijective function
  • Difference between injective, surjective and bijective functions
  • How to check whether a function is injective
  • How to check whether a function is surjective
  • Bijective functions and the inverse function
  • Examples of injective, surjective and bijective functions
  • Common mistakes to avoid

Injective, surjective and bijective functions: intuitive meaning

To understand what an injective, surjective or bijective function is, let us consider a function

\[ f:A\to B. \]

The domain \(A\) is the set of elements to which the function may be applied; the codomain \(B\) is the target set of the function, that is, the set to which its values must belong. To each element \(x\in A\) the function assigns one and only one element \(f(x)\in B\).

The properties of injectivity, surjectivity and bijectivity describe how the function links the domain to the codomain.

A function is injective when it never sends two distinct elements of the domain to the same element of the codomain. In other words, different elements of \(A\) must have different images in \(B\).

A function is surjective when every element of the codomain is actually attained. In other words, there are no elements of \(B\) left outside the image of the function.

A function is bijective when it is both injective and surjective. In this case every element of the codomain is attained by one and only one element of the domain, so that a perfect correspondence between \(A\) and \(B\) is established.

Intuitively, an injective function never collapses distinct elements of the domain together; a surjective function covers the whole codomain; a bijective function does both at once.

For example, consider the function

\[ f:\mathbb R\to\mathbb R,\qquad f(x)=x^2. \]

This function is not injective, since two distinct real numbers may have the same image. Indeed

\[ -1\ne 1, \]

but

\[ f(-1)=(-1)^2=1 \]

and

\[ f(1)=1^2=1. \]

Hence \(f(-1)=f(1)\), even though \(-1\ne 1\). The function is not injective.

The same function is not surjective from \(\mathbb R\) to \(\mathbb R\) either. Indeed, the image of \(f\) is

\[ f(\mathbb R)=[0,+\infty), \]

whereas the declared codomain is \(\mathbb R\). The negative real numbers therefore belong to the codomain but are never attained by the function.

Now consider the function

\[ g:[0,+\infty)\to[0,+\infty),\qquad g(x)=x^2. \]

The formula \( g(x)=x^2 \) is the same, but the function is different, because the domain and the codomain have changed.

On the domain \([0,+\infty)\), the function \(g\) is injective: two distinct non-negative real numbers have distinct squares. Moreover, \(g\) is surjective onto \([0,+\infty)\), since every number \(y\ge 0\) can be written as the square of a non-negative real number.

Indeed, if \(y\in[0,+\infty)\), choosing

\[ x=\sqrt y, \]

we have \(x\in[0,+\infty)\) and

\[ g(x)=g(\sqrt y)=(\sqrt y)^2=y. \]

Therefore \(g\) is bijective.

This example illustrates a crucial point: injectivity, surjectivity and bijectivity depend not only on the rule, but also on the domain and the codomain with which the function is defined.

Definition of an injective function

Let \(A\) and \(B\) be two non-empty sets and let

\[ f:A\to B \]

be a function. To say that \(f\) is injective means that distinct elements of the domain have distinct images.

In symbols, \(f\) is injective if

\[ x_1\ne x_2 \quad \Longrightarrow \quad f(x_1)\ne f(x_2) \]

for all \(x_1,x_2\in A\).

This formulation expresses the intuitive idea directly: an injective function never sends two different elements of the domain to the same element of the codomain.

There is, however, an equivalent form, often more convenient in proofs. The function \(f\) is injective if and only if

\[ f(x_1)=f(x_2) \quad \Longrightarrow \quad x_1=x_2 \]

for all \(x_1,x_2\in A\).

This second form states that if two elements of the domain have the same image, then those elements must necessarily coincide.

The two conditions are equivalent: the first says that different elements have different images; the second says that equal images can come only from the same element of the domain.

For example, consider the function

\[ f:\mathbb R\to\mathbb R,\qquad f(x)=2x+1. \]

Let us show that \(f\) is injective. Let \(x_1,x_2\in\mathbb R\) and suppose that

\[ f(x_1)=f(x_2). \]

Then

\[ 2x_1+1=2x_2+1. \]

Subtracting \(1\) from both sides, we obtain

\[ 2x_1=2x_2. \]

Dividing by \(2\), it follows that

\[ x_1=x_2. \]

We have thus shown that

\[ f(x_1)=f(x_2) \quad \Longrightarrow \quad x_1=x_2. \]

Therefore the function \(f\) is injective.

Consider instead the function

\[ g:\mathbb R\to\mathbb R,\qquad g(x)=x^2. \]

This function is not injective. Indeed, there exist two distinct elements of the domain having the same image:

\[ -1\ne 1, \]

but

\[ g(-1)=(-1)^2=1 \]

and

\[ g(1)=1^2=1. \]

Hence

\[ g(-1)=g(1), \]

even though \(-1\ne 1\). Consequently \(g\) is not injective.

Definition of a surjective function

Let \(A\) and \(B\) be two non-empty sets and let

\[ f:A\to B \]

be a function. To say that \(f\) is surjective means that every element of the codomain is the image of at least one element of the domain.

In symbols, \(f\) is surjective if

\[ \forall y\in B,\quad \exists x\in A \quad : \quad f(x)=y. \]

This condition states that no element of the codomain is left out of the values taken by the function.

Recall, indeed, that the image of \(f\) is the set

\[ f(A)=\{\,y\in B\mid \exists x\in A \text{ such that } f(x)=y\,\}. \]

Therefore a function is surjective if and only if its image coincides with the codomain:

\[ f(A)=B. \]

In other words, a surjective function reaches every element of the target set.

For example, consider the function

\[ f:\mathbb R\to\mathbb R,\qquad f(x)=x+1. \]

Let us show that \(f\) is surjective. Let \(y\in\mathbb R\). We want to find at least one \(x\in\mathbb R\) such that

\[ f(x)=y. \]

Since \(f(x)=x+1\), we must solve the equation

\[ x+1=y. \]

Hence

\[ x=y-1. \]

Since \(y\in\mathbb R\), we also have \(y-1\in\mathbb R\). Hence, choosing \(x=y-1\), we obtain

\[ f(x)=f(y-1)=(y-1)+1=y. \]

We have thus shown that for every \(y\in\mathbb R\) there exists at least one \(x\in\mathbb R\) such that \(f(x)=y\). Therefore \(f\) is surjective.

Consider instead the function

\[ g:\mathbb R\to\mathbb R,\qquad g(x)=x^2. \]

This function is not surjective. Indeed, the codomain is \(\mathbb R\), but the function takes only non-negative values:

\[ g(x)=x^2\ge 0 \]

for every \(x\in\mathbb R\).

Consequently, no negative real number belongs to the image of \(g\). For example, there is no \(x\in\mathbb R\) such that

\[ x^2=-1. \]

Thus \(-1\in\mathbb R\) belongs to the codomain but does not belong to the image of the function. Therefore \(g\) is not surjective.

If, however, we change the codomain and consider

\[ h:\mathbb R\to[0,+\infty),\qquad h(x)=x^2, \]

then the function \(h\) is surjective. Indeed, for every \(y\in[0,+\infty)\), choosing

\[ x=\sqrt y, \]

we have \(x\in\mathbb R\) and

\[ h(x)=h(\sqrt y)=(\sqrt y)^2=y. \]

Hence every element of the codomain \([0,+\infty)\) is attained by the function.

This shows that surjectivity depends essentially on the chosen codomain. The same rule may define a surjective function or a non-surjective one, depending on the declared target set.

Definition of a bijective function

Let \(A\) and \(B\) be two non-empty sets and let

\[ f:A\to B \]

be a function. To say that \(f\) is bijective means that \(f\) is simultaneously injective and surjective.

In other words, a function is bijective when every element of the codomain is the image of one and only one element of the domain.

In symbols, \(f\) is bijective if

\[ \forall y\in B,\quad \exists! x\in A \quad : \quad f(x)=y. \]

The symbol \(\exists!\) means โ€œthere exists one and only oneโ€. Hence the preceding condition states that, for every element \(y\) of the codomain, there exists exactly one element \(x\) of the domain such that \(f(x)=y\).

This definition contains both fundamental properties at once.

  • Surjectivity guarantees existence: every \(y\in B\) is attained by at least one element of the domain.
  • Injectivity guarantees uniqueness: no \(y\in B\) can be attained by two distinct elements of the domain.

A bijective function therefore establishes a perfect correspondence between domain and codomain: each element of the domain has exactly one image in the codomain, and each element of the codomain comes from one and only one element of the domain.

For example, consider the function

\[ f:\mathbb R\to\mathbb R,\qquad f(x)=2x+1. \]

Let us show that \(f\) is bijective.

To check injectivity, let \(x_1,x_2\in\mathbb R\) and suppose that

\[ f(x_1)=f(x_2). \]

Then

\[ 2x_1+1=2x_2+1. \]

Subtracting \(1\) from both sides and dividing by \(2\), we obtain

\[ x_1=x_2. \]

Hence \(f\) is injective.

To check surjectivity, let \(y\in\mathbb R\). We look for an \(x\in\mathbb R\) such that

\[ f(x)=y. \]

We therefore solve the equation

\[ 2x+1=y. \]

We obtain

\[ x=\frac{y-1}{2}. \]

Since \(y\in\mathbb R\), we also have \(\displaystyle \frac{y-1}{2}\in\mathbb R\). Hence, choosing

\[ x=\frac{y-1}{2}, \]

we have

\[ f(x)=2\cdot\frac{y-1}{2}+1=y. \]

Hence \(f\) is surjective.

Since \(f\) is both injective and surjective, we conclude that \(f\) is bijective.

Consider instead the function

\[ g:\mathbb R\to\mathbb R,\qquad g(x)=x^2. \]

This function is not bijective. Indeed, it is not injective, since \(g(-1)=g(1)\) even though \(-1\ne 1\), and it is not surjective, since no negative real number belongs to its image.

If instead we consider

\[ h:[0,+\infty)\to[0,+\infty),\qquad h(x)=x^2, \]

then \(h\) is bijective. Indeed, on \([0,+\infty)\) the function \(x^2\) is injective, and every non-negative real number \(y\) is the image of \(x=\sqrt y\).

Here too we see that bijectivity depends not only on the rule of the function, but on the complete way in which the function is defined, namely on the domain, the codomain and the assignment rule.

Difference between injective, surjective and bijective functions

The notions of injective, surjective and bijective function describe different properties of the way in which a function links domain and codomain.

Consider a function

\[ f:A\to B. \]

To say that \(f\) is injective is to focus on the elements of the domain: distinct elements of \(A\) must have distinct images in \(B\).

To say that \(f\) is surjective, on the other hand, is to focus on the elements of the codomain: every element of \(B\) must be attained by at least one element of \(A\).

To say that \(f\) is bijective is to require both conditions: every element of the codomain must be attained, and must be attained exactly once.

In symbols:

\[ \text{\(f\) injective} \quad \Longleftrightarrow \quad f(x_1)=f(x_2)\Rightarrow x_1=x_2 \]

for all \(x_1,x_2\in A\).

Moreover:

\[ \text{\(f\) surjective} \quad \Longleftrightarrow \quad f(A)=B. \]

Finally:

\[ \text{\(f\) bijective} \quad \Longleftrightarrow \quad \text{\(f\) is injective and surjective.} \]

These three properties are independent in the following sense: a function may be injective without being surjective, may be surjective without being injective, may be both, or may be neither.

For example, the function

\[ f:\mathbb R\to\mathbb R,\qquad f(x)=e^x \]

is injective, because the exponential function is strictly increasing on \(\mathbb R\). However, it is not surjective onto \(\mathbb R\), because

\[ e^x>0 \]

for every \(x\in\mathbb R\). Hence the real numbers less than or equal to zero belong to the codomain but not to the image.

So \(f\) is injective but not surjective.

Consider instead the function

\[ g:\mathbb R\to[0,+\infty),\qquad g(x)=x^2. \]

This function is surjective, since every non-negative real number \(y\) is the square of at least one real number. Indeed, if \(y\ge 0\), choosing \(x=\sqrt y\), we obtain

\[ g(x)=y. \]

However, \(g\) is not injective, because

\[ g(-1)=g(1)=1, \]

even though \(-1\ne 1\).

So \(g\) is surjective but not injective.

The function

\[ h:\mathbb R\to\mathbb R,\qquad h(x)=2x+1 \]

is, on the other hand, bijective. Indeed, it is injective, because distinct values of \(x\) yield distinct values of \(2x+1\), and it is surjective, because every \(y\in\mathbb R\) is obtained by choosing

\[ x=\frac{y-1}{2}. \]

Finally, the function

\[ p:\mathbb R\to\mathbb R,\qquad p(x)=x^2 \]

is neither injective nor surjective. It is not injective because opposite values have the same square; it is not surjective because it takes no negative values.

PropertyFocusCondition
InjectivityDomain\(f(x_1)=f(x_2)\Rightarrow x_1=x_2\)
SurjectivityCodomain\(f(A)=B\)
BijectivityDomain and codomainInjectivity and surjectivity

These examples show that injectivity and surjectivity answer different questions. Injectivity concerns the uniqueness of the source of the values; surjectivity concerns whether all the elements of the codomain are actually attained.

How to check whether a function is injective

To check whether a function is injective means to determine whether distinct elements of the domain always have distinct images.

Consider a function

\[ f:A\to B. \]

To prove that \(f\) is injective, the most common method consists in starting from the equality of two images and showing that the original elements must coincide.

One therefore takes two arbitrary elements \(x_1,x_2\in A\) and assumes that

\[ f(x_1)=f(x_2). \]

If from this equality one can deduce that

\[ x_1=x_2, \]

then the function is injective.

In compact form, the argument is the following:

\[ f(x_1)=f(x_2) \quad \Longrightarrow \quad x_1=x_2. \]

If this implication holds for all \(x_1,x_2\in A\), then \(f\) is injective.

For example, consider the function

\[ f:\mathbb R\to\mathbb R,\qquad f(x)=3x-2. \]

Let \(x_1,x_2\in\mathbb R\) and suppose that

\[ f(x_1)=f(x_2). \]

Then

\[ 3x_1-2=3x_2-2. \]

Adding \(2\) to both sides, we obtain

\[ 3x_1=3x_2. \]

Dividing by \(3\), it follows that

\[ x_1=x_2. \]

Hence

\[ f(x_1)=f(x_2)\quad \Longrightarrow\quad x_1=x_2. \]

Therefore \(f\) is injective.

To show, on the other hand, that a function is not injective, it suffices to find a counterexample: two distinct elements of the domain having the same image.

In symbols, one must find \(x_1,x_2\in A\) such that

\[ x_1\ne x_2 \]

but

\[ f(x_1)=f(x_2). \]

For example, consider the function

\[ g:\mathbb R\to\mathbb R,\qquad g(x)=x^2+1. \]

The function is not injective, because

\[ -1\ne 1, \]

but

\[ g(-1)=(-1)^2+1=2 \]

and

\[ g(1)=1^2+1=2. \]

Hence \(g(-1)=g(1)\), even though \(-1\ne 1\). This is enough to conclude that \(g\) is not injective.

In some cases injectivity can also be checked by means of monotonicity. If a real-valued function of a real variable is strictly increasing or strictly decreasing on its entire domain, then it is injective.

Indeed, if \(x_1<x_2\) and \(f\) is strictly increasing, then

\[ f(x_1)<f(x_2), \]

so two distinct elements of the domain cannot have the same image. An analogous argument holds for strictly decreasing functions.

For example, the function

\[ h:[0,+\infty)\to\mathbb R,\qquad h(x)=x^2 \]

is injective, because it is strictly increasing on the domain \([0,+\infty)\).

One must, however, be careful: a function that is increasing but not strictly increasing need not be injective. Injectivity requires that distinct elements always have distinct images.

From a graphical standpoint, a real-valued function of a real variable is injective when every horizontal line meets the graph in at most one point. This criterion is often called the horizontal line test.

If a horizontal line meets the graph in two distinct points, then there exist two different elements of the domain with the same image, and so the function is not injective. The criterion is useful for interpreting injectivity geometrically, but in proofs it is preferable to use the symbolic definition.

How to check whether a function is surjective

To check whether a function is surjective means to determine whether every element of the codomain is actually attained by the function.

Consider a function

\[ f:A\to B. \]

To prove that \(f\) is surjective, one must take an arbitrary element \(y\in B\) and show that there exists at least one element \(x\in A\) such that

\[ f(x)=y. \]

In compact form, the argument is the following:

\[ \forall y\in B,\quad \exists x\in A \quad : \quad f(x)=y. \]

If this condition is satisfied, then every element of the codomain belongs to the image of the function. Consequently

\[ f(A)=B, \]

and hence \(f\) is surjective.

In practice, to check surjectivity one starts from the equation

\[ f(x)=y \]

and tries to solve it for \(x\). If, for every \(y\in B\), at least one solution \(x\in A\) can be found, then the function is surjective.

For real-valued functions of a real variable, checking surjectivity often amounts to determining the image of the function. Depending on the case, it may be necessary to study monotonicity, compute limits, locate maxima and minima, or solve the equation \(f(x)=y\) directly.

The fundamental question is always the same: does the image of the function coincide with the declared codomain?

For example, consider the function

\[ f:\mathbb R\to\mathbb R,\qquad f(x)=2x-3. \]

Let \(y\in\mathbb R\). We want to find a real number \(x\) such that

\[ f(x)=y. \]

Since \(f(x)=2x-3\), we must solve the equation

\[ 2x-3=y. \]

Hence

\[ 2x=y+3 \]

and therefore

\[ x=\frac{y+3}{2}. \]

Since \(y\in\mathbb R\), we also have \(\displaystyle \frac{y+3}{2}\in\mathbb R\). Hence, choosing

\[ x=\frac{y+3}{2}, \]

we obtain

\[ f(x)=2\cdot\frac{y+3}{2}-3=y+3-3=y. \]

We have thus shown that every \(y\in\mathbb R\) is the image of at least one \(x\in\mathbb R\). Therefore \(f\) is surjective.

To show, on the other hand, that a function is not surjective, it suffices to find at least one element of the codomain that is not attained.

In symbols, one must find an element \(y\in B\) such that the equation

\[ f(x)=y \]

has no solution \(x\in A\).

For example, consider the function

\[ g:\mathbb R\to\mathbb R,\qquad g(x)=x^2+1. \]

This function is not surjective. Indeed, the codomain is \(\mathbb R\), but for every \(x\in\mathbb R\) we have

\[ x^2\ge 0, \]

so

\[ x^2+1\ge 1. \]

Consequently, the function takes no values less than \(1\). For example, \(0\in\mathbb R\) belongs to the codomain, but there is no \(x\in\mathbb R\) such that

\[ x^2+1=0. \]

Therefore \(g\) is not surjective.

The same rule can, however, become surjective if a different codomain is chosen. Consider, indeed,

\[ h:\mathbb R\to[1,+\infty),\qquad h(x)=x^2+1. \]

Let us show that \(h\) is surjective. Let \(y\in[1,+\infty)\). Then \(y\ge 1\), so

\[ y-1\ge 0. \]

We may therefore choose

\[ x=\sqrt{y-1}. \]

We have \(x\in\mathbb R\) and

\[ h(x)=h(\sqrt{y-1})=(\sqrt{y-1})^2+1=y. \]

Hence every element of the codomain \([1,+\infty)\) is attained by the function. Therefore \(h\) is surjective.

This example confirms that surjectivity is not a property of the rule alone, but of the function as a whole. To determine whether a function is surjective, one must always consider domain, codomain and assignment rule together.

Bijective functions and the inverse function

Bijective functions are especially important because they allow one to define an inverse function.

Consider a function

\[ f:A\to B. \]

To say that \(f\) is bijective means that every element \(y\in B\) is the image of one and only one element \(x\in A\). In symbols:

\[ \forall y\in B,\quad \exists! x\in A \quad : \quad f(x)=y. \]

This property makes it possible to reverse the direction of the correspondence. Indeed, if every \(y\in B\) comes from one and only one \(x\in A\), then we can associate to each element \(y\in B\) that unique element \(x\in A\) such that \(f(x)=y\).

This defines a new function

\[ f^{-1}:B\to A, \]

called the inverse function of \(f\).

By definition, the inverse function associates to each \(y\in B\) the unique element \(x\in A\) such that

\[ f(x)=y. \]

In symbols:

\[ f^{-1}(y)=x \quad \Longleftrightarrow \quad f(x)=y. \]

Bijectivity is essential in order to define the inverse on the whole codomain \(B\).

  • Surjectivity guarantees that every \(y\in B\) has at least one preimage in \(A\).
  • Injectivity guarantees that this preimage is unique.

Without surjectivity, there would be elements of the codomain not attained by the function, and so the inverse could not be defined on all of \(B\). Without injectivity, there would be elements of the codomain attained by several elements of the domain, and so the inverse would not be a function.

For example, consider the function

\[ f:\mathbb R\to\mathbb R,\qquad f(x)=2x+1. \]

This function is bijective. To find its inverse, we set

\[ y=2x+1 \]

and solve for \(x\). We obtain

\[ y-1=2x \]

and therefore

\[ x=\frac{y-1}{2}. \]

Hence

\[ f^{-1}(y)=\frac{y-1}{2}. \]

Denoting the independent variable again by \(x\), one usually writes

\[ f^{-1}(x)=\frac{x-1}{2}. \]

In this case the inverse function is

\[ f^{-1}:\mathbb R\to\mathbb R,\qquad f^{-1}(x)=\frac{x-1}{2}. \]

Let us now verify the meaning of the inverse through composition. For every \(x\in\mathbb R\),

\[ f^{-1}(f(x))=f^{-1}(2x+1)=\frac{(2x+1)-1}{2}=x. \]

Moreover, for every \(x\in\mathbb R\),

\[ f(f^{-1}(x))=f\left(\frac{x-1}{2}\right)=2\cdot\frac{x-1}{2}+1=x. \]

Thus composing a bijective function with its inverse returns the original element.

Consider instead the function

\[ g:\mathbb R\to\mathbb R,\qquad g(x)=x^2. \]

This function admits no inverse from \(\mathbb R\) to \(\mathbb R\), because it is not bijective. Indeed, it is not injective, since

\[ g(-1)=g(1), \]

even though \(-1\ne 1\). Moreover, it is not surjective onto \(\mathbb R\), because it takes no negative values.

If, however, we restrict the domain and the codomain and consider

\[ h:[0,+\infty)\to[0,+\infty),\qquad h(x)=x^2, \]

then \(h\) is bijective and admits an inverse function. For every \(y\in[0,+\infty)\), the unique \(x\in[0,+\infty)\) such that

\[ x^2=y \]

is

\[ x=\sqrt y. \]

Hence

\[ h^{-1}:[0,+\infty)\to[0,+\infty),\qquad h^{-1}(x)=\sqrt x. \]

This example shows once again that the existence of the inverse function depends not only on the rule, but on the function considered in its entirety: domain, codomain and assignment rule.

Examples of injective, surjective and bijective functions

Let us look at some examples in which the properties of injectivity, surjectivity and bijectivity are determined explicitly. In every case it is important to consider not only the rule of the function, but also the domain and the codomain with which it is defined.


Example 1. Consider the function

\[ f:\mathbb R\to\mathbb R,\qquad f(x)=x+3. \]

Let us show that \(f\) is bijective.

To check injectivity, let \(x_1,x_2\in\mathbb R\) and suppose that

\[ f(x_1)=f(x_2). \]

Then

\[ x_1+3=x_2+3. \]

Subtracting \(3\) from both sides, we obtain

\[ x_1=x_2. \]

Hence \(f\) is injective.

To check surjectivity, let \(y\in\mathbb R\). We look for \(x\in\mathbb R\) such that

\[ f(x)=y. \]

We must therefore solve

\[ x+3=y, \]

Hence

\[ x=y-3. \]

Since \(y\in\mathbb R\), we also have \(y-3\in\mathbb R\). Choosing \(x=y-3\), we obtain

\[ f(x)=f(y-3)=(y-3)+3=y. \]

Hence \(f\) is surjective.

Since \(f\) is both injective and surjective, \(f\) is bijective.


Example 2. Consider the function

\[ g:\mathbb R\to\mathbb R,\qquad g(x)=x^2. \]

The function \(g\) is not injective, because two distinct elements of the domain may have the same image. Indeed

\[ -1\ne 1, \]

but

\[ g(-1)=(-1)^2=1 \]

and

\[ g(1)=1^2=1. \]

Hence \(g(-1)=g(1)\), even though \(-1\ne 1\). The function is not injective.

Moreover, \(g\) is not surjective from \(\mathbb R\) to \(\mathbb R\). Indeed, for every \(x\in\mathbb R\), we have

\[ x^2\ge 0. \]

Hence the function takes no negative values. For example, there is no \(x\in\mathbb R\) such that

\[ x^2=-1. \]

Therefore \(g\) is not surjective.

We conclude that \(g\) is neither injective nor surjective; hence it is not bijective.


Example 3. Consider the function

\[ h:\mathbb R\to[0,+\infty),\qquad h(x)=x^2. \]

Compared with the previous example, the rule and the domain are the same, but the codomain has changed.

The function \(h\) is not injective, because

\[ h(-1)=h(1)=1, \]

even though \(-1\ne 1\).

However, \(h\) is surjective. Indeed, let \(y\in[0,+\infty)\). Then \(y\ge 0\), so we may choose

\[ x=\sqrt y. \]

We have \(x\in\mathbb R\) and

\[ h(x)=h(\sqrt y)=(\sqrt y)^2=y. \]

Hence every element of the codomain \([0,+\infty)\) is attained by the function.

So \(h\) is surjective but not injective. Consequently, it is not bijective.

The same rule becomes injective, however, if the domain is restricted to \([0,+\infty)\), because on that interval the function \(x^2\) is strictly increasing.


Example 4. Consider the function

\[ p:\mathbb R\to\mathbb R,\qquad p(x)=x^3. \]

Let us show that \(p\) is bijective.

To check injectivity, let \(x_1,x_2\in\mathbb R\) and suppose that

\[ p(x_1)=p(x_2). \]

Then

\[ x_1^3=x_2^3. \]

Since the cubic function is strictly increasing on \(\mathbb R\), from \(x_1^3=x_2^3\) it necessarily follows that

\[ x_1=x_2. \]

Hence \(p\) is injective.

To check surjectivity, let \(y\in\mathbb R\). Choosing

\[ x=\sqrt[3]{y}, \]

we have \(x\in\mathbb R\) and

\[ p(x)=p(\sqrt[3]{y})=(\sqrt[3]{y})^3=y. \]

Hence \(p\) is surjective.

Since \(p\) is both injective and surjective, \(p\) is bijective.


Example 5. Consider the finite sets

\[ A=\{1,2,3\},\qquad B=\{a,b,c\} \]

and the function \(q:A\to B\) defined by

\[ q(1)=a,\qquad q(2)=b,\qquad q(3)=c. \]

The function \(q\) is injective, because distinct elements of \(A\) have distinct images in \(B\).

Moreover, \(q\) is surjective, because every element of the codomain \(B\) is attained:

\[ a=q(1),\qquad b=q(2),\qquad c=q(3). \]

Hence \(q\) is bijective.

This example illustrates in a simple way the idea of a one-to-one correspondence: to each element of the domain there corresponds a different element of the codomain, and every element of the codomain is attained exactly once.


Example 6. Consider the function

\[ r:\mathbb R\to(0,+\infty),\qquad r(x)=e^x. \]

The function \(r\) is injective, because the exponential function is strictly increasing on \(\mathbb R\).

Moreover, \(r\) is surjective onto the codomain \((0,+\infty)\). Indeed, if \(y\in(0,+\infty)\), then \(y>0\) and we may choose

\[ x=\log y. \]

We have \(x\in\mathbb R\) and

\[ r(x)=r(\log y)=e^{\log y}=y. \]

Hence \(r\) is bijective.

Its inverse function is

\[ r^{-1}:(0,+\infty)\to\mathbb R,\qquad r^{-1}(x)=\log x. \]

Here too the choice of codomain is essential: if the exponential were declared as a function from \(\mathbb R\) to \(\mathbb R\), it would not be surjective.

Common mistakes to avoid

Let us summarize some frequent mistakes in the study of injective, surjective and bijective functions.

  • Confusing injectivity and surjectivity. Injectivity concerns whether distinct elements of the domain have distinct images; surjectivity, on the other hand, concerns whether every element of the codomain is attained.
  • Thinking that the rule alone determines these properties. The same rule may define functions with different properties if the domain or the codomain changes.
  • Deciding surjectivity without looking at the codomain. A function is surjective if its image coincides with the declared codomain, not merely if it takes โ€œmanyโ€ values.
  • Deciding injectivity by looking only at a few values. To prove that a function is injective one must verify the property for all elements of the domain; to prove that it is not injective, a single counterexample suffices.
  • Thinking that a bijective function is merely a function invertible โ€œat the level of the formula or ruleโ€. A function is bijective when every element of the codomain is attained by one and only one element of the domain. Only in this case does there exist an inverse function defined on the whole codomain.

For example, a function may have a simple, seemingly well-known rule, yet behave completely differently if the domain or the codomain changes. For this reason one must never decide injectivity, surjectivity or bijectivity by looking at the expression of the function alone.

Injectivity, surjectivity and bijectivity must be studied on the complete function, that is, taking into account domain, codomain and rule of correspondence.

In conclusion, an injective function never sends distinct elements to the same value; a surjective function reaches the whole codomain; a bijective function fulfills both conditions and establishes a one-to-one correspondence between domain and codomain.


Your feedback is important to us! Leave a comment and help us improve this content. Thank you!

Feedback

Support us by liking the page:
Or, share:

Tags

  • Mathematical Analysis 1

Support us by liking the page:
Or, share:

Copyright ยฉ 2026 | Pimath | All Rights Reserved