Bijective function

In mathematics, a **bijective** function or **bijection** is a function *f*&nbsp;:&nbsp;*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.

## Basic properties
Formally:
:f:A \rightarrow B&nbsp;is a bijective function if&nbsp;\forall b \in B, there is a **unique** a \in A&nbsp;such that &nbsp;f(a)=b \,.
where the element b is called the **image** of the element a, and the element a the **pre-image** of the element b. 

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 &#35;*A*=4.

By definition, two sets *A* and *B* have the same cardinality if there is a bijection between the sets. So &#35;*A*=&#35;*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*&nbsp;:&nbsp;*A* → *B* be a bijection. The inverse function *g*&nbsp;:&nbsp;*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,
::&nbsp;f^{-1}(x)&nbsp; denotes the inverse function of the **function** *f*, but &nbsp;x^{-1}=\frac{1}{x} denotes the reciprocal value of the **number** *x*.

## Examples 
### Elementary functions
Let *f*(*x*):&#8477;→&#8477; 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*o we can find at least one real number *x*o such that *y*o=*f*(*x*o) **and** if *f*(*x*o)=*f*(*x*1) means *x*o=*x*1 . 

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.)

**Example:** The linear function of a slanted line is a bijection. That is, *y*=*ax*+*b* where *a*&ne;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*3 is a bijection. Image 2 and image 5 thin yellow curve. Its inverse is the cube root function *f*(*x*)= &#8731;*x* and it is also a bijection *f*(*x*):&#8477;→&#8477;. Image 5: thick green curve.

**Example:** The quadratic function *f*(*x*) = *x*2 is **not** a bijection (from &#8477;→&#8477;). 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).

**Note:** This last example shows this. To determine whether a function is a bijection we need to know three things:

* the domain
* the function *machine*
* the codomain
**Example:** Suppose our function *machine* is *f*(*x*)=*x*&sup2;. 
*This *machine* and domain=&#8477; and codomain=&#8477; 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 &#8477;.
*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,+∞)
:f(x):[0,+\infty) \,\, \rightarrow \,\, [0,+\infty)&nbsp; defined by &nbsp;f(x) = x^2
is a bijection. Image 6: thin yellow curve.

**Example:** The square root function defined on the restricted domain and codomain [0,+∞) 
:f(x):[0,+\infty) \,\, \rightarrow \,\, [0,+\infty)&nbsp; defined by &nbsp;f(x) = \sqrt{x}
is the bijection defined as the inverse function of the quadratic function: *x**2*. Image 6: thick green curve.

**Example:** The exponential function defined on the domain &#8477; and the restricted codomain (0,+∞) 

:f(x):\mathbf{R} \,\, \rightarrow \,\, (0,+\infty)&nbsp; defined by &nbsp;f(x) = a^x \, ,\,\, a>1
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 &#8477;
:f(x):(0,+\infty) \,\, \rightarrow \,\, \mathbf{R}&nbsp; defined by &nbsp;f(x) = \log_a x \, ,\,\, a>1
is the bijection defined as the inverse function of the exponential function: *a**x*. Image 4: thick green curve (*a*=10).

## Related pages
*Surjective function
*Injective function
*Inverse function

## References
## Other websites
*  interactive quiz
*  interactive