Question: What can be said about the coefficients of linear transformations which transforms the real axis into the imaginary axis?
Thoughts: If I wanted to transorm the real axis into itself, then I can show that I can do this using the cross ratio $(w,w_1,w_2,w_3)=(z,1,0,-1)$, and it turns out the we get the coefficients are real. So, if I wanted to transform the real axis into the imaginary axis, could I set up a cross ratio as $(z,1,0,-1)=(w,i,0,-i)$? But I don't have anything that tells me, for instance, that $1$ is necessarily going to $i$. So I am sort of stuck. I would like to do this using the cross ratio, but maybe that is the wrong approach? Any help is greatly appreciated! Thank you.
First let's look again at what we can say about the coefficients of a fractional linear transformation that maps the extended real axis (including a point at infinity) onto itself. (Whenever discussing a fractional linear transformation here, I will assume the transformation is invertible, since otherwise it will not map the real line "onto" itself; it will map everything to a single number.)
As you know, if $(z,z_1,z_2,z_3)$ is defined as the cross-ratio of the four complex numbers $z,z_1,z_2,z_3,$ the transformation $\mathbb C\to\mathbb C$ with rule $z \mapsto (z,z_1,z_2,z_3)$ where $z_1,z_2,z_3$ are distinct and are all real is a fractional linear transformation that maps the extended real axis onto itself. And the coefficients of that transformation are all real. As it happens, in general if $a,b,c,d$ are all real, $$ z \mapsto \frac{az + b}{cz + d} \tag1 $$ is a fractional linear transformation that maps the extended real axis onto itself.
Moreover, every fractional linear transformation that maps the extended real axis onto itself can be written with all real coefficients. (See the question Möbius tranformation taking reals to reals can be written with real coefficients or the answers to Any linear fractional transformation transforming the real axis to itself can be written in terms of reals?) But the fact that the transformation can be written with real coefficients does not imply that it must be written with real coefficients. You can write the transformation with real coefficients and then multiply every coefficient by the same non-real complex factor $\zeta ,$ $$ z \mapsto \frac{\zeta az + \zeta b}{\zeta cz + \zeta d} \tag2 $$ and you have the same transformation as given by the rule $(1)$ above, but the coefficients that are not zero are not real.
On the other hand, given a linear fractional transformation that maps the real line onto itself, if the transformation is $$ z \mapsto \frac{a'z + b'}{c'z + d'} $$ where $a',b',c',d'$ are not all real, you can divide all coefficients by $a$ if $a \neq 0$ or divide all coefficients by $c$ if $a = 0$ and obtain a formula with all real coefficients. (See this answer for a proof.) So every such transformation can be written in the form of $(2),$ which implies that in order to write such a transformation, the four coefficients must all lie on a single line through the origin.
It is not possible to create a linear fractional transformation with coefficients like those in $(2)$ by using a cross-ratio, at least not without further manipulation (such as multiplying all coefficients by a common factor). The cross-ratio does not directly tell you everything that is possible with linear fractional transformations.
Now let's consider mapping the real line onto the imaginary line.
One way to map the real line onto the imaginary line is first to map the real line onto itself and then multiply the result by $i.$ In fact, every linear fractional transformation that maps the real line onto the imaginary line can be written this way, that is, it can be written in the form $$ z \mapsto i\frac{a'z + b'}{c'z + d'} $$ where $a',b',c',d'$ are all real. But if $$\frac{az + b}{cz + d} = i\frac{a'z + b'}{c'z + d'} = \frac{ia'z + ib'}{c'z + d'}$$ then $a,b$ must both be imaginary and $c,d$ must both be real. As with a transformation onto the real line, however, you can multiply every coefficient by the same arbitrary non-zero complex number and obtain a new formula for the same transformation that does not necessarily have two imaginary and two real coefficients; all you can be sure of is that the coefficients $a,b$ will lie on one line through the origin and the coefficients $c,d$ will lie on another line through the origin perpendicular to the first line.
If you just want to get a fractional linear transformation that maps the real line onto the imaginary line using cross-ratios, you can use an equation such as the one you wrote, $(z,1,0,−1) = (w,i,0,−i).$ More generally, as shown in this answer to the question Deriving a Möbius transformation specified by three points, you can choose any three arbitrary distinct complex numbers $z_1,z_2,z_3$ that you like and decide to map them to any three arbitrary distinct complex numbers $w_1,w_2,w_3$ that you like via a transformation obtained from the formula $$ (z,z_1,z_2,z_3) = (w,w_1,w_2,w_3). \tag3 $$ Simply solve for $w$ in terms of $z$ in $(3),$ so that you have an expression $w = f(z)$, where $f(z)$ will be a linear fractional transformation of $z$, and then $z \mapsto f(z)$ is the desired transformation.
If $z_1,z_2,z_3$ are all real and $w_1,w_2,w_3$ are all imaginary you get the desired result. And yes, in $(z,1,0,−1)=(w,i,0,−i)$ you can guarantee that $1$ goes to $i$, and so forth. If we consider the general formula expanded explicitly on each side, $$ \frac{(z-z_2)(z_1-z_3)}{(z_1-z_2)(z-z_3)} =\frac{(f(z)-w_2)(w_1-w_3)}{(w_1-w_2)(f(z)-w_3)}, $$ we see that if $z = z_1$ then the left side becomes $1,$ which implies $$(f(z_1)-w_2)(w_1-w_3)=(w_1-w_2)(f(z_1)-w_3)$$ on the right, which implies $f(z_1) = w_1$; if $z = z_2$ then the left side becomes $0$, which means the right side must be $0$, which implies $f(z_2) = w_2$; and if $z = z_3$ then the left side becomes $\infty$, so the right side must be $\infty,$ which implies that $f(z_3) = w_3$.
If you examine the formulas in this answer while assuming $z_1,z_2,z_3$ are all real and $w_1,w_2,w_3$ are all imaginary, you should be able to confirm that in the derived linear fractional formula, the numerator $w_3\cdot A-w_2\cdot B$ has the form $az+b$ with $a,b$ real and the denominator $A-B$ has the form $cz+d$ with $c,d$ imaginary, which is consistent with the general rule I gave earlier.