n-Involutory Rational Functions

2017 April 17

Find a function with the property $$f^3(x)=x$$.
Find a function with the property $$f^4(x)=x$$.
Find a function with the property $$f^6(x)=x$$.

Lately I’ve been fascinated with a different class of functions - involutory functions, or functions that invert themselves. These functions have the property $$f^2(x)=x$$. A few of these functions include:
$f_1(x)=-x$
$f_2(x)=1-x$
$f_3(x)=\frac{1}{x}$
$f_4(x)=-\frac{1}{x}$
$f_5(x)=\frac{x+1}{x-1}$

In fact, there are infinitely many such functions, because if $$f$$ is in the form
$f(x)=(g\circ h\circ g^{-1})(x)$

then $$f$$ is an involution whenever $$h$$ is. A very special type of function to consider is a function of the type
$f(x)=\frac{ax+b}{cx+d}$

which does some interesting things when iterated. Notice what happens when we compose two rational functions of the form
$f(x)=\frac{ax+b}{cx+d}$
$g(x)=\frac{ex+f}{gx+h}$
$(f\circ g)(x)=\frac{a\frac{ex+f}{gx+h}+b}{c\frac{ex+f}{gx+h}+d}$
$(f\circ g)(x)=\frac{a(ex+f)+b(gx+h)}{c(ex+f)+d(gx+h)}$
$(f\circ g)(x)=\frac{(ae+bg)x+(af+bh)}{(ce+dg)x+(cf+dh)}$

This may not seem remarkable at first, but notice what happens when we multiply two matrices:
$\begin{bmatrix}a & b\\c & d\end{bmatrix}\begin{bmatrix}e & f\\g & h\end{bmatrix}$
$\begin{bmatrix}ae+bg & af+bh\\ce+dg & cf+dh\end{bmatrix}$

Which is analogous to what we got for our iterated rational function. Therefore, if we map the rational function
$f(x)=\frac{ax+b}{cx+d}$

onto the matrix
$\begin{bmatrix}a & b\\c & d\end{bmatrix}$

so that we map the coefficients of $$x$$ on the numerator and denominator to the leftmost entries and the constants to the rightmost entries, then $$f^n(x)$$ maps onto the matrix
$\begin{bmatrix}a & b\\c & d\end{bmatrix}^n$

Notice then that if such a function is involutory, then the matrix that it maps onto has the property that
$\begin{bmatrix}a & b\\c & d\end{bmatrix}^2=\begin{bmatrix}1 & 0\\0 & 1\end{bmatrix}$

which is the $$2$$ x $$2$$ identity matrix. Interestingly, this holds even for fractional and negative iterates of $$f$$. Using this result, we can find a couple very interesting types of rational functions. For example, functions of the form
$f(x)=\frac{ax-a^2}{x}$

are 3-involutory, meaning that $$f^3(x)=x$$. The function
$f(x)=\frac{ax-a^2}{x+a}$

is 4-involutory. We can even find a function that is $$6-involutory$$ by finding the halfth iterate of our 3-involutory function. To find the halfth iterate or functional square root of a rational function
$f(x)=\frac{ax+b}{cx+d}$

we map it onto a matrix
$\begin{bmatrix}a & b\\c & d\end{bmatrix}$

and use the matrix square root formula:
$\sqrt{\begin{bmatrix}a & b\\c & d\end{bmatrix}}=\frac{1}{t}\begin{bmatrix}a+s & b\\c & d+s\end{bmatrix}$

where $$s$$ is the positive or negative root of the determinant. We don’t have to worry about what $$t$$ is, because when we revert this back to a rational function, it will cancel out. So the square root of our rational function is
$f(x)=\frac{(a\pm\sqrt{ad-bc})x+b}{cx+(d\pm\sqrt{ad-bc})}$

and using this, we can find the functional square root of our 3-involutory function:
$f(x)=\frac{(a\pm\sqrt{a^2})x+b}{cx+(d\pm\sqrt{a^2})}$
$f(x)=\frac{(a\pm a)x-a^2}{x\pm a}$

and so now we know that functions of the form
$f(x)=\frac{2ax-a^2}{x+a}$
$f(x)=\frac{a^2}{a-x}$

are 6-involutory. We could go even further and find a 12-involutory function or a 24-involutory function, but… nah. There’s one more interesting property about these types of functions. If
$f(x)=\frac{ax+b}{cx+d}$

and
$f^n(x)=\frac{ex+f}{gx+h}$

then if
$g(x)=\frac{ax+c}{bx+d}$

it must be true that
$g^n(x)=\frac{ex+g}{fx+h}$

Why is this true? Well, try mapping the functions $$f$$ and $$g$$ onto matrices $$F$$ and $$G$$. Then it is clear that $$F$$ is the transpose of $$G$$, or that $$F^T=G$$. There is a property of matrices stating that for any matrices $$A$$ and $$B$$,
$(AB)^T=B^TA^T$

so it follows from this that for any matrix $$A$$,
$(A^{n})^T=(A^{T})^n$

Since we are likening exponentiation of matrices to the iteration of functions, this means that the “transpose” of $$f$$ iterated $$n$$ times is equal to the the nth iterate of its transpose, proving our original statement. Furthermore, if a function of this type is n-involutory, then so is its “transpose”, telling us that in addition to our above 6-involutory functions, we also have the functions
$f(x)=\frac{2ax+1}{a-a^2x}$
$f(x)=\frac{-1}{a^2x+a}$

And this theorem can be applied to all types of n-involutory functions of this type.

Edit: 2017 June 3

Okay, there is a way to find an n-involutory rational function for any positive integer $$n$$. Such a function is given by
$f(x)=\frac{x\cos\zeta-\sin\zeta}{x\sin\zeta-\cos\zeta}$

where
$\zeta=\frac{2\pi}{n}$

To prove this, we will have to employ the trigonometric sum angle formulas for the sine and cosine:
$\sin(\theta+\phi)=\sin\theta\cos\phi+\cos\theta\sin\phi$
$\cos(\theta+\phi)=\cos\theta\cos\phi-\sin\theta\sin\phi$

This can be derived by, once again, using matrices in place of actual rational functions. Suppose we are multiplying the matrices
$\begin{bmatrix}\cos a\zeta & -\sin a\zeta\\\sin a\zeta & \cos a\zeta\end{bmatrix}\begin{bmatrix}\cos b\zeta & -\sin b\zeta\\\sin b\zeta & \cos b\zeta\end{bmatrix}$

When we carry out the multiplication, we get
$\begin{bmatrix}\cos a\zeta\cos b\zeta-\sin a\zeta\sin b\zeta & -\sin a\zeta\cos b\zeta-\cos a\zeta\sin b\zeta\\\sin a\zeta\cos b\zeta+\cos a\zeta\sin b\zeta & \cos a\zeta\cos b\zeta-\sin a\zeta\sin b\zeta\end{bmatrix}$

Look! These are the sum angle formulas, and this can be simplified to
$\begin{bmatrix}\cos (a+b)\zeta & -\sin (a+b)\zeta\\\sin (a+b)\zeta & \cos (a+b)\zeta\end{bmatrix}$

Now that we know this, we can say that
$\begin{bmatrix}\cos \zeta & -\sin \zeta\\\sin \zeta & \cos \zeta\end{bmatrix}^n=\begin{bmatrix}\cos n\zeta & -\sin n\zeta\\\sin n\zeta & \cos n\zeta\end{bmatrix}$

And, if $$\zeta=\frac{2\pi}{n}$$,
$\begin{bmatrix}\cos \zeta & -\sin \zeta\\\sin \zeta & \cos \zeta\end{bmatrix}^n=\begin{bmatrix}\cos 2\pi & -\sin 2\pi\\\sin 2\pi & \cos 2\pi\end{bmatrix}$
$\begin{bmatrix}\cos \zeta & -\sin \zeta\\\sin \zeta & \cos \zeta\end{bmatrix}^n=\begin{bmatrix}1 & 0\\0 & 1\end{bmatrix}$

Thus it is proven. Because of the relationship previously established between matrices and rational functions, if
$f(x)=\frac{x\cos\zeta-\sin\zeta}{x\sin\zeta-\cos\zeta}$
and
$\zeta=\frac{2\pi}{n}$
then
$f^n(x)=x$