# Find the coordinates of the two lines where the distance between them is the shortest.

How can I use the minimum distance between two skew lines to find the exact coordinate where the distance between the two lines is the shortest? Let's say the lines have the equations:

$$g = (1,3,5)^T + b(7, 11, 13), b \in \mathbb{R}$$

$$h = (2,7,5)^T + c(1,2,5), c \in \mathbb{R}$$

I used an online calculator to find the minimum distance to be $$1.615$$, however I'm not sure how I can use to figure out the coordinates where the distance is the shortest. I assume I have to first calculate the values of $$b$$ and $$c$$ where the distance is the shortest and then use that to simply the two equations, which will give me the coordinates - but I don't know how to do that.

• You can minimize $|g-h|^2$ in $b$ and $c$.
– A.Γ.
Nov 30, 2019 at 22:12

It is given by the common perpendicular of the two lines. If \vec u and $\vec v$ are the directing vectors of the lines, a directing vector of the common perpendicular is their cross-product.
You can determine the line passing though a point $$(a,b,c)$$ with directing vector $$\vec u\times\vec v$$ which meets both lines: the compatibility conditions of the resulting equations will yield the values of $$a, b,c$$ and the values of the parameters $$s$$ and $$t$$.