Let M be the foot of the perpendicular drawn from the point A (1,2,1) to the line joining P (1,4,6) and Q (5,4,4) .
Equation of a line passing through the points (x1,y1,z1)and(x2,y2,z2) is
x−x1x2−x1=y−y1y2−y1=z−z1z2−z1
Equation of the required line passing through P (1, 4, 6) and Q( 5, 4, 4) is
x−14=y−40=z−6−2=λx=4λ+1;y=4;z=−2λ+6
Coordinates of M are (4λ+1,4,−2λ+6).........(1)
The direction ratios of AM are
4λ+1−1,4−2,−2λ+6−1i.e.4λ,2,−2λ+5
The direction ratios of given line are 4,0,-2
Since AM is perpendicular to the given line
∴4(4λ)+0(2)+(−2)(−2λ+5)=0∴λ=12
Putting λ=12 in (i), the coordinates of M are (3,4,5)
Length of perpendicular from A on the given line
AM=√(3−1)2+(4−2)2+(5−1)2=√24units
The coordinates of M i.e the foot of the perpendicular =(3,4,5)