It's pretty well known and easy to show that for a linear fractional function $f(x)=\frac{ax+b}{cx+d}$ to be an involution, ie. $f(f(x))=x$, then $a\cdot d=-1$ is a necessary and sufficient condition.
An example of a rational function which satisfies $f(f(f(x)))=x$ is $\frac{x-1}{x}$.
I was fooling around with a few of these types of questions with a friend, and we got stuck on $f(f(f(f(x))))=x$. Does there exist a solution $f(x)=\frac{g(x)}{h(x)}$ where $g(x), h(x) \in \mathbb{Z}[x]$, and $f(f(x))\neq x$.
So far we've discovered that $f$ is bijective, $F(x):=f(f(x))$ is an involution, and $f(x)=\frac{1+ix}{x+i}$ works if we loosen the requirement on integer/rational coefficients, as $f(f(x))=\frac{1}{x}$ in this case.
We highly suspect that if $g(x), h(x)$ exist, then they are degree 3 or above as $F(F(x))=\frac{ax+b}{cx-a}$ doesn't seem to be yielding any acceptable solutions (and degree 2 doesn't satisfy bijectivity).
if we loosen the requirement on integer/rational coefficientsThen $,f(x)=i x,$ suffices. – dxiv Apr 02 '18 at 18:13