The slope of line ABAB is (4-9)/(1-2)=(-5)/(-1)=54−91−2=−5−1=5 and equation of ABAB is (y-4)=5(x-1)(y−4)=5(x−1)
i.e. 5x-y=15x−y=1 ................................(1)
Hence if CD_|_ABCD⊥AB, with DD on ABAB, slope of CDCD will be (-1)/5=-1/5−15=−15
and equation of CDCD is (y-5)=-1/5(x-6)(y−5)=−15(x−6)
or 5y-25=-x+65y−25=−x+6 i.e. x+5y=31x+5y=31 ................................(2)
Solving (1) and (2) gives us the coordinates of DD. For tis putting y=5x-1y=5x−1 from (1) in (2) gives
x+25x-5=31x+25x−5=31 or 26x=3626x=36 i.e. x=36/26=18/13x=3626=1813
and hence y=5xx18/13-1=77/13y=5×1813−1=7713
and coordinated of DD are (18/13,77/13)(1813,7713)
and CD=sqrt((6-18/13)^2+(5-77/13)^2)CD=√(6−1813)2+(5−7713)2
= sqrt((60/13)^2+(-12/13)^2)√(6013)2+(−1213)2
= 1/13sqrt(3600+144)=sqrt3744/13=61.188/13=4.707113√3600+144=√374413=61.18813=4.707