Triangle identities · trigonometric identity
a² = b² + c² − 2bc·cos A — Law of cosines
When to use it
Two sides and the angle between them are known and the third side is wanted, or all three sides are known and an angle is wanted. It also classifies the triangle: the sign of cos A tells you whether A is acute, right or obtuse.
Why it is true
Put A at the origin and B at (c, 0); then C sits at (b·cos A, b·sin A). The distance formula on B and C gives b²cos²A − 2bc·cos A + c² + b²sin²A, and cos² + sin² = 1 folds the first and last terms into b².
The full line-by-line version is on the proof page for law of cosines; the “how would I find this myself” version is in the derivation.
Where it comes from
solve the same equation for the angle instead of the side. The useful rearrangement is the one that answers 'what is this angle?' when all three sides are known — start from the proved form and isolate cos A.
- a² = b² + c² − 2bc·cos AThe proved form. · Law of cosines
- 2bc·cos A = b² + c² − a²Move the cosine term to the left, a² to the right.
- cos A = (b² + c² − a²)/(2bc)Divide by 2bc — now the angle is the subject.
Worked examples
No worked example is written for this identity yet —the examples index lists what is covered, and the pattern below shows the identity working at real angles.
Checked on these triangles
Two sides of the identity evaluated with the same engine that runs the verifier. A single line disagreeing would break the build.
| Triangle (A) | Left side | Right side | Agree |
|---|---|---|---|
| 7.5° | 2.62788 | 2.62788 | yes |
| 15° | 0.605613 | 0.605613 | yes |
| 18° | 1.32987 | 1.32987 | yes |
| 22.5° | 3.99025 | 3.99025 | yes |
| 30° | 10.266201 | 10.266201 | yes |
| 37° | 6.274259 | 6.274259 | yes |
| 45° | 5.18671 | 5.18671 | yes |
| 53° | 9.283126 | 9.283126 | yes |
| 60° | 15.731875 | 15.731875 | yes |
| 67.5° | 13.106186 | 13.106186 | yes |
| 75° | 13.121403 | 13.121403 | yes |
| 90° | 23.198125 | 23.198125 | yes |
| 120° | 30.664375 | 30.664375 | yes |
| 135° | 30.21829 | 30.21829 | yes |
| 150° | 36.130049 | 36.130049 | yes |
The letters are not free
a, b, c and A, B, C here are one triangle's sides and angles: A + B + C = 180° and the sides follow the sine rule. Feed the same six letters with random values and the equation fails — that is a property of the formula, not a bug in the tool.
The mistake students make
Writing +2bc·cos A, or using the formula with an angle that is not between the two known sides. The angle must sit between the sides being multiplied, and the lone side on the left must be the one opposite it.
Try it
- Verify this identity — both sides are pre-filled; change one character and watch the counterexample appear.
- Ask “which identity should I use?” about the left-hand side — this identity is what the chooser should rank first.
- Cheat sheet entry for triangle identities.
Related identities
- a/sin A = b/sin BLaw of sinesdetailsproof
- sin²θ + cos²θ = 1Pythagorean identitydetailsproof
- a = b·cos C + c·cos BProjection ruledetailsproof
Category hub: Triangle identities · all identities: /identities