The Pythagoras theorem works only for right triangles: c 2 = a 2 + b 2 c^2 = a^2 + b^2 c 2 = a 2 + b 2 .
But most triangles are not right-angled. The Law of Cosines is Pythagoras
plus a correction term that accounts for the angle not being 90 ° 90° 90° .
If the angle is exactly 90 ° 90° 90° , the correction vanishes → we get Pythagoras back.
If the angle is acute (< 90 ° <90° < 90° ), the correction shrinks c c c .
If the angle is obtuse (> 90 ° >90° > 90° ), the correction grows c c c .
WHY it matters: with it you can solve any triangle when you know
(a) two sides + the included angle (SAS), or (b) all three sides (SSS) — cases
the Law of Sines alone cannot start.
Definition Law of Cosines
In any triangle with sides a , b , c a, b, c a , b , c opposite to angles A , B , C A, B, C A , B , C :
c 2 = a 2 + b 2 − 2 a b cos C c^2 = a^2 + b^2 - 2ab\cos C c 2 = a 2 + b 2 − 2 ab cos C
By symmetry (just relabel):
a 2 = b 2 + c 2 − 2 b c cos A b 2 = a 2 + c 2 − 2 a c cos B a^2 = b^2 + c^2 - 2bc\cos A \qquad b^2 = a^2 + c^2 - 2ac\cos B a 2 = b 2 + c 2 − 2 b c cos A b 2 = a 2 + c 2 − 2 a c cos B
The correction term is = = − 2 a b cos C = = ==-2ab\cos C== == − 2 ab cos C == .
WHAT the letters mean: C C C is the angle between the two sides a a a and b b b ;
c c c is the side opposite that angle. The angle and its opposite side always pair up.
Intuition Why the correction sign is "minus"
cos C > 0 \cos C > 0 cos C > 0 for acute angles, so we subtract → c c c smaller. As C → 90 ° C\to 90° C → 90° , cos C → 0 \cos C\to 0 cos C → 0 ,
correction dies, Pythagoras returns. For obtuse C C C , cos C < 0 \cos C<0 cos C < 0 , so − 2 a b cos C > 0 -2ab\cos C>0 − 2 ab cos C > 0 adds length.
Solve the definition for cos C \cos C cos C :
cos C = a 2 + b 2 − c 2 2 a b \cos C = \frac{a^2 + b^2 - c^2}{2ab} cos C = 2 ab a 2 + b 2 − c 2
Why useful? Given all three sides, this directly returns the angle via arccos \arccos arccos .
Worked example SAS — find the third side
Triangle with a = 8 a = 8 a = 8 , b = 5 b = 5 b = 5 , included angle C = 60 ° C = 60° C = 60° . Find c c c .
c 2 = 8 2 + 5 2 − 2 ( 8 ) ( 5 ) cos 60 ° c^2 = 8^2 + 5^2 - 2(8)(5)\cos 60° c 2 = 8 2 + 5 2 − 2 ( 8 ) ( 5 ) cos 60°
Why this step? SAS gives the two sides around C C C and the angle between them — exactly the inputs the formula needs.
c 2 = 64 + 25 − 80 ( 0.5 ) = 89 − 40 = 49 ⇒ c = 7 c^2 = 64 + 25 - 80(0.5) = 89 - 40 = 49 \Rightarrow c = 7 c 2 = 64 + 25 − 80 ( 0.5 ) = 89 − 40 = 49 ⇒ c = 7
Why cos 60 ° = 0.5 \cos 60°=0.5 cos 60° = 0.5 ? Standard value; makes the correction − 40 -40 − 40 .
Worked example SSS — find an angle
Sides a = 7 a=7 a = 7 , b = 8 b=8 b = 8 , c = 9 c=9 c = 9 . Find angle C C C (opposite the 9 9 9 ).
cos C = 7 2 + 8 2 − 9 2 2 ( 7 ) ( 8 ) = 49 + 64 − 81 112 = 32 112 = 0.2857 \cos C = \frac{7^2 + 8^2 - 9^2}{2(7)(8)} = \frac{49+64-81}{112} = \frac{32}{112} = 0.2857 cos C = 2 ( 7 ) ( 8 ) 7 2 + 8 2 − 9 2 = 112 49 + 64 − 81 = 112 32 = 0.2857
Why this arrangement? C C C is opposite c = 9 c=9 c = 9 , so c c c sits alone with the minus; a , b a,b a , b frame the angle.
C = arccos ( 0.2857 ) ≈ 73.4 ° C = \arccos(0.2857) \approx 73.4° C = arccos ( 0.2857 ) ≈ 73.4°
Worked example Obtuse check
a = 3 a = 3 a = 3 , b = 4 b = 4 b = 4 , C = 120 ° C = 120° C = 120° . Then cos 120 ° = − 0.5 \cos120° = -0.5 cos 120° = − 0.5 .
c 2 = 9 + 16 − 2 ( 3 ) ( 4 ) ( − 0.5 ) = 25 + 12 = 37 ⇒ c ≈ 6.08 c^2 = 9 + 16 - 2(3)(4)(-0.5) = 25 + 12 = 37 \Rightarrow c \approx 6.08 c 2 = 9 + 16 − 2 ( 3 ) ( 4 ) ( − 0.5 ) = 25 + 12 = 37 ⇒ c ≈ 6.08
Why bigger than the 5 5 5 you'd get at 90 ° 90° 90° ? The obtuse angle adds + 12 +12 + 12 — the correction flips sign.
Recall Forecast before computing
Triangle a = 6 , b = 6 , C = 90 ° a=6,\ b=6,\ C=90° a = 6 , b = 6 , C = 90° . Predict c c c before reading on.
Verify: c 2 = 36 + 36 − 2 ( 36 ) ( 0 ) = 72 c^2 = 36+36-2(36)(0) = 72 c 2 = 36 + 36 − 2 ( 36 ) ( 0 ) = 72 , so c = 6 2 ≈ 8.49 c=6\sqrt2\approx8.49 c = 6 2 ≈ 8.49 . Pythagoras — correction is zero at 90 ° 90° 90° . ✓
Common mistake Pairing the wrong angle with the wrong side
Wrong feels right: "I'll use the angle I know, A A A , with sides b b b and c c c but write − 2 b c cos B -2bc\cos B − 2 b c cos B ."
Why tempting: all the letters are floating around and it's easy to mismatch.
Fix: The angle in the correction term must be the one opposite the side on the left. In c 2 = ⋯ − 2 a b cos C c^2=\dots-2ab\cos C c 2 = ⋯ − 2 ab cos C , the lone side c c c pairs with angle C C C ; a , b a,b a , b are its neighbours .
Common mistake Using the wrong angle in SAS
Wrong: given a , b a,b a , b and a non-included angle, plugging it straight in.
Fix: Law of Cosines' SAS needs the angle between the two given sides. If the angle is not between them, it's the ambiguous SSA case — use the Law of Sines instead.
Common mistake Dropping the sign for obtuse angles
Wrong: treating cos 120 ° \cos120° cos 120° as + 0.5 +0.5 + 0.5 .
Fix: cos \cos cos is negative in the second quadrant. Keeping the sign is exactly what makes obtuse triangles come out longer.
Recall Explain to a 12-year-old
Imagine two sticks joined at a hinge. The far ends have a gap between them. If you open the hinge
a little (small angle), the ends are close, so the gap is small. Open it wide (big angle) and the
ends swing far apart, so the gap is large. The Law of Cosines is just a formula that tells you the
gap's length from the two stick lengths and how wide you opened the hinge. When the hinge is a
perfect corner (90 ° 90° 90° ), it becomes the old Pythagoras rule.
"SOS — Same, Opposite, Subtract cos."
Left side = S quare of the lone side; right = sum of the other two S quares; then
S ubtract 2 × 2\times 2 × (their product)× cos \times\cos × cos (the O pposite angle).
Also: "The angle you cosine is the one facing the loner side."
State the Law of Cosines for side c c c . c 2 = a 2 + b 2 − 2 a b cos C c^2 = a^2 + b^2 - 2ab\cos C c 2 = a 2 + b 2 − 2 ab cos C Which angle appears in c 2 = a 2 + b 2 − 2 a b cos C c^2 = a^2+b^2-2ab\cos C c 2 = a 2 + b 2 − 2 ab cos C ? The angle
C C C opposite side
c c c (between sides
a a a and
b b b ).
What does the Law of Cosines reduce to when C = 90 ° C=90° C = 90° ? Pythagoras:
c 2 = a 2 + b 2 c^2=a^2+b^2 c 2 = a 2 + b 2 (since
cos 90 ° = 0 \cos90°=0 cos 90° = 0 ).
Rearrange to find angle C C C from three sides. cos C = a 2 + b 2 − c 2 2 a b \cos C = \dfrac{a^2+b^2-c^2}{2ab} cos C = 2 ab a 2 + b 2 − c 2 Which two triangle cases require Law of Cosines to start? SAS (two sides + included angle) and SSS (three sides).
Why is the correction term negative for acute angles? cos C > 0 \cos C>0 cos C > 0 so
− 2 a b cos C < 0 -2ab\cos C<0 − 2 ab cos C < 0 , shrinking
c c c below the Pythagorean value.
For an obtuse angle, why is c c c larger? cos C < 0 \cos C<0 cos C < 0 , so
− 2 a b cos C > 0 -2ab\cos C>0 − 2 ab cos C > 0 adds length.
In the coordinate proof, what are B B B 's coordinates? B = ( a cos C , a sin C ) B=(a\cos C, a\sin C) B = ( a cos C , a sin C ) .
Given a = 8 , b = 5 , C = 60 ° a=8,b=5,C=60° a = 8 , b = 5 , C = 60° , find c c c . c 2 = 64 + 25 − 40 = 49 c^2=64+25-40=49 c 2 = 64 + 25 − 40 = 49 , so
c = 7 c=7 c = 7 .
Pythagoras Theorem — the C = 90 ° C=90° C = 90° special case.
Law of Sines — complements this; used for AAS/ASA and the ambiguous SSA.
Dot Product — u ⃗ ⋅ v ⃗ = ∣ u ∣ ∣ v ∣ cos θ \vec{u}\cdot\vec{v}=|u||v|\cos\theta u ⋅ v = ∣ u ∣∣ v ∣ cos θ is the Law of Cosines in disguise.
Solving Triangles — decision tree: which law for which given data.
Unit Circle and Cosine Values — why cos \cos cos goes negative past 90 ° 90° 90° .
extended by correction term
two sides plus included angle
Intuition Hinglish mein samjho
Dekho, Law of Cosines ka basic idea simple hai: Pythagoras theorem sirf right-angle triangle
ke liye chalta hai (c 2 = a 2 + b 2 c^2 = a^2+b^2 c 2 = a 2 + b 2 ). Lekin zyada tar triangles right-angle wale nahi hote. Toh
Law of Cosines ek "correction term" add karta hai — c 2 = a 2 + b 2 − 2 a b cos C c^2 = a^2 + b^2 - 2ab\cos C c 2 = a 2 + b 2 − 2 ab cos C . Jab angle C C C
exactly 90 ° 90° 90° hota hai, tab cos 90 ° = 0 \cos90°=0 cos 90° = 0 , correction gayab, aur wapas Pythagoras mil jaata hai.
Yeh formula tab kaam aata hai jab tumhe do side aur beech ka angle pata ho (SAS), ya teeno
side pata ho (SSS). In cases mein Law of Sines akela shuru nahi kar sakta. Ek zaroori baat yaad
rakho: correction term mein jo angle aata hai wo hamesha wahi hota hai jo opposite side ke saamne
hai. Yaani c 2 c^2 c 2 likhoge toh angle C C C use hoga, jo c c c ke opposite hai; a a a aur b b b uske neighbours
hain.
Proof bilkul basic hai — triangle ko coordinate axis par rakho, C C C ko origin par, phir B B B ke
coordinates ( a cos C , a sin C ) (a\cos C, a\sin C) ( a cos C , a sin C ) nikaalo aur distance formula lagao. cos 2 + sin 2 = 1 \cos^2+\sin^2=1 cos 2 + sin 2 = 1 use karte hi
formula automatically nikal aata hai. Ek Steel-man mistake yaad rakho: obtuse angle (jaise 120 ° 120° 120° )
mein cos \cos cos negative hota hai, toh sign flip ho jaata hai aur c c c bada ho jaata hai — sign mat
girao, wahi to obtuse triangle ka magic hai!