# Bijective function

In mathematics, an **invertible function**, also known as a **bijective function** or simply a **bijection** is a function that establishes a *one-to-one correspondence* between elements of two given sets. Loosely speaking, all elements of the sets can be matched up in pairs so that each element of one set has its unique counterpart in the second set. A bijective function from a set X to itself is also called a **permutation** of the set X.

More formally, a function <math>f</math> from set <math>X</math> to set <math>Y</math> is called a *bijection* if and only if for each <math>y</math> in <math>Y</math> there exists exactly one <math>x</math> in <math>X</math> such that <math>f(x)=y</math>.

The most important property of a bijective function is the existence of an inverse function which *undoes* the operation of the function. These functions can then be viewed as *dictionaries* by which one can translate information from the domain to the codomain and back again. The existence of an inverse function often forces the domain and codomain to have common properties.

## Examples

- The function from set <math>\{1,2,3,4\}</math> to set <math>\{10,11,12,13\}</math> defined by the formula <math>f(x)=x+9</math> is a bijection.
- A less obvious example is the function <math>f</math> from the set <math>X=\{(x,y)\}</math> of all
*pairs*(x,y) of positive integers to the set of all positive integers given by formula <math>f(x,y)=2^{x-1}\cdot (2y-1)</math>. - The function <math>\tan\colon(-\frac{\pi}{2},\frac{\pi}{2})\to R</math> is a bijection.

## Composition

If <math>f\colon X\to Y</math> and <math>g\colon Y\to Z</math> are bijections than so is their composition <math>g\circ f\colon X\to Z</math>.

A function <math>f\colon X\to Y</math> is a bijective function if and only if there exists function <math>g\colon Y \to X </math> such that their compositions <math>g\circ f</math> and <math>f\circ g</math> are identity functions on relevant sets. In this case we call function <math>g</math> an inverse function of <math> f</math> and denote it by <math>f^{-1}</math>.

## Bijections and the concept of cardinality

Two finite sets have the same number of elements if and only if there exists a bijection from one set to another. Georg Cantor generalized this simple observation to infinite sets and introduced the concept of *cardinality* of a set. We say that two set are *equinumerous* (sometimes also *equipotent* or *equipollent*) if there exists a bijection from one set to another. If this is the case, we say the sets have the same cardinality or the same cardinal number. Cardinality can be thought of as a generalization of number of elements of finite sets.

## Some more examples

- A function is a bijection iff it is both an injection and a surjection.
- The quadratic function <math>R\to R: x\mapsto x^2</math> is neither injection nor surjection, hence is not bijection. However if we change its domain and codomain to the set <math>[0,+\infty)</math> than the function becomes bijective and the inverse function <math>\sqrt\colon [0,+\infty)\to[0,+\infty),\ x\mapsto \sqrt{x}</math> exists. This procedure is very common in mathematics, especially in calculus.
- A continuous function from the closed interval <math>[a,b]</math> in the real line to closed interval <math>[c,d]</math> is bijection if and only if is monotonic function with
*f*(*a*) =*c*and*f*(*b*) =*d*.