A line is associated with a point and a vector, so let's derive the vector from the line equation:
Let λ=x/2=(y+5/2)/3=z+½.
Therefore x=2λ, y=-5/2+3λ, z=-½+λ.
The line vector is <2,3,1> and the point is R(0,-5/2,-½). If O(0,0,0) is the origin then <0,-5/2,-½> is the position vector OR.
[Explanation: Assume that the line vector and point are correct. If Q(x,y,z) is a general point on the line, then:
OQ=<x,y,z> is the position vector for Q, and RQ=OQ-OR=<x,y+5/2,z+½>.
If the direction of RQ is a scalar multiple (λ) of <2,3,1>=<2λ,3λ,λ>, representing a line parallel to RQ then:
<x,y+5/2,z+½>=<2λ,3λ,λ>, hence:
x=2λ, y+5/2=3λ, z+½=λ. We can express λ in terms of x, y and z, which gives us the specified line equation, confirming the assumption.]
The line can be represented by adding OR to scalar multiples of the line vector:
<0,-5/2,-½>+λ<2,3,1>=<2λ,3λ-5/2,λ-½>. A segment of any length of this line can be represented just by assigning any scalar value to λ.
Somewhere along this line is the point N which is perpendicular to P. The normal position vector OP is <2,2,1>. We need to find λ such that the dot product (ON-OP).<2,3,1>=0.
ON-OP=<2λ,3λ-5/2,λ-½>-<2,2,1>=<2λ-2,3λ-9/2,λ-3/2>,
<2λ-2,3λ-9/2,λ-3/2>.<2,3,1>=0,
4λ-4+9λ-27/2+λ-3/2=0, 14λ=19, λ=19/14.
x=2λ=19/7, y=-5/2+3λ=11/7, z=-½+λ=6/7.
So the distance between N(19/7,11/7,6/7) and P(2,2,1) is √{(19/7-2)2+(11/7-2)2+(6/7-1)2}=0.8452 approx.