# Real and imaginary parts of the Möbius transformation

Given that the Möbius transformation is:

$f(z) = \frac{az+b}{cz+d}$

$ad-bc \neq 0$ and with $a,b,c$ and $d$ complex numbers written $a= a_1 + a_2i$ etc.

I think I must be missing something because when separating the Möbius transformation in to its real and imaginary parts I got this:

$\frac{(a_1c_1+a_2c_2)z^2 + (b_1c_1+b_2c_2)z +(a_1d_1+a_2d_2)z +(b_1d_1+b_2d_2)}{|c|^2z^2 + |d|^2}$ for the real part... and

$\frac{(a_1c_1-a_2c_2)z^2 + (b_1c_1-b_2c_2)z +(a_1d_1-a_2d_2)z +(b_1d_1-b_2d_2)}{|c|^2z^2 + |d|^2}i$ as the imaginary.

It really looks awful, is there a better way to write this?

Update. Duh. Dumb mistake, reworking them I get this, the point is it's still ugly.

Real: $\frac{(a_1x-a_2y+b_1)(c_1x-c_2y+d_1) -(a_2x+a_1y+b_2)(c_2x+c_1y+d_2)}{(c_1x-c_2y+d_1)^2 - (c_2x+c_1y+d_2)^2}$

$\frac{R(ac)x^2 - 2(a_1c_2 + a_2c_1)xy + (R(ad) + R(bc))x - (R(ab) + R(bc))y - R(ac)y^2 + R(bd)}{(c_1x-c_2y+d_1)^2 - (c_2x+c_1y+d_2)^2}$

Img: $\frac{(a_2x-a_1y+b_2)(c_1x-c_2y+d_1) -(a_1x+a_2y+b_1)(c_2x+c_1y+d_2)}{(c_1x-c_2y+d_1)^2 - (c_2x+c_1y+d_2)^2}$

-
Do you genuinely need to have the real and imaginary parts all be in terms of real variables (i.e. real and imaginary parts of input quantities)? If so, then yes, the expressions are positively baroque. –  Guess who it is. May 3 '11 at 4:35
Also, see this question for a simplification of the imaginary part: math.stackexchange.com/questions/1257236/… –  EthanAlvaree Apr 29 at 8:52

Hmm, after trying on my own, what I'm getting is (where $z=x+iy$, as usual):

$$\Re\left(\frac{az+b}{cz+d}\right)=\frac{\mu\,\Re(a)+\nu\,\Im(a)+\xi\,\Re(b)+\eta\,\Im(b)}{\Delta}$$

$$\Im\left(\frac{az+b}{cz+d}\right)=\frac{\mu\,\Im(a)-\nu\,\Re(a)+\xi\,\Im(b)-\eta\,\Re(b)}{\Delta}$$

where

$\mu=|z|^2\Re(c)+\alpha$

$\nu=|z|^2\Im(c)+\beta$

$\xi=x\Re(c)-y\Im(c)+\Re(d)$

$\eta=x\Im(c)+y\Re(c)+\Im(d)$

$\Delta=|z|^2 |c|^2+|d|^2+2\alpha\,\Re(c)+2\beta\,\Im(c)$

and

$\alpha=x\Re(d)+y\Im(d)$

$\beta=x\Im(d)-y\Re(d)$

The usual admonition in programming to "isolate common subexpressions" is a useful way to deal with complexity.

-

This is not the correct splitting: mind that $z$ is complex too, so you have to write $z=x+iy$, if you want to represent $f(z)=u(x,y)+iv(x,y)$. It will get a lot worse...

-
thanks, is there any more compact was of representing the repeated terms I have such as (a1c1 + a2c2) ? –  futurebird May 2 '11 at 23:38
just as $Re(\overline{ac})$ :) –  Dennis Gulko May 2 '11 at 23:43
Thank you! That's what I was trying to think of! Please make that a comment as it's the answer to the question-- even though the way I presented it was flawed. –  futurebird May 3 '11 at 0:01

Edit: Sorry - this only holds for $a,b,c,d \in \mathbb{R}$!

Thanks to some help in a question I asked:

\begin{align*} \textrm{Re} (f(z)) &=\textrm{Re} \left(\frac{az+b}{cz+d}\right) \\ &=\textrm{Re} \left( \frac{(az+b)(c \overline{z}+d)}{(cz+d)(c \overline{z}+d)}\right) \\ &=\frac{1}{|cz+d|^2} \textrm{Re} \left( acz\overline{z}+bc\overline{z}+adz+bd\right) \\ &= \frac{\left(ac|z|^2+bd\right)+(ad+bc)\textrm{Re}(z)}{|cz+d|^2} \end{align*} and \begin{align*} \textrm{Im} (f(z)) &=\textrm{Im} \left(\frac{az+b}{cz+d}\right) \\ &=\textrm{Im} \left( \frac{(az+b)(c \overline{z}+d)}{(cz+d)(c \overline{z}+d)}\right) \\ &=\frac{1}{|cz+d|^2} \textrm{Im} \left( acz\overline{z}+bc\overline{z}+adz+bd\right) \\ &= \frac{(ad-bc)}{|cz+d|^2} \textrm{Im}(z) \end{align*}

-
Do note that in this question, $a,c,b,d$ are assumed to be complex numbers, in which case the expressions given in this answer are incorrect. –  Ian Apr 29 at 9:39
Ah - Ian, you're right! My mistake - good point. –  EthanAlvaree Apr 29 at 9:41