How to find the point of intersection of two lines, given four points, two of which are on each line, in complex numbers?
Thank you!
How to find the point of intersection of two lines, given four points, two of which are on each line, in complex numbers?
Thank you!
Copyright © 2021 JogjaFile Inc.
Assume $z_1\not=z_2$ and $z_3\not=z_4$.
The condition that $z$ is on the line which passes through two points $z_1,z_2$ is $$\frac{z-z_1}{z_2-z_1}=\overline{\left(\frac{z-z_1}{z_2-z_1}\right)},$$ i.e. $$(z-z_1)(\overline{z_2}-\overline{z_1})=(z_2-z_1)(\overline{z}-\overline{z_1}),$$ i.e. $$(\overline{z_2}-\overline{z_1})z-(z_2-z_1)\overline{z}=\overline{z_2}z_1-z_2\overline{z_1}\tag1$$ Similarly, the condition that $z$ is on the line which passes through two points $z_3,z_4$ is $$(\overline{z_4}-\overline{z_3})z-(z_4-z_3)\overline{z}=\overline{z_4}z_3-z_4\overline{z_3}\tag2$$
Multiplying the both sides of $(1)$ by $(z_4-z_3)$ gives $$(z_4-z_3)(\overline{z_2}-\overline{z_1})z-(z_4-z_3)(z_2-z_1)\overline{z}=(\overline{z_2}z_1-z_2\overline{z_1})(z_4-z_3)\tag3$$ Multiplying the both sides of $(2)$ by $(z_2-z_1)$ gives $$(z_2-z_1)(\overline{z_4}-\overline{z_3})z-(z_4-z_3)(z_2-z_1)\overline{z}=(\overline{z_4}z_3-z_4\overline{z_3})(z_2-z_1)\tag4$$
Now $(3)-(4)$ gives $$(z_4-z_3)(\overline{z_2}-\overline{z_1})z-(z_2-z_1)(\overline{z_4}-\overline{z_3})z$$$$=(\overline{z_2}z_1-z_2\overline{z_1})(z_4-z_3)-(\overline{z_4}-z_3-z_4\overline{z_3})(z_2-z_1),$$ i.e. $$z=\frac{(\overline{z_2}z_1-z_2\overline{z_1})(z_4-z_3)-(\overline{z_4}z_3-z_4\overline{z_3})(z_2-z_1)}{(\overline{z_2}-\overline{z_1})(z_4-z_3)-(\overline{z_4}-\overline{z_3})(z_2-z_1)},$$ or $$z=\frac{\Im(\overline{z_2}z_1)(z_4-z_3)-\Im(\overline{z_4}z_3)(z_2-z_1)}{\Im(\overline{z_2-z_1}(z_4-z_3))}.$$ Note that if $\Im(\overline{z_2-z_1}(z_4-z_3))=0$, then the line through $z_1,z_2$ is parallel to the line through $z_3,z_4$.