# What is a bijection?

A bijective function is both injective and surjective.

A function f is

injective, if for every y, there existsat most one(≤ 1) x such that f(x) = y.

In other words, for any y in the codomain, there could either be a unique x such that f(x) = y, or there could be none.

A function f is

surjective, if for every y, there existat least one(≥ 1) x such that f(x) = y.

In other words, for any y in the codomain, there could be x₁, x₂, x₃,… such that f(x₁) = f(x₂) = f(x₃) = y. There can be arbitrarily many of such x, but there needs to be at least one.

We say a function f is **bijective**, *iff *it is both injective and surjective. According to the definitions above, it means that for every y in Y, the number of x that satisfy f(x) = y is both **≤ 1 **and **≥ 1**. Hence, there could only be one of such x.

Now, we give the definition of bijectivity:

A function f is

bijective, if for every y in Y, there existsexactly one(=1) x such that f(x) = y.

Note:

- It is not the same as saying “For every x in X, there is exactly one y in Y such that f(x) = y”. This is the definition of a
**function, not bijectivity.**