Bijective function

|||
| --- | --- |
|width="210"|**Bijection**. There is exactly one arrow to every element in the codomain _B_ (from an element of the domain _A_).|

In mathematics, a **bijective** function or **bijection** is a function _f_ : _A_ → _B_ that is both an injection and a surjection. This is equivalent to the following statement: for every element _b_ in the codomain _B_, there is _exactly_ one element _a_ in the domain _A_ such that _f_(_a_)=_b_. Another name for bijection is **1-1 correspondence** (read "one-to-one correspondence").

The term _bijection_ and the related terms _surjection_ and _injection_ were introduced by Nicholas Bourbaki. In the 1930s, he and a group of other mathematicians published a series of books on modern advanced mathematics.
|||
| --- | --- |
|width="210"|**Not a bijection**. (It is not a surjection. It is not an injection.)|

## Basic properties

Formally:
-  is a bijective function if , there is a **unique**  such that  
where the element  is called the **image** of the element , and the element  the **pre-image** of the element .

The formal definition can also be interpreted in two ways:
- Every element of the codomain _B_ is the _image_ of exactly one element in the domain _A_.
- Every element of the codomain _B_ has exactly one pre-image in the domain _A_.
Note: Surjection means **minimum** one pre-image. Injection means **maximum** one pre-image. So bijection means **exactly** one pre-image.

## Cardinality

Cardinality is the _number_ of elements in a set. The cardinality of _A_={X,Y,Z,W} is 4. This can be written as #_A_=4.

By definition, two sets _A_ and _B_ have the same cardinality if there is a bijection between the sets. So #_A_=#_B_ means there is a bijection from A to B.

## Bijections and inverse functions

Bijections and inverse functions are related to each other, in that a bijection is invertible, can be turned into its inverse function by reversing the arrows.

Formally:
Let _f_ : _A_ → _B_ be a bijection. The inverse function _g_ : _B_ → _A_ is defined by if _f_(_a_)=_b_, then _g_(_b_)=_a_.  (See also Inverse function.)
- The inverse function of the inverse function is the original function.
- A function has an inverse function if and only if it is a bijection.

**Note:** The notation for the inverse function of _f_ is confusing. Namely,
    -    denotes the inverse function of the **function** _f_, but   denotes the reciprocal value of the **number** _x_.

### Elementary functions

Let _f_(_x_):ℝ→ℝ be a real-valued function _y_=_f_(_x_) of a real-valued argument _x_. (This means both the input and output are numbers.)
- **Graphic meaning**: The function _f_ is a bijection if every horizontal line intersects the graph of _f_ in **exactly** one point.
- **Algebraic meaning**: The function _f_ is a bijection if for every real number _y_<sub>o</sub> we can find at least one real number _x_<sub>o</sub> such that _y_<sub>o</sub>=_f_(_x_<sub>o</sub>) **and** if _f_(_x_<sub>o</sub>)=_f_(_x_<sub>1</sub>) means _x_<sub>o</sub>=_x_<sub>1</sub> .
<div style="margin-left:15px">
Proving that a function is a bijection means proving that it is both a surjection and an injection. So formal proofs are rarely easy. Below we _discuss_ and do not prove. (See surjection and injection.)
</div>

**Example:** The linear function of a slanted line is a bijection. That is, _y_=_ax_+_b_ where _a_≠0 is a bijection.
- Discussion: Every horizontal line intersects a slanted line in exactly one point (see surjection and injection for proofs). Image 1.

**Example:** The polynomial function of third degree: _f_(_x_)=_x_<sup>3</sup> is a bijection. Image 2 and image 5 thin yellow curve. Its inverse is the cube root function _f_(_x_)= ∛_x_ and it is also a bijection _f_(_x_):ℝ→ℝ. Image 5: thick green curve.

**Example:** The quadratic function _f_(_x_) = _x_<sup>2</sup> is **not** a bijection (from ℝ→ℝ). Image 3.  It is not a surjection. It is not an injection. However, we can restrict both its domain and codomain to the set of non-negative numbers (0,+∞) to get an (invertible) bijection  (see examples below).

<div style="margin-top:1em;;">
**Note:** This last example shows this. To determine whether a function is a bijection we need to know three things:
</div>
- the domain
- the function _machine_
- the codomain
**Example:** Suppose our function _machine_ is _f_(_x_)=_x_².
- This _machine_ and domain=ℝ and codomain=ℝ is not a surjection and not an injection. However,
- this same _machine_ and domain=0,+∞) and codomain=[0,+∞) is both a surjection and an injection and thus a bijection.

### Bijections and their inverses

Let _f_(_x_):_A_→_B_ where _A_ and _B_ are subsets of ℝ.
- Suppose _f_ is not a bijection. For any _x_ where the derivative of _f_ exists and is not zero, there is a _neighborhood_ of _x_ where we can restrict the domain and codomain of _f_ to be a bijection.
- The graphs of inverse functions are symmetric with respect to the line _y_=_x_. (See also [Inverse function.)

**Example:** The quadratic function defined on the restricted domain and codomain 0,+∞)
-   defined by  
is a bijection. Image 6: thin yellow curve.

**Example:** The square root function defined on the restricted domain and codomain [0,+∞)
-   defined by  
is the bijection defined as the [inverse function of the quadratic function: _x_<sup>_2_</sup>. Image 6: thick green curve.

<div style="margin-top:1em;;">
**Example:** The exponential function defined on the domain ℝ and the restricted codomain (0,+∞)
</div>
-   defined by  
is a bijection. Image 4: thin yellow curve (_a_=10).

**Example:** The logarithmic function base _a_ defined on the restricted domain (0,+∞) and the codomain ℝ
-   defined by  
is the bijection defined as the inverse function of the exponential function: _a_<sup>_x_</sup>. Image 4: thick green curve (_a_=10).

<div style="margin-top:1em;margin-bottom:1em;margin-left:15px">
|colspan=3|Bijection: every vertical line (in the domain) and every horizontal line (in the codomain) intersects exactly one point of the graph.|||||
| --- | --- | --- | --- | --- | --- |
|width="230"|<hr />1. Bijection. All slanted lines are bijections _f_(_x_):ℝ→ℝ.|width="230"|<hr />2. Bijection. _f_(_x_):ℝ→ℝ. _f_(_x_)=_x_³.|width="230"|<hr />3. Not a bijection. _f_(_x_):ℝ→ℝ. _f_(_x_)=_x_² is not a surjection. It is not an injection.|
|width="230"|<hr />4. Bijections. _f_(_x_):ℝ→ (0,+∞). _f_(_x_)=10<sup>_x_</sup> (thin yellow) and its inverse _f_(_x_):(0,+∞)→ℝ. _f_(_x_)=log<sub>10</sub>_x_ (thick green).|width="230"|<hr />5. Bijections. _f_(_x_):ℝ→ℝ. _f_(_x_)=_x_³ (thin yellow) and its inverse _f_(_x_)=∛_x_ (thick green).|width="230"|<hr />6. Bijections. _f_(_x_):0,+∞)→[0,+∞). _f_(_x_)=_x_² (thin yellow) and its inverse _f_(_x_)=√_x_ (thick green).|
</div>

## Related pages

- [Surjective function
- Injective function
- Inverse function

## Other websites

- interactive quiz
- interactive