triangle KLM has vertices K(0,0), L(18,0), and M(6,12).

a. Write equations for the altitudes to the three sides of the triangle.

b. Show that the altitudes intersect at a single point O, called the orthocenter of the triangle.

Given:

K(0,0), L(18,0), M(6,12)
To find:
Equations of sides of triangle KLM.
Equations of altitudes of the triangle, namely KK1, LL1, MM1, where K1, L1 and M1 are the intersection of the altitudes of the points K,L,M and the opposite side.
Prove that the three altitudes meet at a single point at the orthocentre.

Equation of a line passing through one point A and perpendicular to a line passing through points B and C is:
(y-ya)(xc-xb)+(x-xa)(yc-yb)=0
Substituting in turn points K, L and M for A,B and C, the equations of the altitudes are:
KK1 : y=x
LL1 : y=9-x/2
MM1 : x=6
The line MM1 is a line parallel to the y-Axis.
Substitute x=6 into the other equations, we get, for the intersection point:
with LL1: y=9-6/2=6, thus (6,6)
with KK1: y=x, thus (6,6)
Therefore the orthocentre is at (6,6).

To find the equations for the altitudes, we first need to find the equations of the three sides of the triangle.

Given that the vertices of triangle KLM are K(0,0), L(18,0), and M(6,12), we can find the equations of the sides using the slope-intercept form of a line (y = mx + b).

1. Equation for side KL:
The slope of KL can be calculated using the formula:
m = (y2 - y1) / (x2 - x1)

Slope of KL = (0 - 0) / (18 - 0) = 0 / 18 = 0 (horizontal line)

Since the y-coordinate of all the points on side KL is always 0, the equation for side KL is simply y = 0.

2. Equation for side LM:
Slope of LM = (12 - 0) / (6 - 0) = 12 / 6 = 2

To find the y-intercept (b) of the line, we substitute the coordinates of a point on the line (e.g., M(6,12)) into the slope-intercept form:

y = mx + b
12 = 2(6) + b
12 = 12 + b
b = 12 - 12
b = 0

Therefore, the equation for side LM is: y = 2x + 0 = 2x.

3. Equation for side MK:
To find the slope of MK, we can again use the slope formula:
m = (y2 - y1) / (x2 - x1)

Slope of MK = (12 - 0) / (6 - 0) = 12 / 6 = 2

To find the y-intercept (b), we substitute the coordinates of a point on the line (e.g., M(6,12)) and use the slope-intercept form:

y = mx + b
12 = 2(6) + b
12 = 12 + b
b = 12 - 12
b = 0

Therefore, the equation for side MK is: y = 2x + 0 = 2x.

Now let's find the equations of the altitudes.

a. Equation for altitude AD:
To find the equation for altitude AD, we need to find the slope of KL's perpendicular line and use one of the points on KL, e.g., K(0,0).

The slope of KL's perpendicular line is the negative reciprocal (opposite sign and reciprocal value) of the slope of KL, which is undefined (vertical line). Therefore, the slope of AD is 0.

Using the point-slope form of a line, we can find the equation of AD:

y - y1 = m(x - x1)
y - 0 = 0(x - 0)
y = 0

Therefore, the equation for altitude AD is: y = 0.

b. Equation for altitude BE:
To find the equation for altitude BE, we need to find the slope of LM's perpendicular line and use one of the points on LM, e.g., L(18,0).

The slope of LM is 2, so the slope of BE's perpendicular line is the negative reciprocal of 2, which is -1/2.

Using the point-slope form, we have:

y - y1 = m(x - x1)
y - 0 = -(1/2)(x - 18)
y = -(1/2)x + 9

Therefore, the equation for altitude BE is: y = -(1/2)x + 9.

c. Equation for altitude CF:
To find the equation for altitude CF, we need to find the slope of MK's perpendicular line and use one of the points on MK, e.g., M(6,12).

The slope of MK is 2, so the slope of CF's perpendicular line is the negative reciprocal of 2, which is -1/2.

Using the point-slope form, we have:

y - y1 = m(x - x1)
y - 12 = -(1/2)(x - 6)
y - 12 = -(1/2)x + 3
y = -(1/2)x + 15

Therefore, the equation for altitude CF is: y = -(1/2)x + 15.

b. Showing that the altitudes intersect at a single point O (orthocenter):
To prove that the altitudes intersect at a single point O, we can find the point of intersection of any two altitudes and verify that it also lies on the third altitude.

Let's find the intersection point of altitudes AD and BE.

We have the equations:
y = 0 (Equation for altitude AD)
y = -(1/2)x + 9 (Equation for altitude BE)

To find the point of intersection, we equate the two equations:

0 = -(1/2)x + 9

-9 = -(1/2)x

x = 18

Using x = 18 in the equation for altitude AD:
y = 0

Therefore, the point of intersection is (18,0).

Now, let's check if point (18,0) also lies on altitude CF.

Using the equation for altitude CF:
y = -(1/2)x + 15

Substituting x = 18 and y = 0:
0 = -(1/2)(18) + 15

0 = -9 + 15

0 = 6

Since the equation does not hold true (0 ≠ 6), point (18,0) does not lie on altitude CF.

Therefore, the altitudes do not intersect at a single point, and the triangle does not have an orthocenter.