Let P be the point of intersection of altitudes AD and BE.
Since orthocentre is P(x,y).
Slope of line BC=1−(−1)4−2=1 ∴ Slope of ⊥ line AD=−1 ∴ Equation of line AD passing through (5,−2) is y+2=−1(x−5) ⇒x+y−3=0…(i)
Slope of line AC=(1−54+2)=(−46)=−23
Slope of ⊥ line BE=32 ∴ Equation of line BE passing through (−1,2) is y−2=32(x+1) or 3y−6=2x+2
or 2x−3y=−8…(ii)
Solving (i) and (ii),
we get x=51, y=514 ∴ Orthocentre is (51,514).