# Some examples of functions that are their own inverse? [duplicate]

I'm looking for the name and some examples of functions $f$ with the following property

$$f\circ f=I$$

where $I$ is the identity. This means that $f=f^{-1}$; some examples are the functions $f(n)=-n$ and $g(n)=1/n$. What are other examples of functions that have this property and what is so special about them?

## marked as duplicate by user7530, drhab, Guy Fsone, Community♦Oct 31 '17 at 20:14

If, $\forall\, a \in \mathbb{R}$, with $f(x)=a-x$ we find \begin{align} f(f(x)) &= a-(a-x) \\ &= a-a +x \\ &= x \\ \text{i.e.} f^2 &= e \iff f=f^{-1} \end{align}
Hint: take $$f(x) =\frac1x~~for ~~~x\neq 0$$
or $$g(x) =\frac{x+1}{x-1}~~~~for ~~x\neq 1.$$
Consider the function $f$ given by $$f(x)=\ln\left(\frac{e^{x}+1}{e^{x}-1}\right)$$