The direction numbers of the line considering the two points on the line is:
e = [−4 − 2 , 2 − 0 , 3 − (−1)] = (−6 , 2 , 4)
The line in parametric form is written as:
L: x = 2 − 6t y = 2t z = −1 + 4t.
Next, chose an arbitrary point on the line, by letting t = 0 or any other value for t, the point on the line will be: (2 , 0 , −1)
The vector connecting the given point with the point on the line is PQ.
PQ = (1 − 2 , −3 − 0 , 6 + 1) = (−1, −3 , 7)
The perpendicular vector to line PQ and the given line is the cross product:

The length of this vector is the modulus:

The modulus of the direction numbers is:

And the length of the shortest line between the point and the given line is:

To find the intersection point, we use the fact that vector PQ' should be perpendicular to the line, hence the dot product of
the direction numbers of the line e and the vector PQ defined with the value t, results is 0.
PQ' = (2 − 6t − 1 , 2t +3 , −1 + 4t − 6 = (1 − 6t , 3 + 2t , 4t − 7)
PQ' . e = (1 − 6t , 3 + 2t , 4t − 7) (− 6 , 2 , 4) = −6 + 36t + 6 + 4t 16t = 0
56 t − 28 = 0 -> t = 0.5
And the intersection point is:
(x = 2 − 4 ∙ 0.5 y = 2 ∙ 0.5 z = −1 + 4 ∙ 0.5) = (−1, 1 , 1)