#A(3,1) , B(6,7) , C(9,8)#
Let #CD# be the altitude going through #C# touches #D# on line
#AB#. #C# and #D# are the endpoints of altitude #CD; CD# is
perpendicular on #AB#. Slope of #AB= m_1= (y_2-y_1)/(x_2-x_1)#
#=(7-1)/(6-3) = 6/3=2 :. # Slope of #CD=m_2= -1/m_1= -1/2 #
Equation of line #AB# is # y - y_1 = m_1(x-x_1) #or
# y- 1 = 2(x-3) or 2x-y = 5 ; (1) #
Equation of line #CD# is # y - y_3 = m_2(x-x_3)# or
#y- 8 = -1/2(x-9) or 2y-16= -x+9 # or
# x+2y=25 ; (2)# Solving equation (1) and (2) we get
the co-ordinates of #D(x_4,y_4)#. Mutiplying equation (2) by #2#
we get #2x+4y=50 ; (3)# Subtracting equation (1) from
equation (3) we get #5y=45 or y=9#
# :. x=(5+9)/2=7 :. D# is # (7,9)#. The end points of altitude
#CD# are #(9,8) and (7,9)# . Length of altitude #CD# is
#CD = sqrt((x_3-x_4)^2+(y_3-y_4)^2) # or
#CD = sqrt((9-7)^2+(8-9)^2)= sqrt5 ~~ 2.24# unit [Ans}