Law of Cosines
Ximena wants to know how wide a lake is in a park in Querétaro. She can't cross it, but from the shore she measures the distance to two points on the far side and the angle between them. Neither Pythagoras nor the law of sines helps her: there is no right angle and no side with its opposite angle. That's what the law of cosines is for, a version of Pythagoras that works in any triangle.
A generalization of Pythagoras
If angle $C$ were $90^\circ$, then $\cos C=0$ and the formula becomes exactly the Pythagorean theorem. For any other angle, a correction term appears.
In a triangle $ABC$, sides $b=5$ cm and $c=8$ cm and the included angle $A=60^\circ$ are known. Calculate the length of side $a$.
In a triangle $ABC$, sides $b=5$ cm and $c=8$ cm and the included angle $A=60^\circ$ are known. Calculate the length of side $a$.
In a triangle $ABC$, the sides measure $a=10$ cm and $b=12$ cm and the included angle is $C=45^\circ$. Set up the cosine rule to calculate the exact value of side $c$.
In a triangle $ABC$, the sides measure $a=10$ cm and $b=12$ cm and the included angle is $C=45^\circ$. Set up the cosine rule to calculate the exact value of side $c$.
Finding a side: two sides and the included angle
If you know two sides and the angle between them, the third side comes from substituting into the formula.
When the given data is a central angle, the triangle with two radii is isosceles and the side you're looking for is the chord.
A parallelogram has two adjacent sides measuring 4 cm and 6 cm. If the included angle between them is $120^\circ$, calculate the length of the longer diagonal.
A parallelogram has two adjacent sides measuring 4 cm and 6 cm. If the included angle between them is $120^\circ$, calculate the length of the longer diagonal.
In an isosceles triangle $ABC$, sides $a$ and $b$ measure 6 cm each, and the non-equal angle is $C=30^\circ$. Calculate the exact value of side $c$, leaving the answer…
In an isosceles triangle $ABC$, sides $a$ and $b$ measure 6 cm each, and the non-equal angle is $C=30^\circ$. Calculate the exact value of side $c$, leaving the answer in surd form.
In a circle of radius 10 cm, a chord subtends a central angle of $100^\circ$. Calculate the length of the chord using the cosine rule in the triangle formed by the radii…
In a circle of radius 10 cm, a chord subtends a central angle of $100^\circ$. Calculate the length of the chord using the cosine rule in the triangle formed by the radii and the chord.
Finding an angle: all three sides
If you know all three sides, solve for the cosine of the angle you want. The sign of the result tells you whether the angle is acute (positive) or obtuse (negative).
In a triangle $ABC$, the lengths of the sides are $a=3$ cm, $b=5$ cm, and $c=7$ cm. Calculate the size of angle $C$.
In a triangle $ABC$, the lengths of the sides are $a=3$ cm, $b=5$ cm, and $c=7$ cm. Calculate the size of angle $C$.
Determine the measure of angle $B$ in a triangle whose sides are $a=7$ cm, $b=8$ cm, and $c=9$ cm.
Determine the measure of angle $B$ in a triangle whose sides are $a=7$ cm, $b=8$ cm, and $c=9$ cm.
A triangular roof truss has sides of 5 m, 7 m, and 9 m. Calculate the angle opposite the longest side.
A triangular roof truss has sides of 5 m, 7 m, and 9 m. Calculate the angle opposite the longest side.
Inaccessible distances, bearings, and forces
The law of cosines is the tool when two distances and the angle between them can be measured, but the distance you want cannot: surveying, navigation, or combining forces.
Back to the beginning: Ximena applies $AB^2=a^2+b^2-2ab\cos C$ with the two measured distances and the angle between them, and gets the width of the lake without crossing it.
Calculate the distance between two inaccessible points $A$ and $B$, given that from an observation point $C$ the distances measured are $CA = 15$ m and $CB = 20$ m, and…
Calculate the distance between two inaccessible points $A$ and $B$, given that from an observation point $C$ the distances measured are $CA = 15$ m and $CB = 20$ m, and the visual angle $ACB$ is $40^\circ$.
To measure the distance across a lake between points $A$ and $B$, a surveyor stands at point $C$. He measures the distances $CA = 125.5$ m and $CB = 180.2$ m, and the…
To measure the distance across a lake between points $A$ and $B$, a surveyor stands at point $C$. He measures the distances $CA = 125.5$ m and $CB = 180.2$ m, and the angle $ACB = 75^\circ$. Calculate the distance $AB$.
Two aeroplanes depart from the same airport at the same time. Aeroplane A flies at $800$ km/h on a bearing of $040^\circ$ and aeroplane B flies at $650$ km/h on a…
Two aeroplanes depart from the same airport at the same time. Aeroplane A flies at $800$ km/h on a bearing of $040^\circ$ and aeroplane B flies at $650$ km/h on a bearing of $115^\circ$. What straight-line distance separates them after 1.5 hours of flight?
Tougher problems: equations
Here the law is combined with algebra: setting up an equation with unknown $x$ or solving a system.
In a triangle, the lengths of the sides are $x$, $x+2$, and $x+4$. If the largest angle measures $120^\circ$, set up the corresponding equation, determine the value of…
In a triangle, the lengths of the sides are $x$, $x+2$, and $x+4$. If the largest angle measures $120^\circ$, set up the corresponding equation, determine the value of $x$ and the exact lengths of the three sides.
If in a triangle $ABC$ the algebraic relation $a^2 = b^2 + c^2 + \sqrt{2}bc$ holds, determine the exact measure of angle $A$ without using a calculator.
If in a triangle $ABC$ the algebraic relation $a^2 = b^2 + c^2 + \sqrt{2}bc$ holds, determine the exact measure of angle $A$ without using a calculator.
A triangle has a fixed base $c = 10$ cm and a constant perimetre $p = 26$ cm. If angle $C$ opposite the base measures $60^\circ$, set up a system of equations and find…
A triangle has a fixed base $c = 10$ cm and a constant perimetre $p = 26$ cm. If angle $C$ opposite the base measures $60^\circ$, set up a system of equations and find the exact lengths of the other two sides $a$ and $b$.
Medians and cyclic quadrilaterals
The median of a triangle is the segment joining a vertex to the midpoint of the opposite side. To calculate it, you write the law of cosines in the two triangles into which the median divides the triangle: the angles at the midpoint add up to $180^\circ$, so their cosines are opposites and cancel when you add.
The diagonals of a parallelogram measure 12 cm and 16 cm, and intersect forming an angle of $65^\circ$. Calculate the lengths of the four sides of the parallelogram.
The diagonals of a parallelogram measure 12 cm and 16 cm, and intersect forming an angle of $65^\circ$. Calculate the lengths of the four sides of the parallelogram.
In a triangle $ABC$, the sides measure $a=8$ cm, $b=10$ cm, and $c=12$ cm. Calculate the exact length of the median $m_a$ drawn from vertex $A$ to the midpoint of side…
In a triangle $ABC$, the sides measure $a=8$ cm, $b=10$ cm, and $c=12$ cm. Calculate the exact length of the median $m_a$ drawn from vertex $A$ to the midpoint of side $a$.
A cyclic quadrilateral $ABCD$ has side lengths of $AB=3$ cm, $BC=4$ cm, $CD=5$ cm, and $DA=6$ cm. Taking into account the properties of opposite angles in a cyclic…
A cyclic quadrilateral $ABCD$ has side lengths of $AB=3$ cm, $BC=4$ cm, $CD=5$ cm, and $DA=6$ cm. Taking into account the properties of opposite angles in a cyclic quadrilateral, set up a system of equations using the cosine rule in triangles $ABC$ and $ADC$ to calculate the exact length of diagonal $AC$.
Proofs: projections and the rearranged formula
Proving an identity with sides and cosines almost always comes down to one idea: the law of cosines replaces $\cos C$ with an expression in the sides.
If you draw the altitude from $C$ to side $c$, the foot $H$ divides $c$ into two parts. The part $AH$ is the projection of side $b$ onto $c$ and measures $b\cos A$. The part $HB$ is the projection of $a$ and measures $a\cos B$. That's why $c=b\cos A+a\cos B$.
Prove algebraically that in any triangle $ABC$ the following relation holds: $a^2 + b^2 + c^2 = 2(ab \cos C + bc \cos A + ca \cos B)$
Prove algebraically that in any triangle $ABC$ the following relation holds:
$a^2 + b^2 + c^2 = 2(ab \cos C + bc \cos A + ca \cos B)$
Circles and solids
Two intersecting circles form a triangle with their centers: the sides are the two radii and the distance between centers. The common chord is perpendicular to the line of centers and measures twice the altitude of that triangle.
For solids, the first step is to find a triangle inside the body. The diagonal of a rectangular prism with edges $a$, $b$, $c$ comes from Pythagoras twice: first the diagonal of the base, $\sqrt{a^2+b^2}$, and then that of the solid: $d=\sqrt{a^2+b^2+c^2}$. In a cube with edge $a$ it is $d=a\sqrt3$.
Two circles of radii 5 cm and 8 cm intersect at two points. The distance between their centers is 10 cm. Calculate the length of the common chord of both circles. (Hint:…
Two circles of radii 5 cm and 8 cm intersect at two points. The distance between their centers is 10 cm. Calculate the length of the common chord of both circles. (Hint: Use the cosine rule to find the central angle in the triangle formed by the radii and the line joining the centers, and from there calculate the altitude of the triangle).
Calculate the acute angle formed by two space diagonals of a cube. To do this, express the length of the diagonal in terms of edge $a$ and apply the cosine rule in the…
Calculate the acute angle formed by two space diagonals of a cube. To do this, express the length of the diagonal in terms of edge $a$ and apply the cosine rule in the triangle formed by the halves of two diagonals and one edge of the cube.