# Is there a relationship for a triangle's side lengths, altitude/height, and acute/obtuse/right?

I have 3 arbitrary points in a 2D plane. I like to call them x1, y1, x2, y2, x3, y3 just to make it easier to enter into a computer program.

These points are arbitrary. They will define a triangle, but the triangle could be acute or obtuse, and it could be right or non-right. The goal is to figure out what kind it is in each of those categories. So there are 3 possibilities: acute non-right, acute right, and obtuse non-right. There is no such thing as an obtuse right triangle so I guess that simplifies things a bit.

First of all, what I like to do is take the length from x1,y1 to x2,y2 and call that the base (B). Then find the height (or altitude) relative to that base. Otherwise there are 3 heights/altitudes we could choose. The reason I do this is to make things independent of angles or which way the triangle is rotated.

I find the height by first getting the area using Heron's Formula, then doing this:

$A = \displaystyle \frac{BH}{2}$

$2A = BH$

$\displaystyle \frac{2A}{B} = H$

So now I know 4 values: the lengths of the 3 sides, and the height. Can I determine the category of triangle just with this information?

I drew this picture to help. Each one of these triangles has the same base and height.

I would rather not compute angles using the law of sines, cosines, or tangents. I would have to do that for all 3 angles and then check all three to see if they're 90, less than 90, or greater than 90 degrees. It seems there should be some clever way to compare side lengths and heights and determine the type of triangle. Is this possible?

Don't need the height. Pythagoras (assuming $c$ is the longest side):

if $c^2 = a^2 + b^2$, then it is right;

if $c^2 < a^2 + b^2$, then it is acute (or what you call acute non-right);

if $c^2 > a^2 + b^2$, then it is obtuse.

EDIT: Side note: your desire to avoid the law of cosines is holding you back here. It is a common misconception that that would be tedious. it isn't, for two reasons:

• You only need to know whether an angle is acute, or right, or obtuse, and for that it is only necessary to know if its cosine is positive, negative, or zero. No need to compute its actual value, or use inverse cos to find the angle in degrees or radians.

• You don't need to deal with all three angles. The largest one will do: if a triangle has a right/obtuse angle, it is certainly the largest of all three. And another often underused property is that in any triangle, larger angle means longer side across from it. So the largest angle is the one across from the longest side (which is why you have to make sure the longest side is on the left in the equations/inequalities above).

So in fact, it is the law of cosines that is the most efficient way, as summed up in the beginning.

• Now that I think about it, Pythagoream Theorem is proven for right triangles, but it does not necessarily mean that a non-right triangle cannot have $c^2 = a^2 + b^2$. In other words, it does not necessarily mean "if and only if". Can you show that no non-right triangles exist that have $c^2 = a^2 + b^2$? – DrZ214 Sep 30 '17 at 16:25
• Strictly speaking, Pythagorean theorem is only the equality above, yes. The rest is really an application of the cosine rule to the angle across from side $c$. But you don't need the actual angle, or even it's cosine, just to know if it's obtuse or acute or right, meaning the cosine is negative, or positive, or zero, respectively. – Nick Pavlov Sep 30 '17 at 17:05
• And yes, that does mean I can show that the equality holds only for right triangles. If it holds, the cosine rule tells me that $\cos C = 0$ which means that $C$ is a right angle. – Nick Pavlov Sep 30 '17 at 17:08