Law of Sines vs. Law of Cosines: What's the Difference?
In any triangle, there are two relationships between the lengths of the sides and the measures of the angles: the law of sines 🇺🇸 and the law of cosines 🇺🇸. In this article, we will:
- Define the law of sines and cosines and state their formulae;
- Explain when to use the law of sines vs. the law of cosines; and
- Walk through two step-by-step examples.
By the end, you'll avoid the biggest trig sin, a.k.a choosing the wrong sine (or cosine).
The law of sines is a formula that establishes a relationship between the ratios of the sines of angles and the lengths of their opposite sides.
The law of sines allows you to find the measure of a side or an angle in any triangle. To do this, you need to know the measure of an angle, its opposite side, and another side or another angle. In short, a complete pair (side, angle) is required.
![]() |
You can also write the law of sines formula as follows:
💡 To know more about this subject, check out our other detailed article entitled: What is the law of sines (Sine Rule Explained).
The law of cosines is a formula for finding the measure of a side or an angle in any triangle.
The law of cosines generalizes the Pythagorean theorem 🇺🇸 to any triangle. It allows us to find the length of a side or the measure of an angle in any triangle. To do this, we need to know the lengths of two sides and the angle they form, or the lengths of all three sides of the triangle.
![]() |
---|
The law of cosines can take the following forms:
Generally, the law of cosines is used in two situations:
- When the lengths of two sides and the angle they form in the triangle are known, the length of the third side can be found.
- Or, when you know the lengths of the triangle's three sides, you can find the measure of an angle.
This table shows which law to use to determine the missing values in a given triangle.
Known elements | No. of solutions | Law to use | Notes |
---|---|---|---|
1 side + 2 angles (ASA or AAS) | Unique solution | Law of sines | Find the third angle (180° rule), then apply the law of sines |
2 sides + 1 included angle (SAS) | Unique solution | Law of cosines | Directly gives the missing side |
2 sides + 1 opposite angle (SSA, ambiguous case) | Not unique (0, 1, or 2 solutions) if angle is opposite the longer side | Law of sines | The ambiguous case: may yield two possible triangles |
2 sides + 1 opposite angle (SSA) | Unique solution if angle is opposite the shorter side | Law of sines | Only one valid triangle possible |
All 3 sides (SSS) | Unique solution | Law of cosines | Use to find an angle first |
All 3 angles (AAA) | No unique solution | Only defines the shape of the triangle, not its size |
🙋 Interested in knowing more about the ambiguous case? Visit our article about it: Law of Sines: Ambiguous Case.
Example 1: The law of sines
Determine the missing sides and angles of the triangle with the given values: a=8in, α=40∘, β=65∘.
- Find the third angle γ using the 180° rule:
- Apply the law of sines to find b:
- Apply the law of sines to find c:
Example 2: The law of cosines
Determine the missing sides and angles of the triangle with the given values: α=40∘, b=9in, c=11in.
- Apply the law of cosines to find a:
- Apply the law of cosines to find β:
- Use the 180° rule to find γ:
💡 Curious about trigonometry? Check out our right triangle calculator 🇺🇸!
The law of sines and the law of cosines are complementary tools used to solve triangles. The law of sines applies to angle-side pairs (ASA, AAS, or SSA), and the law of cosines applies to three-side pairs (SSS) or two-side pairs with an included angle (SAS). In practice, these two laws work together in fields such as geometry, navigation, astronomy, engineering, and surveying.
When viewing a vertex at an angle θ
, sin(θ)
is the ratio of the opposite side to the hypotenuse, while cos(θ)
is the ratio of the adjacent side to the hypotenuse.
You can generally use the cosine rule when you have two sides and the included angle (SAS) or three sides and want to calculate an angle (SSS). To use the sine rule, you must know either two angles and one side (ASA) or two sides and one non-included angle (SSA).
The sine is always the measurement of the opposite side divided by the hypotenuse measurement. Since the hypotenuse is always the longest side, the number at the bottom of the ratio will always be greater than the number at the top.
This article was written by Claudia Herambourg and reviewed by Steven Wooding.