Law Of Sines And Cosines Formula

8 min read

You're staring at a triangle. Day to day, maybe it's an angle. Not a right triangle — just some random, lopsided triangle with three sides and three angles, and you need to find something missing. You know the Pythagorean theorem won't help. Maybe it's a side length. That only works when you have a 90-degree corner.

So what do you do?

You reach for the law of sines and the law of cosines. Practically speaking, these two formulas are the Swiss Army knives of non-right triangles. They show up in surveying, navigation, physics, engineering, and more than a few late-night homework sessions. And once you actually understand when to use which one, they stop feeling like magic and start feeling like tools Simple, but easy to overlook. And it works..

What Is the Law of Sines

The law of sines is a relationship between the sides of a triangle and the sines of its angles. Simple as that. For any triangle — acute, obtuse, doesn't matter — the ratio of a side length to the sine of its opposite angle stays constant.

Here's the formula:

a / sin(A) = b / sin(B) = c / sin(C)

Lowercase letters are sides. Uppercase letters are the angles opposite those sides. Side a sits across from angle A, side b across from B, and side c across from C Easy to understand, harder to ignore..

When the Law of Sines Works Best

You need either:

  • Two angles and one side (AAS or ASA)
  • Two sides and a non-included angle (SSA)

That last one — SSA — is the tricky one. Sometimes zero. Here's the thing — it's called the ambiguous case for a reason. Sometimes you get one triangle. Sometimes two. We'll come back to that.

The law of sines is clean. Elegant. In practice, it says: *the bigger the angle, the longer the opposite side, and the ratio between them is always the same. * That's the intuition worth holding onto.

What Is the Law of Cosines

The law of cosines is the law of sines' heavier, more versatile cousin. It works for any triangle, but it shines when you have:

  • Three sides (SSS)
  • Two sides and the included angle (SAS)

The formula looks like the Pythagorean theorem with a correction term:

c² = a² + b² - 2ab cos(C)

You can rotate the letters depending on which side you're solving for:

a² = b² + c² - 2bc cos(A)
b² = a² + c² - 2ac cos(B)

Notice the pattern? It's always: side² = sum of the other two sides squared minus twice their product times the cosine of the included angle.

Why the Cosine Term Exists

If angle C is 90°, cos(C) = 0. Plus, that's the Pythagorean theorem. Consider this: the whole correction term vanishes and you're left with c² = a² + b². The law of cosines is the Pythagorean theorem — just generalized for angles that aren't 90 degrees That alone is useful..

When the angle is acute (< 90°), cos(C) is positive, so you're subtracting something. The side c ends up shorter than it would be in a right triangle. Now, when the angle is obtuse (> 90°), cos(C) is negative, so minus a negative becomes plus. The side c stretches out longer.

That's the geometric intuition. Hold onto it Worth keeping that in mind..

Why These Laws Matter

You might wonder: *do I actually need both?Here's the thing — * Yes. And here's why.

The law of sines is faster when you have angles. The law of cosines is your only option when you don't. Consider this: try solving a triangle with three known sides using only the law of sines — you can't even start. You have no angles to work with Turns out it matters..

Real-world example: a surveyor measures three sides of a triangular plot of land. No angles measured. They need the angles to calculate area, set corners, plan drainage. Law of cosines gives them every angle. Done.

Or a navigator knows two sides and the angle between them — say, a ship's course and speed over two legs of a journey. Day to day, law of cosines. On top of that, they need the direct distance back to port. One calculation Easy to understand, harder to ignore. Turns out it matters..

These aren't textbook exercises. They're the math behind GPS triangulation, structural engineering, astronomy, computer graphics, and more.

How to Choose Which Law to Use

This is where most students freeze. Here's a decision flowchart that actually works:

Start with what you know:

Known Info Use
2 angles + any side (AAS, ASA) Law of Sines
2 sides + angle between them (SAS) Law of Cosines
3 sides (SSS) Law of Cosines
2 sides + angle not between them (SSA) Law of Sines (watch for ambiguous case)

That's it. Memorize that table. Or better — understand why it works.

The SSA Ambiguous Case

This deserves its own spotlight. You know two sides and an angle that isn't between them. Say you know side a, side b, and angle A.

You set up the law of sines: sin(B) / b = sin(A) / a

Solve for sin(B). Three things can happen:

  1. sin(B) > 1 → No triangle exists. The side a is too short to reach side c.
  2. sin(B) = 1 → Exactly one right triangle. Angle B = 90°.
  3. 0 < sin(B) < 1 → Two possible angles for B: one acute, one obtuse (supplements). Both might work. Only one might work. Neither might work if the resulting angle C ends up negative.

How do you know? But check the sum of angles. If A + B < 180°, that B is valid. Do it for both the acute and obtuse possibilities.

This isn't a trick. It's geometry. A given side length can swing two different ways and still hit the baseline — like a door that can open inward or outward That's the whole idea..

Step-by-Step: Solving a Triangle with Law of Cosines

Let's walk through a real example. You have a triangle with sides a = 7, b = 10, c = 12. Find all three angles.

Step 1: Pick an angle to find first.
Usually start with the largest angle — opposite the longest side. That's angle C (opposite side c = 12) Took long enough..

Step 2: Plug into law of cosines.
c² = a² + b² - 2ab cos(C)
12² = 7² + 10² - 2(7)(10) cos(C)
144 = 49 + 100 - 140 cos(C)
144 = 149 - 140 cos(C)

Step 3: Solve for cos(C).
-5 = -140 cos(C)
cos(C) = 5/140 = 1/28 ≈ 0.0357

Step 4: Find the angle.
C = cos⁻¹(1/28) ≈ 87.95°

Step 5: Use law of sines for a second angle.

Step 5: Use law of sines for a second angle.
Now that we have angle C, we can efficiently find angle A using the ratio a / sin(A) = c / sin(C):
7 / sin(A) = 12 / sin(87.95°)
sin(A) = 7 · sin(87.95°) / 12 ≈ 7 · 0.9994 / 12 ≈ 0.5830
A = sin⁻¹(0.5830) ≈ 35.66°

Step 6: Find the third angle by subtraction.
Since the angles of a triangle sum to 180°:
B = 180° - A - C ≈ 180° - 35.66° - 87.95° ≈ 56.39°

Step 7: Sanity check.
Verify with the law of cosines or law of sines using side b = 10:
b / sin(B) ≈ 10 / sin(56.39°) ≈ 10 / 0.8325 ≈ 12.01, matching c / sin(C) ≈ 12 / 0.9994 ≈ 12.01. The small rounding difference confirms the solution is consistent.

Common Mistakes to Avoid

Even with the right formula, errors creep in. Watch for these:

  • Wrong angle mode. Calculators default to radians. If your problem is in degrees, switch modes before using cos⁻¹ or sin⁻¹.
  • Confusing included vs. non-included angle. SAS needs law of cosines; SSA needs law of sines (with ambiguity check). Mixing them wastes steps or gives false triangles.
  • Rounding too early. Keep 4+ decimal places in intermediate steps. Round only the final answer.
  • Forgetting the ambiguous case. In SSA, always test both acute and obtuse supplements of the solved angle.
  • Assuming largest side = largest angle without checking. It's true, but verify with your computed values to catch arithmetic slips.

Why This Matters Beyond the Classroom

Triangles are the atomic unit of shape. When a video game engine lighting a character's face calculates how light bounces off a surface, it's running law of cosines in a shader. Any polygon can be cut into triangles; any 3D mesh is built from them. When a surveyor maps a hillside, when a physicist resolves force vectors, when a robotic arm reaches for an object — triangular math is happening silently, constantly, correctly.

No fluff here — just what actually works.

Understanding when and how to deploy the law of sines versus the law of cosines isn't about passing a test. It's about building intuition for spatial reasoning — the ability to look at partial information and know exactly what tool recovers the rest The details matter here..

Conclusion

The law of sines and the law of cosines are not competing formulas but complementary lenses. Now, learn the decision table, respect the ambiguous case, and practice the step-by-step method until it's mechanical. One exploits ratio and angle symmetry; the other anchors itself in side lengths and enclosed angles. Do that, and any triangle — given, partial, or hidden in a real-world problem — becomes solvable.

Keep Going

New This Week

Try These Next

Readers Also Enjoyed

Thank you for reading about Law Of Sines And Cosines Formula. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home