I'm a newbie with Mathematica and I managed to draw a line and a point in 3D on a graph
Q = Graphics3D[Point[{50, 10, 25}]]; line = ParametricPlot3D[{5 + t, 5 + t, 5 + t}, {t, 0, 100}]; Show[Q, line] not sure if I wrote the parametric line command correctly (I wanted to draw a $P(t) = P + Vt$ parametric line where $P$ is the starting point (5;5;5) and $V$ a unit vector (1;1;1)).
Now I would like to calculate the distance between the point Q and the line. I know how to do this in linear algebra ($d = ||(Q-P)-\frac{(Q-P)\cdot V}{||v||^2} V||$), but I'm unsure on how to do this. Is there a pre-defined function in mathematica to get the distance from a point to a line?


RegionDistance$\endgroup${5, 5, 5} + t {1, 1, 1}. See also this Q&A -- there are many ways to approach this problem, and many functions one might use (Norm,EuclideanDistance,Dot,Projection,...). $\endgroup$