Question 379853
<pre>
We draw the triangle:

{{{drawing(400,2800/13,-5,21,-1,13, graph(400,2800/13,-5,21,-1,13),
locate(-4.4,1.3,"A(0,0)"), locate(12,7,"B(12,6)"), locate(18,1.3,"C(18,0)"),
line(0,0,12,6), line(12,6,18,0),line(18,0,0,0) )}}}

The orthocenter is where all three of the extended altitudes intersect.

We draw the altitude from B to AC

{{{drawing(400,2800/13,-5,21,-1,13, graph(400,2800/13,-5,21,-1,13),
locate(-4.4,1.3,"A(0,0)"), locate(12,7,"B(12,6)"), locate(18,1.3,"C(18,0)"),
line(0,0,12,6), line(12,6,18,0),line(18,0,0,0),
green(line(12,6,12,0))
 )}}}



Since it's vertical and goes through B(12,6) its equation is 

x = 12

Now we draw another altitude from A to BC. but to do that we have to first
extend BC.

{{{drawing(400,2800/13,-5,21,-1,13, graph(400,2800/13,-5,21,-1,13),
locate(-4.4,1.3,"A(0,0)"), locate(12,7,"B(12,6)"), locate(18,1.3,"C(18,0)"),
line(0,0,12,6), line(12,6,18,0),line(18,0,0,0), line(12,6,0,18),
green(line(12,6,12,0))
 )}}}

{{{drawing(400,2800/13,-5,21,-1,13, graph(400,2800/13,-5,21,-1,13),
locate(-4.4,1.3,"A(0,0)"), locate(12,7,"B(12,6)"), locate(18,1.3,"C(18,0)"),
line(0,0,12,6), line(12,6,18,0),line(18,0,0,0), line(12,6,0,18),
green(line(12,6,12,0)),red(line(0,0,9,9))
 )}}}

To find the equation of this second (red) altitude, we need to know its slope.
It is perpendicular to BC.  So first we find the slope of BC:
A(0,0) B(12,6) C(18,0)

{{{m = (y[2]-y[1])/(x[2]-x[1]) = (0-6)/(18-12)=-6/6=-1}}}

So the slope of the red altitude is the opposite-signed reciprocal of
the slope of BC.  The opposite signed reciprocal of -1 is {{{-1/(-1)=""+1}}}.

Since it goes through the origin, its y-intercept is b=0 and so its
equation is 

y = 1x + 0 

or

y = x

To show where the green altitude intersects the red altitude,
we must extend both of them:

{{{drawing(400,2800/13,-5,21,-1,13, graph(400,2800/13,-5,21,-1,13),
locate(-4.4,1.3,"A(0,0)"), locate(12,7,"B(12,6)"), locate(18,1.3,"C(18,0)"),
line(0,0,12,6), line(12,6,18,0),line(18,0,0,0), line(12,6,0,18),
green(line(12,20,12,0)),red(line(0,0,15,15))
 )}}}
  
We just need to find the point where the red altitude and the 
green altitude intersect, for that is the orthocenter.

We solve the easy system:

{{{system(x=12,y=x)}}}

That has the solution (12,12),

so the orthocenter is O(12,12)

{{{drawing(400,2800/13,-5,21,-1,13, graph(400,2800/13,-5,21,-1,13),
locate(-4.4,1.3,"A(0,0)"), locate(12,7,"B(12,6)"), locate(18,1.3,"C(18,0)"),
line(0,0,12,6), line(12,6,18,0),line(18,0,0,0), line(12,6,0,18),
green(line(12,20,12,0)),red(line(0,0,15,15)), locate(12,12,"O(12,12)")
 )}}}

We didn't need the third altitude. If we were to draw it we 
would find that it would also go through the orthocenter:

Edwin</pre>