Law of Cosines and Its Applications
The Law of Cosines lets you solve triangles that don't have a right angle. It connects all three sides of a triangle to one of its angles, which means you can find missing measurements in situations where the Pythagorean theorem won't work. This section covers when and how to use it, plus Heron's formula for finding area from side lengths alone.

Law of Cosines for Non-Right Triangles
The Law of Cosines works on oblique triangles (any triangle without a right angle). You'll use it in two specific scenarios:
- You know two sides and the included angle (SAS)
- You know all three sides (SSS)
For triangle ABC with sides , , opposite angles , , :
Notice the pattern: the side you're solving for is always opposite the angle in the cosine term. Also notice that if the angle were 90ยฐ, then , and the formula collapses to the Pythagorean theorem. The Law of Cosines is really a generalization of it.
Finding an unknown side (SAS):
- Identify the two known sides and the angle between them.
- Plug into the formula where that angle appears in the cosine term.
- Compute the right side, then take the square root.
Example: In triangle ABC, , , and . Find .
Finding an unknown angle (SSS):
-
Substitute all three side lengths into the formula, placing the side opposite your target angle on the left.
-
Isolate the cosine term. For example, solving for angle :
-
Take the inverse cosine () to get the angle.
Example: Given , , , find angle .

Real-World Applications of Law of Cosines
Many applied problems involve triangles that aren't right triangles. Here's a general approach:
- Sketch a diagram. Draw the triangle and label every known side and angle.
- Identify what's missing. Determine whether you need a side or an angle.
- Check the scenario. Confirm you have SAS or SSS so the Law of Cosines applies. (If you have AAS or ASA, the Law of Sines is usually easier.)
- Choose the right version of the formula. Match it to the unknown you're solving for.
- Solve and interpret. Make sure your answer makes sense in context.
Common application areas:
- Construction: Finding the length of a brace between two beams that meet at a known angle, or determining a roof angle from measured dimensions.
- Navigation: Calculating the straight-line distance between two locations when you know two legs of a path and the angle between them, such as a ship changing course.
- Surveying: Determining distances across terrain where direct measurement isn't possible.

Heron's Formula for Triangle Area
Heron's formula calculates the area of a triangle using only its three side lengths. You don't need to know any angles or the height, which makes it especially useful when those are hard to measure directly.
For a triangle with sides , , :
Here, is the semi-perimeter (half the perimeter), and is the area.
Steps to apply Heron's formula:
- Compute the semi-perimeter:
- Calculate each factor: , ,
- Multiply
- Take the square root of the product.
Example: Find the area of a triangle with sides 5, 7, and 10.
A common mistake is forgetting to take the square root at the end, or mixing up with the full perimeter. Double-check that is half the perimeter before plugging in.
Heron's formula is particularly handy for irregular plots of land or any situation where you can measure all three sides but can't easily find the height.
Connecting the Tools for Non-Right Triangles
The Law of Cosines and the Law of Sines are the two main tools for solving oblique triangles. Here's a quick guide for choosing between them:
- Law of Cosines: Use when you have SAS or SSS.
- Law of Sines: Use when you have AAS, ASA, or sometimes SSA (though SSA can produce the ambiguous case).
In many problems, you'll use both. For instance, you might use the Law of Cosines to find one missing side (SAS), then switch to the Law of Sines to find the remaining angles more efficiently.