A Möbius transformation is given by
$$f(z)=\frac{az+b}{cz+d}$$
with parameters $a$, $b$, $c$, and $d$. The Wikipedia article provides rules for finding these parameters based on three points $z_1$, $z_2$, and $z_3$ and their images $w_1$, $w_2$, and $w_3$. It is my goal to understand how we can derive the equations which yield the parameters.
Möbius transformations preserve the cross-ratio, so I assume we start with the cross-ratios of the original points and their images: $$(z,z_1;z_2,z_3)=(f(z),w_1;w_2,w_3)$$ which can be reformulated as
$$\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)}$$
I imagine the solution is obtained by reformulating this equation above somehow to solve for $f(z)$. But how is this done? I could not find a proper tutorial for this online - most tutorials I find plug in specific points at this stage, but I would like to learn how the general approach is derived.
multiply up
$$(f(z)-w_3)(w_1-w_2)(z-z_2)(z_1-z_3)=(f(z)-w_2)(w_1-w_3)(z_1-z_2)(z-z_3)$$
put
$$(f(z)-w_3)\cdot A=(f(z)-w_2)\cdot B$$
multiply out $$f(z) \cdot (A-B)=w_3\cdot A-w_2\cdot B$$
multiply out
$$f(z) =\frac{w_3\cdot A-w_2\cdot B}{A-B}$$
should work as long as $A \not = B$, infinities may need to be handled separately.