Point of Perpendicular Intersection on Real Line from Points in Complex Plane

Theorem
Let $a, b \in \C$ be complex numbers represented by the points $A$ and $B$ respectively in the complex plane.

Let $x \in \R$ be a real number represented by the point $X$ on the real axis such that $AXB$ is a right triangle with $X$ as the right angle.

Then:
 * $x = \dfrac {a_x - b_x \pm \sqrt {a_x^2 + b_x^2 + 2 a_x b_x - 4 a_y b_y} } 2$

where:
 * $a = a_x + a_y i, b = b_x + b_y i$

Proof
From Geometrical Interpretation of Complex Subtraction, the lines $XA$ and $XB$ can be represented by the complex numbers $a - x$ and $b - x$.


 * Perpendicular-intersection-on-real-axis.png

From Multiplication by Imaginary Unit is Equivalent to Rotation through Right Angle $a - x$ and $b - x$ are perpendicular either:
 * $a - x = r i \paren {b - x}$

for some real numbers $r \in \R$.

That is, $\dfrac {a - x} {b - x}$ are purely imaginary.

Thus: