Question 127639
If we plot the points and connect them, we get this triangle:


{{{drawing(500,500,-10,10,-10,10,
graph(500,500,-10,10,-10,10,0),
circle(4,5,0.08),
circle(4,5,0.1),
circle(4,5,0.12),
circle(-4,1,0.08),
circle(-4,1,0.1),
circle(-4,1,0.12),
circle(2,-5,0.08),
circle(2,-5,0.1),
circle(2,-5,0.12),
line(4,5,-4,1),
line(-4,1,2,-5),
line(2,-5,4,5),
locate(4,5,A),
locate(-4.2,1,B),
locate(2,-5,C)

)}}}


Let point 
A=(xA,yA)
B=(xB,yB)
C=(xC,yC)




-------------------------------

Let's find the equation of the segment AB



Start with the general formula


{{{y=((yA-yB)/(xA-xB))(x-xA)+yA}}}



Plug in the given points


{{{y=(( 5- 1)/(4+4))(x-4)+ 5}}}



Simplify and combine like terms


{{{y=(1/2)x+3}}}



So the equation of the line through AB is {{{y=(1/2)x+3}}}



-------------------------------

Let's find the equation of the segment BC



Start with the general formula


{{{y=((yB-yC)/(xB-xC))(x-xB)+yB}}}



Plug in the given points


{{{y=(( 1+5)/(-4-2))(x+4)+ 1}}}



Simplify and combine like terms


{{{y=-x-3}}}



So the equation of the line through BC is {{{y=-x-3}}}





-------------------------------

Let's find the equation of the segment CA



Start with the general formula


{{{y=((yC-yA)/(xC-xA))(x-xC)+yC}}}



Plug in the given points


{{{y=(( -5- 5)/(2-4))(x-2)+ -5}}}



Simplify and combine like terms


{{{y=5x-15}}}



So the equation of the line through CA is {{{y=5x-15}}}





So we have these equations of the lines that make up the triangle



{{{drawing(500,500,-10,10,-10,10,
graph(500,500,-10,10,-10,10,0),
circle(4,5,0.08),
circle(4,5,0.1),
circle(4,5,0.12),
circle(-4,1,0.08),
circle(-4,1,0.1),
circle(-4,1,0.12),
circle(2,-5,0.08),
circle(2,-5,0.1),
circle(2,-5,0.12),
line(4,5,-4,1),
line(-4,1,2,-5),
line(2,-5,4,5),
locate(4,5,A),
locate(-4.2,1,B),
locate(2,-5,C),
locate(-4.1,4,y=(1/2)x+3),
locate(3.5,1,y=5x-15)
locate(-3.9,-2.2,y=-x-3)

)}}}



So to find the equation of the line that is perpendicular to {{{y=(1/2)x+3}}} that goes through the point C(2,-5), simply negate and invert the slope {{{1/2}}} to get {{{-2/1=-2}}}


Now plug the slope and the point (2,-5) into {{{y-y[1]=m(x-x[1])}}}



{{{y-(-5)=-2(x-2)}}}


{{{y=-2x-1}}} Solve for y and simplify


So the altitude for vertex C is {{{y=-2x-1}}}




Now to find the equation of the line that is perpendicular to {{{y=-x-3}}} that goes through the point A(4,5), simply negate and invert the slope {{{-1/1}}} to get {{{-(-1/1)=1}}}


Now plug the slope and the point (2,-5) into {{{y-y[1]=m(x-x[1])}}}



{{{y-5=1(x-4)}}}


{{{y=x+1}}} Solve for y and simplify


So the altitude for vertex A is {{{y=x+1}}}





Now to find the equation of the line that is perpendicular to {{{y=5x-15}}} that goes through the point B(-4,1), simply negate and invert the slope {{{5/1}}} to get {{{-(1/5)=-1/5}}}


Now plug the slope and the point (-4,1) into {{{y-y[1]=m(x-x[1])}}}



{{{y-1=-(1/5)(x+4)}}}


{{{y=-(1/5)x+1/5}}} Solve for y and simplify


So the altitude for vertex B is {{{y=-(1/5)x+1/5}}}




------------------------------------------------------------

Now let's solve the system 


{{{y=-2x-1}}}
{{{y=x+1}}}


{{{x+1=-2x-1}}} Plug in {{{y=x+1}}} into the first equation


{{{3x=-2}}} Add 2x to both sides and subtract 2 from both sides


{{{x=-2/3}}} Divide both sides by 3 to isolate x



Now plug this into {{{y=x+1}}}


{{{y=-2/3+1}}}


{{{y=1/3}}}




So the orthocenter is (-2/3,1/3)


So if we plug in {{{x=-2/3}}} into the third equation {{{y=-(1/5)x+1/5}}}, we get



{{{y=-(1/5)(-2/3)+1/5}}}



{{{y=2/15+1/5}}}



{{{y=3/15}}}


{{{y=1/3}}}


So the orthocenter lies on the third altitude





-----------------------------------

Summary:


So the equations of the altidudes are:

{{{y=-2x-1}}}, {{{y=x+1}}} and {{{y=-(1/5)+1/5}}}