Geometry

Law of Sines & Law of Cosines

SOH-CAH-TOA only works for right triangles. For any triangle — acute, right, or obtuse — we need the Law of Sines and the Law of Cosines.

Law of Sines

For any triangle with sides a, b, c opposite angles A, B, C:

0sinA=0sinB=0sinC\frac0{\sin A} = \frac0{\sin B} = \frac0{\sin C}

This means the ratio of each side to the sine of its opposite angle is the same for all three pairs.

Interactive Exploration

Set up a triangle with a known side and two angles. The Law of Sines will find the other sides.

Side a5
210
Angle A (degrees)40
20120
Angle B (degrees)60
20120
a=5,A=40°,B=60°,C=180°40°60°a = 5, \quad A = 40°, \quad B = 60°, \quad C = 180° - 40° - 60°
0sinA=5sin(40°)b=5sin(60°)sin(40°)\frac0{\sin A} = \frac{5}{\sin(40°)} \quad \Rightarrow \quad b = \frac{5 \cdot \sin(60°)}{\sin(40°)}

The graph below shows the triangle. Side a lies along the x-axis. The other two sides rise from the endpoints at angles determined by A and B.

-22468101224681012Side aSide c (from left, angle B)Side b (from right, angle A)
Try This

Try this: Set a = 5, A = 30 degrees, B = 90 degrees. Since B is 90 degrees, the triangle is a right triangle. The Law of Sines still works, but SOH-CAH-TOA would also apply here.

The Sine Ratio Visualized

The Law of Sines says a/sin(A) = b/sin(B). Let’s plot how this ratio changes as you vary angle A. If the Law of Sines holds, the ratio should stay constant when a and A are in the correct relationship.

Side length5
210
1530456075901051201351501651530a / sin(A) ratioDiameter of circumscribed circle
Connection

Fun fact: The common ratio a/sin(A) equals the diameter of the triangle’s circumscribed circle (the circle that passes through all three vertices). That’s why the yellow line shows 2a — for an equilateral triangle the ratio equals the diameter.

Law of Cosines

For any triangle:

c2=a2+b22abcos(C)c^2 = a^2 + b^2 - 2ab\cos(C)

This is a generalization of the Pythagorean theorem. When C = 90 degrees, cos(C) = 0, and we get c^2 = a^2 + b^2.

Interactive Exploration

Set two sides and the included angle. The Law of Cosines computes the third side.

Side a4
18
Side b5
18
Angle C (degrees)60
10170
a=4,b=5,C=60°a = 4, \quad b = 5, \quad C = 60°
c2=42+52245cos(60°)c^2 = 4^2 + 5^2 - 2 \cdot 4 \cdot 5 \cdot \cos(60°)

The graph shows sides a and b emanating from the origin with angle C between them. The dotted horizontal is side a, and the angled line is side b.

-2-112345678910-2-112345678910Side aSide b directionSide c (computed)
Try This

Try this: Set a = 3, b = 4, C = 90 degrees. The Law of Cosines gives c^2 = 9 + 16 - 0 = 25, so c = 5. It’s the classic 3-4-5 right triangle! The Pythagorean theorem is just a special case.

Comparing c^2 to a^2 + b^2

The relationship between c^2 and a^2 + b^2 tells you the triangle type:

153045607590105120135150165180153045607590c^2 from Law of Cosinesa^2 + b^2 (Pythagorean)

The blue curve shows c^2 as angle C varies. Where it crosses the yellow line, C = 90 degrees. Below the yellow line, the triangle is acute; above it, the triangle is obtuse.

Challenge

Challenge: A triangle has sides 7, 8, and 13. Is it acute, right, or obtuse? Use the Law of Cosines to find the largest angle.

Take the Quiz