

Let us take an example.
Find the orthocenter of the triangle having coordinates are: A (3, 1) B(2, 2) C (3, 5)
Step 1: Find equations of the line segments AB and BC.
To find any line segment, you will need to find the slope of the line and then the corresponding y-intercept.
So, Slope of AB = (1-2)/(3-2) = -1/1 = -1
y = mx + b (substitute m = -1, x = 3, y = 1)
1 = -1*3 + b
=> 1 = -3 + b
=> b = 4
Now, Equation of AB: y = -1*x + 4
=> y = -x + 4
Slope of BC = (2-5)/(2-3) = -3/-1 = 3
y = mx + b (substitute m = 3, x = 2, y = 2)
2 = 3*2 + b
=> 2 = 6 + b
=> b = 2 - 6
=> b = -4
Equation of BC: y = 3x - 4
Step 2: Find the slope of the corresponding perpendicular lines
Slope of AB = -1
Slope of perpendicular line to AB: -1*m = -1
=> m = 1
Slope of BC = 3
Slope of perpendicular line to BC: 3*m = -1
=> m = -1/3
Step 3: Find the equation of the perpendicular lines
Slope of perpendicular line to AB: m = 1
We will use the coordinate of the opposite vertex (point C) to find the equation of the line.
y = mx + b (substitute m = 1, x = 3, y = 5)
5 = 1*3 + b
=> 5 = 3 + b
=> b = 5 - 3
=> b = 2
Equation of perpendicular line to AB: y = 1*x + 2
=> y = x + 2
Slope of perpendicular line to BC: m = -1/3
We will use the coordinate of the opposite vertex (point A) to find the equation of the line.
y = mx + b (substitute m = -1/3, x = 3, y = 1)
1 = -1/3*(3) + b
=> 1 = -1 + b
=> b = 2
Equation of perpendicular line to AB: y = -x/3 + 2
Step 4: solve 2 perpendicular lines
equation 1: y = x + 2
equation 2: y = -x/3 + 2
Solving for x and y:
x + 2 = -x/3 + 2
=> x + x/3 = 2 - 2
=> 4x/3 = 0
=> x = 0
Now, y = 1*0 + 2
=> y = 2
Now, the coordinates are (0, 2)
This is the orthocenter of the triangle.
