# 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$.

From Multiplication by Imaginary Unit is Equivalent to Rotation through Right Angle $a - x$ and $b - x$ are perpendicular if and only if either:

- $a - x = r i \paren {b - x}$

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

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

Thus:

\(\displaystyle \dfrac {a - x} {b - x}\) | \(=\) | \(\displaystyle r i\) | |||||||||||

\(\displaystyle \leadsto \ \ \) | \(\displaystyle \dfrac {\paren {a - x} \paren {\overline b - x} } {\paren {b - x} \paren {\overline b - x} }\) | \(=\) | \(\displaystyle r i\) | ||||||||||

\(\displaystyle \leadsto \ \ \) | \(\displaystyle \paren {a_x + a_y i - x} \paren {b_x - b_y i - x}\) | \(=\) | \(\displaystyle r' i\) | for some $r' \in \R$: denominator is real | |||||||||

\(\displaystyle \leadsto \ \ \) | \(\displaystyle a_x b_x - a_x b_y i - a_x x + a_y b_x i + a_y b_y - a_y x i - x b_x - x b_y i + x^2\) | \(=\) | \(\displaystyle r' i\) | ||||||||||

\(\displaystyle \leadsto \ \ \) | \(\displaystyle a_x b_x - a_x x + a_y b_y - x b_x + x^2\) | \(=\) | \(\displaystyle 0\) | equating real parts | |||||||||

\(\displaystyle \leadsto \ \ \) | \(\displaystyle x^2 - \paren {a_x + b_x} x + a_x b_x + a_y b_y\) | \(=\) | \(\displaystyle 0\) | simplifying | |||||||||

\(\displaystyle \leadsto \ \ \) | \(\displaystyle x\) | \(=\) | \(\displaystyle \dfrac {a_x + b_x \pm \sqrt {\paren {a_x + b_x}^2 - 4 \paren {a_x b_x + a_y b_y} } } 2\) | Quadratic Formula | |||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle \dfrac {a_x + b_x \pm \sqrt {a_x^2 + b_x^2 + 2 a_x b_x - 4 a_x b_x - 4 a_y b_y} } 2\) | |||||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle \dfrac {a_x + b_x \pm \sqrt {a_x^2 + b_x^2 - 2 a_x b_x - 4 a_y b_y} } 2\) |

$\blacksquare$

## Examples

### Example: $a = 1 - 3 i, b = -3 + 4 i$

Let $a = 1 - 3 i, b = -3 + 4 i$.

The point $X$ on the positive half of the real axis is at:

- $x = 3$