Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I know the vertexes of a triangle and one of them is origin O(0, 0). Then how can I draw altitude from origin to the opposite side of the triangle.

share|cite|improve this question
Hint: You want a line through the origin perpendicular to the line between the other two points. So the product of the two slopes is $-1$. – Henry Jun 15 '11 at 6:06
up vote 2 down vote accepted

If the vertices are $(a,b)$, $(p,q)$, and $(0,0)$, then the altitude from the opposite side to $(0,0)$ will be along the line that is perpendicular to the line joining $(a,b)$ and $(p,q)$.

If $a=p$, then the side is vertical, and the altitude goes from $(0,0)$ to $(a,0)$ (horizontal).

If $a\neq p$, then the side is in the line with slope $$\frac{q-b}{p-a},$$ so you want the line through $(0,0)$ with slope $$m = \frac{a-p}{q-b}.$$ This is the line $y=\left(\frac{a-p}{q-b}\right)x$. The intersection of this line with the line that contains the opposite side, which is $$ y - b = \left(\frac{q-b}{p-a}\right)(x-a)$$ can be found by plugging in $ y = \left(\frac{a-p}{q-b}\right)x$ and solving for $x$.

share|cite|improve this answer

The altitude will pass through the origin and be perpendicular to the opposite side. If you know the three vertices, you can find the slope of the side opposite the origin with the usual slope formula between two points. Then the altitude will have a slope equal to the negative reciprocal of the opposite side, assuming this slope is defined. So the altitude is described completely by its slope and the fact that it must pass through the origin.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.