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}$)

Consider the vector $\vec{PA}=(-2,-2,-6)$ and the vector that gives the direction of the line $\vec{v}=(1,-1,2).$ These two vectors form a parallelogram and the height of this parallelogram is the distance between the point and the line (since distance is realized in the direction perperdicular to the line through $A$). Now, to get the height of the parallelogram we divide its area by the basis, that is 
$$\frac{|\vec{PA}\times \vec{v}|}{|\vec{v}|}.$$
You compute 
$$\vec{PA}\times \vec{v}=\left|\begin{array}{ccc} \vec{i} & \vec{j} & \vec{k}\\ -2 &  -2 & - 6\\ 1 & -1 & 2\end{array}\right|,$$ get its module, divide by the module of $\vec{v}$ and you have the desired solution.
