#"We require to find the equations of 2 altitudes and "#
#"solve them simultaneously for orthocentre"#
#"label the vertices"#
#A=(2,2),B=(5,1)" and "C=(4,6)#
#color(blue)"Altitude from vertex C to AB"#
#"calculate slope m using "color(blue)"gradient formula"#
#•color(white)(x)m=(y_2-y_1)/(x_2-x_1)#
#m_(AB)=(1-2)/(5-2)=-1/3#
#m_("altitude")=-1/m=-1/(-1/3)=3#
#"using "m=3" and "(a,b)=(4,6)#
#y-6=3(x-2)larry-b=m(x-a)#
#y-6=3x-6#
#y=3xto(1)#
#color(blue)"Altitude from vertex A to BC"#
#m_(BC)=(6-1)/(4-5)=-5#
#m_("altitude")=-1/(-5)=1/5#
#"using "m=1/5" and "(a,b)=(2,2)#
#y-2=1/5(x-2)#
#y-2=1/5x-2/5larrcolor(blue)"multiply through by 5"#
#5y-10=x-2#
#5y=x+8#
#y=1/5x+8/5to(2)#
#"solving equations "(1)" and "(2)#
#3x=1/5x+8/5rArrx=4/7#
#y=3xx4/7=12/7#
#"orthocentre "=(4/7,12/7)#