By choosing the x-axis to be the line AB and the y-axis to be the line OC, we can assume A(a, 0), B(b, 0) and C(0,c) are the vertices of the triangle ABC, as shown in the following diagram.
The gradient of BC is − c/b, so the gradient of the altitude through A is b/c. Thus the equation of the altitude through A is
y = b/c(x − a).
To find the y-intercept of the altitude, take x = 0, which implies y = − ba/c. By swapping a and b, we get − ab/c = − ba/c . So the altitude through B has the same y-intercept. The altitude through C is the y-axis. Thus H = (0,− ab/c) lies on all three altitudes.