The Law of Cosines
In Major League Baseball, home plate is 90 ft from first base, and the pitcher's rubber is 60.5 ft from home plate, on the line toward second base. How far is the pitcher from first base? There is no right angle in that triangle, so the Pythagorean Theorem fails. The Law of Sines also fails, because you don't know any side together with its opposite angle. You need a new tool: the Law of Cosines.
The Law of Cosines
The Law of Cosines works in any triangle. It is the Pythagorean Theorem with a correction term for angles that are not $90^\circ$.
Label the triangle the standard way: side $a$ is opposite angle $A$, side $b$ is opposite angle $B$, and side $c$ is opposite angle $C$.
If $C = 90^\circ$, then $\cos C = 0$ and the formula becomes $c^2 = a^2 + b^2$, the Pythagorean Theorem. For any other angle, the term $-2ab\cos C$ adjusts the answer:
-
If $C$ is acute, $\cos C > 0$, so $c^2 < a^2 + b^2$.
-
If $C$ is obtuse, $\cos C < 0$, so $c^2 > a^2 + b^2$.
For exact answers, you need the cosines of the special angles:
| $\theta$ | $30^\circ$ | $45^\circ$ | $60^\circ$ | $90^\circ$ | $120^\circ$ | $135^\circ$ | $150^\circ$ |
|---|---|---|---|---|---|---|---|
| $\cos\theta$ | $\frac{\sqrt3}{2}$ | $\frac{\sqrt2}{2}$ | $\frac12$ | $0$ | $-\frac12$ | $-\frac{\sqrt2}{2}$ | $-\frac{\sqrt3}{2}$ |
In a triangle $ABC$, the sides measure $a=10$ in, $b=12$ in and the included angle is $C=45^\circ$. Set up the law of cosines to calculate the exact value of the side…
In a triangle $ABC$, the sides measure $a=10$ in, $b=12$ in and the included angle is $C=45^\circ$. Set up the law of cosines to calculate the exact value of the side $c$.
In an isosceles triangle $ABC$, the sides $a$ and $b$ measure 6 in each, and the unequal angle $C=30^\circ$. Calculate the exact value of the side $c$, leaving the…
In an isosceles triangle $ABC$, the sides $a$ and $b$ measure 6 in each, and the unequal angle $C=30^\circ$. Calculate the exact value of the side $c$, leaving the result in radical form.
Finding a Side: Two Sides and the Included Angle
When you know two sides and the angle between them (SAS), substitute into the formula and take a square root. Now we can answer the baseball question.
In a triangle $ABC$, the sides $b=5$ in, $c=8$ in and the included angle $A=60^\circ$ are known. Calculate the length of the side $a$.
In a triangle $ABC$, the sides $b=5$ in, $c=8$ in and the included angle $A=60^\circ$ are known. Calculate the length of the side $a$.
A parallelogram has two adjacent sides measuring 4 in and 6 in. If the included angle between them is $120^\circ$, calculate the length of the longer diagonal.
A parallelogram has two adjacent sides measuring 4 in and 6 in. If the included angle between them is $120^\circ$, calculate the length of the longer diagonal.
Calculate the distance between two inaccessible points $A$ and $B$, knowing that from an observation point $C$ the distances $CA = 15$ ft and $CB = 20$ ft have been…
Calculate the distance between two inaccessible points $A$ and $B$, knowing that from an observation point $C$ the distances $CA = 15$ ft and $CB = 20$ ft have been measured, and the visual angle $ACB$ is $40^\circ$.
Finding an Angle: Three Sides
If you know all three sides (SSS), solve the law for the cosine of the angle you want.
In a triangle $ABC$, the lengths of the sides are $a=3$ in, $b=5$ in and $c=7$ in. Calculate the size of the angle $C$.
In a triangle $ABC$, the lengths of the sides are $a=3$ in, $b=5$ in and $c=7$ in. Calculate the size of the angle $C$.
Determine the largest angle of a triangle whose sides measure 4 in, 5 in and 6 in.
Determine the largest angle of a triangle whose sides measure 4 in, 5 in and 6 in.
A triangular roof truss has sides of 5 ft, 7 ft and 9 ft. Calculate the angle opposite the longest side.
A triangular roof truss has sides of 5 ft, 7 ft and 9 ft. Calculate the angle opposite the longest side.
Distances, Bearings, and Forces
The Law of Cosines is the tool when you can measure two distances and the angle between them, but not the distance you need.
Bearings
In navigation, a bearing is an angle measured clockwise from north, usually written with three digits. A bearing of $040^\circ$ points $40^\circ$ east of north. A bearing of $115^\circ$ points a little south of east.
The angle between the two paths is the difference of the bearings: $115^\circ - 40^\circ = 75^\circ$. That is the included angle in the Law of Cosines.
Forces
Two forces pulling on the same point form a parallelogram. The resultant is the diagonal. The angle $\theta$ between the forces is measured at the point where they act. The triangle you use, with the forces placed head to tail, has an interior angle of $180^\circ - \theta$.
To measure the distance across a lake between points $A$ and $B$, a surveyor stands at point $C$. They measure the distances $CA = 125,5$ ft and $CB = 180,2$ ft, and the…
To measure the distance across a lake between points $A$ and $B$, a surveyor stands at point $C$. They measure the distances $CA = 125,5$ ft and $CB = 180,2$ ft, and the angle $ACB = 75^\circ$. Calculate the distance $AB$.
Two planes leave the same airport at the same time. Plane A flies at $800$ mph on a bearing of $040^\circ$ and plane B flies at $650$ mph on a bearing of $115^\circ$.…
Two planes leave the same airport at the same time. Plane A flies at $800$ mph on a bearing of $040^\circ$ and plane B flies at $650$ mph on a bearing of $115^\circ$. What straight-line distance separates them after 1.5 hours of flight?
Two forces of 45 N and 60 N act on the same material point, forming an angle of $50^\circ$ between them. Calculate the magnitude of the resultant force.
Two forces of 45 N and 60 N act on the same material point, forming an angle of $50^\circ$ between them. Calculate the magnitude of the resultant force.
Parallelograms and Chords
Many geometry problems hide a triangle with two known sides and an included angle. Your job is to find it.
Parallelogram from its diagonals
The diagonals of a parallelogram bisect each other. If the diagonals meet at $O$, each side of the parallelogram is the third side of a triangle whose other sides are half-diagonals. Some problems call a parallelogram with unequal adjacent sides a rhomboid.
The two triangles touching a given side use angles that add to $180^\circ$ at $O$. So the two different side lengths come from $\theta$ and $180^\circ - \theta$.
Chords
A chord that spans a central angle $\theta$ in a circle of radius $r$ is the base of an isosceles triangle with two sides $r$. The Law of Cosines gives $c^2 = r^2 + r^2 - 2r^2\cos\theta = 2r^2(1 - \cos\theta)$.
The common chord of two circles
When two circles intersect at points $P$ and $Q$, the segment $PQ$ is the common chord. Its two endpoints are each the same distance from a given center, so the line of centers is the perpendicular bisector of $PQ$. In the triangle formed by the two centers and $P$, the height onto the line of centers is half the chord.
The diagonals of a rhomboid measure 12 in and 16 in, and intersect forming an angle of $65^\circ$. Calculate the length of the four sides of the rhomboid.
The diagonals of a rhomboid measure 12 in and 16 in, and intersect forming an angle of $65^\circ$. Calculate the length of the four sides of the rhomboid.
In a circle of 10 in radius, a chord subtends a central angle of $100^\circ$. Calculate the length of the chord using the law of cosines in the triangle formed by the…
In a circle of 10 in radius, a chord subtends a central angle of $100^\circ$. Calculate the length of the chord using the law of cosines in the triangle formed by the radii and the chord.
Two circles of radii 5 in and 8 in intersect at two points. The distance between their centers is 10 in. Calculate the length of the common chord to both circles. (Hint:…
Two circles of radii 5 in and 8 in intersect at two points. The distance between their centers is 10 in. Calculate the length of the common chord to both circles. (Hint: Use the law of cosines to find the central angle in the triangle formed by the radii and the line of centers, and from there obtain the height of the triangle).
Medians, Cyclic Quadrilaterals, and Cubes
The strategy for harder problems is to apply the Law of Cosines twice: once to find an angle, then again in a different triangle that shares that angle (or its supplement).
Medians
A median joins a vertex to the midpoint of the opposite side. To find a median, find an angle at one end of that side, then use it in the smaller triangle.
Cyclic quadrilaterals
A quadrilateral inscribed in a circle is called cyclic. Its opposite angles are supplementary: $B + D = 180^\circ$. So $\cos D = -\cos B$. Cut the quadrilateral with a diagonal; the diagonal is a side in two triangles, one containing $B$ and the other containing $D$. Write the law of cosines for the diagonal in both triangles and set them equal.
Space diagonals of a cube
In a triangle $ABC$, the sides measure $a=8$ in, $b=10$ in and $c=12$ in. Calculate the exact length of the median $m_a$ drawn from the vertex $A$ to the midpoint of the…
In a triangle $ABC$, the sides measure $a=8$ in, $b=10$ in and $c=12$ in. Calculate the exact length of the median $m_a$ drawn from the vertex $A$ to the midpoint of the side $a$.
An inscribable (cyclic) quadrilateral $ABCD$ has sides of lengths $AB=3$ in, $BC=4$ in, $CD=5$ in and $DA=6$ in. Taking into account the properties of opposite angles in…
An inscribable (cyclic) quadrilateral $ABCD$ has sides of lengths $AB=3$ in, $BC=4$ in, $CD=5$ in and $DA=6$ in. Taking into account the properties of opposite angles in a cyclic quadrilateral, set up a system using the law of cosines in the triangles $ABC$ and $ADC$ to calculate the exact length of the diagonal $AC$.
Calculate the acute angle formed by two main diagonals of a cube. To do this, express the length of the diagonal in terms of the edge $a$ and apply the law of cosines in…
Calculate the acute angle formed by two main diagonals of a cube. To do this, express the length of the diagonal in terms of the edge $a$ and apply the law of cosines in the triangle formed by the halves of two diagonals and an edge of the cube.
Equations and Proofs
Sometimes the unknown is not a number but a variable in the side lengths, or you need to show a relationship holds for every triangle. The Law of Cosines turns geometry into algebra.
The triangle's labels are arbitrary, so the same argument works for every side. Relabeling the vertices gives two more identities, one for each of the other sides:
$$a = b\cos C + c\cos B \qquad\text{and}\qquad b = c\cos A + a\cos C.$$You can combine all three to prove identities about the sums of squares of the sides.
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.
Prove algebraically that in any triangle $ABC$ the following relationship 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 relationship holds:
$a^2 + b^2 + c^2 = 2(ab \cos C + bc \cos A + ca \cos B)$
A triangle has a fixed base of $c = 10$ in and a constant perimeter of $p = 26$ in. If the angle $C$ opposite the base measures $60^\circ$, set up a system of equations…
A triangle has a fixed base of $c = 10$ in and a constant perimeter of $p = 26$ in. If the 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$.