Perpendicular distance of a point from a line in complex plane

complex numberscontest-mathcoordinate systemsgeometry

Let a line be $\bar az+a\bar z+b=0$, where $a$ is a fixed complex number and $b$ is a fixed real number.

We need to find the distance of $p+iq$ from the given line.

I am converting the given line into Cartesian form.

Let $a=a_1+ia_2$ and $z=x+iy$
Therefore, $(a_1-ia_2)(x+iy)+(a_1+ia_2)(x-iy)+b=0$

Thus, $a_1x+ia_1y-ia_2x+a_2y+a_1x-ia_1y+ia_2x+a_2y+b=0$

So, I am getting $2a_1x+2a_2y+b=0$

Thus, the perpendicular distance of $(p,q)$ is $\frac{2a_1p+2a_2q+b}{\sqrt{(2a_1)^2+(2a_2)^2}}$

Is this correct?

Edit:

Find the perpendicular distance of line $(1-i)z+(1+i)\bar z+3=0$, from $(3+2i)$

By using the above Cartesian form, I am getting $\frac{13}{2\sqrt2}$

But the answer given in the book is $\frac{13}2$

Also, on sarthaks website, they have used a formula. I wonder what the proof for that is.

Edit$2$:

Seems like sarthaks website used the formula $\frac{\bar az_1+a\bar{z_1}+b}{\sqrt{|a|+|\bar a|}}$, where $z_1$ is the point whose distance is to be found.

This formula is incorrect, right?

Maybe in the formula, in the denominator, we can remove the square root and just keep $|a|+|\bar a|?$

Best Answer

Your formula is almost right.

As Arthur said, the perpendicular distance from $p+qi$ to the line $\bar az+a\bar z+b=0$ with complex variable $z$ where $p,q,a_1,a_2,b$ are real and $a=a_1+a_2i$ should be $$\frac{|a_1p+a_2q+\frac b2|}{\sqrt{{a_1}^2+{a_2}^{2}}}.$$

The answer given by SudhirMandal is wrong

In particular, the perpendicular distance from $3+2i$ to the line $(1-i)z+(1+i)\bar z+3=0$ is $\frac{13}{2\sqrt2}$, as given in the question. It is the distance between $3+2i$ to $z_0=\frac{-1}4+\frac{-5}4i$, which is a point on the given line. $$|(3+2i)-z_0|=\left|\frac{13}4+\frac{13}4i\right|=\frac{13}{2\sqrt2}.$$

Since $\frac{13}{2\sqrt2}<\frac{13}2$, the wanted perpendicular distance cannot be $\frac{13}2$ since the perpendicular distance is the smallest distance between the given point $3+2i$ and a point on the given line. Hence the answer given on sarthaks.com referred to in the question is wrong.

I do not think there is a reasonable definition of "the perpendicular distance" with which that answer, $\frac{13}2$ can be correct. Apparently, the author of that answer, mistook the distance formula of real variables for the current case of complex variables (with conjugates).

By reverse-engineering, the author was using the following formula $$\left|\frac{cz+a\bar z+b}{\sqrt{|c|^2 + |a|^2}}\right|$$ which is not correct even in the case when $c=\bar a$ and $b$ is real. For example, let the given line be $z+\bar z=0$, which represents all imaginary numbers and $0$. So $c=a=1, b=0$. The (perpendicular) distance from $3$ to the line is $3$, attained as the distance from $3$ to $0$. However, that formula yields $\frac{|1\cdot3+1\cdot3+0|}{\sqrt{1^2+1^2}}=\frac3{\sqrt2}$. That formula will yield wrong result still if the denominator $\sqrt{|c|^2 + |a|^2}$ is replaced with $\sqrt{|a|+|c|}$ or $|a|+|c|$.

Related Question