Calculate the distance from a point to a line Por favor, alguém me ajude com essa questão de Geometria:


Please, can someone help me with this geometry question?
Given the point $A(3,4,-2)$ and the line $$r:\left\{\begin{array}{l} x = 1 + t \\ y = 2 - t \\ z = 4 + 2t \end{array} \right.$$
compute the distance from $A$ to $r$. (Answer: $\sqrt{20}$)

Let $P(t)$ is a point of the line, $\vec v$ a direction of a line. Take $\vec{AP}$ and request it be normal to $\vec v$: $$\vec{AP} \cdot \vec v = 0.$$ Solve it for $t$, substitute the $t$ to $P(t)$ and calculate $AP = |\vec{AP}|.$ Done.
