Distance between point and line in the complex plane

2.7k Views Asked by At

Let $a,b$ be fixed complex numbers and let $L$ be the line $$L=\{a+bt:t\in\Bbb R\}.$$ Let $w\in\Bbb C\setminus L$. Let's calculate $$d(w,L)=\inf\{|w-z|:z\in L\}=\inf_{t\in\Bbb R}|w-(a+bt)|.$$ The first observation is $$d(w,L)=\inf_{t\in\Bbb R}|w-(a+bt)|=\inf_{t\in\Bbb R}|(w-a)-bt|=d(w-a,L-a).$$ So without loss of generality we can assume that $a=0$, so $$L=b\Bbb R.$$ And then, let's assume that $|b|=1$.

Assume $$b=x+iy,\qquad x,y\in\Bbb R,$$ and let $$b'=y-ix.$$ so that $b'\bar{b}$ is purely imaginary and $|b'|=|b|=1$.

Consider the line $$L'=w+b'\Bbb R.$$ Then $L$ and $L'$ are orthogonal and since $w=w+b'\cdot 0$ we get $w\in L'$. Let $w'$ the point in which these lines meet. Let's calculate it $$\begin{align*} w+b's &= bs\\ s &= \frac{w}{b-b'}. \end{align*}$$ so $w'=w+b's$. The distance $d(w,L)$ must be achieved at $w'$ (because $L'$ is the perpendicular line to $L$ through $w$), so $$d(w,L)=|w-w'|=|b's|=1|s|=\left|\frac{w}{b-b'}\right|=\frac{|w|}{|b-b'|}.$$ Let's compute $|b-b'|$ $$|b-b'|^2=|x+iy-(y-ix)|^2=(x-y)^2+(x+y)^2=2|b|^2=2$$ therefore $$d(w,L)=\frac{|w|}{\sqrt{2}}.$$ What I have just proved is equivalent to say that the triangle with vertex $0$, $w$, $w'$ is isosceles rectangle, regardless of the line through the origin and the $w$. Of course this is absurd but,

What is wrong with the above?

3

There are 3 best solutions below

2
On BEST ANSWER

When calculating where the points meet, you set $w+b's=bs$. This a mistake, you should set that $w+b's=bt$ where $s$ does not necessarily equal $t$, but both are real. The point you calculate is a point equidistant from $0$ and $w$ of distance $|s|$ . Because, for example, $$d(w,w+b's) = |b's|=|s|=|bs|=d(0,bs).$$

Note that doing it your original way, $s$ is not necessarily real, so the point may not even lie on either of the lines! (And probably won't!)

Note: To solve $w+b's=bt$, equate real and imaginary parts to get a pair of simultaneous equations to solve.

In addition, doing the problem this way seems a little overcomplicated. Further, you assert that the distance is minimised by connecting $w$ to $L$ perpendicularly, which should be rigorously proven. A much quicker way is to simply calculate $$\inf_{t\in\mathbb{R}}\{|w-bt|\}=\inf_{t\in\mathbb{R}}\{((w_1-xt)^2+(w_2-yt)^2)^\frac12\}$$ which is achieved by finding the value of $t$ minimising the function $$f(t) = (w_1-xt)^2+(w_2-yt)^2,$$ which is a quadratic.

0
On

"$w + b's = bs$" is this your problem? A solution to this doesn't tell you where the lines meet. Because $|b| = |b'| = 1$, you're in fact just finding a point $w'$ that's a distance $s$ away from $w$ (in the direction $b'$) and a distance $s$ away from $0$ (in the direction $b$). No wonder $(0, w, w')$ is isosceles and right-angled!

0
On

$\renewcommand\Im{\operatorname{Im}}\renewcommand\Re{\operatorname{Re}}$ For the sake of completeness, let's finish the derivation of the formula.

I'll follow the notation used in my question.

Let's think in $\Bbb C$ as a real inner product space with inner product $$\langle z,w\rangle=\Re (z\bar{w}).$$

From the fact $\langle z,w\rangle=0$ and that the dimension of $\Bbb C$ as vector space over $\Bbb R$ is 2, it follows that $$L^\perp=b'\Bbb R.$$

Thus $\Bbb C=L^\perp\oplus L$, i.e. there are $s,t$ real numbers such that $$\begin{align*} w &= b's+w'\\ &= b's+bt. \end{align*}$$

Let's calculate the orthogonal projection $w'=bt$ of $w$ over $L$. It is know that $$|w-w'|\leq |w-z|\quad\forall z\in L.$$

Assume $$w=w_1+iw_2\quad w_1,w_2\in\Bbb R.$$

Then, from $$w_1+iw_2=(y-ix)s+(x+iy)t$$ we get the system $$\begin{cases} ys+xt = w_1\\ -xs+yt = w_2 \end{cases}$$ Using Cramer's rule: $$s=\dfrac{\begin{vmatrix} w_1 & x\\ w_2 & y\end{vmatrix}}{\begin{vmatrix} y & x\\ -x & y\end{vmatrix}}=\frac{w_1y-w_2x}{|b|^2}=\frac{w_1y-w_2x}{1}=-\Im (w\bar{b}).$$

Therefore $$w'=w-b's=w+b'\Im (w\bar{b}).$$ So $$d(w,L)=|w-w'|=|-b'\Im (w\bar{b})|=|b'||\Im (w\bar{b})|=|\Im (w\bar{b})|.$$

Now, if we consider $L$ in its general form $L=a+b\Bbb R$, we get $$d(w,L)=\left|\Im \left((w-a)\bar{b}\right)\right|.$$