# How Do You Find the Angles of a Triangle from the Three Sides?

TR Smith is a product designer and former teacher who uses math in her work every day.

A typical problem in geometry is to find the angles of a triangle from the lengths of the three sides. If you have the physical object, you can just use a protractor to measure the angles. But if you are are trying to construct a triangle with three given side lengths, you need compute the angles mathematically using trigonometry.

In special cases where the triangle has a right angle, the formulas for calculating the angles of a triangle are much simpler. Here we explain the general formulas and work out several examples so you can apply these equations to practical and theoretical math applications.

## Formula: cos(C°) = (a² + b² - c²)/(2ab)

Suppose a triangle has side lengths a, b, and c, and angle measures A°, B°, and C°, where the angle A is opposite of the side of length a, the angle B is opposite of the side of length b, and the angle C is opposite of the side of length c. Then then lengths a, b, and c are related by the trig equations

a² = b² + c² - 2bc*cos(A°)
b² = a² + c² - 2ac*cos(B°)
c² = a² + b² - 2ab*cos(C°)

These are equivalent to

a = sqrt[ b² + c² - 2bc*cos(A°) ]
b = sqrt[ a² + c² - 2ac*cos(B°) ]
c = sqrt[ a² + b² - 2ab*cos(C°) ]

In each of these geometry formulas you can solve for the cosines of the angle measures A°, B°, and C°. This gives you the new equations

cos(A°) = (b² + c² - a²)/(2bc)
cos(B°) = (a² + c² - b²)/(2ac)
cos(C°) = (a² + b² - c²)/(2ab)

Finally, taking the inverse cosine (arccos) of both sides of each equation gives you the angle measures A°, B°, and C°.

A° = arccos[(b² + c² - a²)/(2bc)]
B° = arccos[(a² + c² - b²)/(2ac)]
C° = arccos[(a² + b² - c²)/(2ab)]

The mathematical expression arccos(z) means the angle whose cosine is z. You can find the inverse cosine of a number using a scientific calculator, trig table, or inverse trig table. Now we can apply these formulas to a several examples problems where the sides of a triangle are known but the angles are unknown. One important fact is that the sizes of the angles are ordered according to the lengths of the opposing sides, in other words

• The smallest angle is opposite the shortest side.
• The largest angle is opposite the longest side.
• The mid-sized angle is opposite the mid-length side.

## Example 1: Sides Of Length 10, 13, and 20

Suppose the side lengths of a triangle are a = 10, b = 13, and c = 20. Then the measure of angles A, B, C can be computed with the three equations written in bolded text above.

A° = arccos[(13² + 20² - 10²)/(2*13*20)]
= arccos[469/520]
= arccos[0.9091]
= 25.59°

B° = arccos[(10² + 20² - 13²)/(2*10*20)]
= arccos[331/400]
= arccos[0.8275]
= 34.16°

C° = arccos[(10² + 13² - 20²)/(2*10*13)]
= arccos[-131/260]
= arccos[-0.5038]
= 120.25°

As expected, the smallest angle, 25.59°, is opposite the shortest side, of length 10. Likewise, the largest angle, 120.25°, is opposite the longest side, of length 20. You can also check that these angle measures are consistent with well-known properties of triangles, for example, the fact that all three angles must add up to 180°:

5.59 + 34.16 + 120.25 = 180.

## Example 2: An Equilateral Triangle

If all three side lengths of a triangle are equal then we expect the formulas to output angles of 60° for each corner, since an equilateral triangle has equal sides, and equal angles that sum to 180°. Let's see if the formula works for this very basic example. Suppose the sides a, b, and c all have a length of X. Then the set of angle formulas gives us

cos(A°) = (X² + X² - X²)/(2X²) = X²/(2X²) = 1/2
cos(B°) = (X² + X² - X²)/(2X²) = X²/(2X²) = 1/2
cos(C°) = (X² + X² - X²)/(2X²) = X²/(2X²) = 1/2

Since cos(60°) = 1/2, the angles A, B, and C are all 60 degrees, as we expected.

## Example 3: A Right Triangle

A right triangle has one angle equal to 90° which is also the largest angle, and thus opposite the longest side. The longest side of a right triangle is called the hypotenuse and the other two sides are called the legs. If the length of the hypotenuse is c and the lengths of the legs are a and b, then the equation that relates all three sides is

a² + b² = c², or equivalently
c = sqrt(a² + b²)

This formula is called the Pythagorean Theorem, since the Greek mathematician was the first to formally prove that it is true. The formula had been used in antiquity since before Pythagoras's time. Because of the relation among a, b, and c, the angles A, B, and C are found with simpler formulas.

## Pythagorean Triples

Pythagorean triples are sets of integers {a, b, c} that satisfy the relationship a^2 + b^2 = c^2. In primitive Pythagorean triples the three are not all divisible by a common factor. For example {3, 4, 5} is a primitive triple, but {6, 8, 10} is not since you can divide each by 2. Some primitive triples are

{3, 4, 5} • {5, 12, 13} • {8, 15, 17}
{7, 24, 25} • {20, 21, 29} • {12, 35, 37}
{9, 40, 41} • {28, 45, 53} • {11, 60, 61}
{16, 63, 65} • {33, 56, 65} • {48, 55, 73}
{13, 84, 85} • {36, 77, 85} • {39, 80, 89}

C° = arccos[(a² + b² - c²)/(2ab)]
= arccos[(c² - c²)/(2ab)]
= arccos[0]
= 90°

A° = arccos[(b² + c² - a²)/(2bc)]
= arccos[(b² + a² + b² - a²)/(2bc)]
= arccos[(2b²)/(2bc)]
= arccos[b/c]
= arcsin[a/c]
= 90° - B°

B° = arccos[(a² + c² - b²)/(2ac)]
= arccos[(a² + a² + b² - b²)/(2ac)]
= arccos[(2a²)/(2ac)]
= arccos[a/b]
= arcsin[b/c]
= 90° - A°

The formulas always return an angle measure of 90 degrees for C, while the angle measures of A and B can be found with simpler formulas than before. The angles A and B always add up to 90 degrees in an right triangle, so they are called complementary angles.

Example: Find the angles of a triangle with side lengths a = 88, b = 105, and C = 137. First, since

88² + 105²
= 7744 + 11025
= 18769
= 137²

we can see that this is a right triangle with a hypotenuse of length 137 and legs of lengths 88 and 105. Therefore, the angle opposite the hypotenuse is 90 degrees. The angle measures of the other two corners are

A° = arccos[b/c]
= arccos[105/137]
= 39.97°

B° = 90° - 39.97°
= 50.03°

## Example 4: Known Side Length Ratios

You don't need to know the absolute lengths of the sides if you know their relative lengths. For instance, suppose a triangle's longest side is 1.8 times the length of the shortest side, and the mid-length side is 1.65 times the length of the shortest side. Let a = X be the shortest side. Then we can call the three lengths of the triangle

a= X
b = 1.65X
c = 1.8X

Which gives us

a² = X²
b² = 2.7225X²
c² = 3.24X²
2ab = 3.3X²
2ac = 3.6X²
2bc = 5.94X²

If you plug these quantities into the angles formulas for the angle measures of A, B, and C you get

A° = arccos[(2.7225X² + 3.24X² - X²) / 5.94X²]
= arccos[ 4.9625X² / 5.94X² ]
= arccos[ 4.9625 / 5.94 ]
= 33.34°

B° = arccos[(X² + 3.24X² - 2.7225X²) / 3.6X²]
= arccos[ 1.5175X² / 3.6X² ]
= arccos[ 1.5175 / 3.6 ]
= 65.07°

C° = 180° - 33.34° - 65.07°
= 81.59°

The shortest side of the triangle has an opposing angle of 33.34°, the mid-length side has an opposing angle of 65.07°, and the longest side has an opposing angle of 81.59°. If you let X = 100, then these would be the angles of a triangle with side lengths 100, 165, and 180. If you let X = 20, then these would also be the angles of a triangle with side lengths 20, 33, and 36.

## Other Ways to Calculate the Angles

If you don't have a calculator with trig functions or an inverse trig table, you can approximate the angles with these formulas, which can be done with scratch paper, pencil, and a simple four-function calculator.

A° ≈ 90 - 57.6(z + z3/6),
where z = (b² + c² - a²)/(2bc)

B° ≈ 90 - 57.6(z + z3/6),
where z = (a² + c² - b²)/(2ac)

C° ≈ 90 - 57.6(z + z3/6),
where z = (a² + b² - c²)/(2ab)

If a = b = c, the formulas return exactly 60° for the measure of each angle. As an example, let's use these approximation formulas to estimate the angles of a triangle whose side lengths measure 5, 6, and 8. Using a = 5, b = 6, and c = 8, we get

Angle A:
z = (6² + 8² - 5²)/(2*6*8) = 75/96 = 0.78125
z3/6 = (75/96)3/6 ≈ 0.07947
90 - 57.6(0.78125 + 0.07947) = 40.4°

Angle B:
z = (5² + 8² - 6²)/(2*5*8) = 53/80 = 0.662
z3/6 = (53/80)3/6 ≈ 0.04846
90 - 57.6(0.6625 + 0.04846) = 49.0°

Angle C:
z = (5² + 6² - 8²)/(2*5*6) = -3/60 = -0.05
z3/6 = (-3/60)3/6 = -0.00002
90 - 57.6(-0.05 - 0.00002) = 92.9°

As you can see, the estimated angles don't add up to 180 degrees. If you compute the angles with the true formulas, you get A° = 38.6°, B° = 48.5°, and C° = 92.9°. The approximation formula gave overestimates for the smaller angles.

## Two Ways to Compute the Area of a Triangle

Coordinate Method: Calculating the area of a triangle given the three coordinate points of its vertices in the xy-plane.

Heron's Formula: Calculating the area of a triangle using the three side lengths.

#### Can You Find the Angles from the Perimeter?

Knowing only the length of the perimeter of a triangle is not enough to work out all three angles. Many triangles can have the same perimeter but different side lengths and thus different angles.

#### Can You Find the Angles from the Perimeter and Area?

Knowing the length of the perimeter and the area of a triangle is also not enough to determine the three angles. Many triangles can have the same perimeter and area, but different side lengths and angles. For example, the triangle with sides {29, 29, 40} and the triangle with sides {37, 37, 24} both have an area of 420 and a perimeter of 98. But they have different angles.

Triangles with same perimeter and area.

2

10

0

0

66

## Popular

6

0

• ### The Number 9 | The Secret Knowledge of The Ancients Number Nine Code 911

112

0 of 8192 characters used

• Kendal 3 years ago

I have a question/comment. The area of a triangle is equal to (ab*sin(C))/2, and also equal to Heron's formula sqrt(s(s-a)(s-b)(s-c)) where s = (a+b+c)/2. Therefore, you can equate these two formulas for the area and solve for angle C to get

C = sine_inverse[2*sqrt(s(s-a)(s-b)(s-c))/(ab)]

If this inverse sine formula is valid, why is the inverse cosine formula the one that is always presented in geometry textbooks for this problem? I've never seen any reference for this inverse sine formula. Thanks.

• Author

TR Smith 3 years ago from Eastern Europe

Hi Kendal, thanks for the question. The only problem with the arcsin (or inverse sine) formula is that arcsin(z) outputs two valid angle measures between 0 and 180 for any value z in the interval (0, 1). For example, arcsin(1/2) equals both 30 degrees and 150 degrees. So the formula doesn't have a well-defined output.

You could of course use your geometric intuition to figure out which output is the correct one based on the side lengths of the triangle, but then it's so much easier to just use the arccos formula, because arccos(z) outputs a unique angle between 0 and 180.

• Kendal 3 years ago

Thanks for the explanation. I thought it had to do with there being two square roots of a number, negative and positive.