Back to homeMathematics · High School Year 2 · Physics-Math · Change subject
Start for free
Prep 2 Tech · Mathematics
Trigonometry · Trigonometry

Law of Cosines

Before you start, make sure you know: Pythagorean theorem (Secondary Year 3)

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.

Triangle ABC with sides a, b, c and angle C at the top vertex, opposite side c, to state the law of cosines. A B C c b a
Practice★☆☆Not started
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$.

Solve
Practice★☆☆Not started
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$.

C B A a = 10 b = 12 c = ? 45°
Solve

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.

Parallelogram with sides of 4 and 6 centimeters and an obtuse angle of 120 degrees; its longer diagonal d joins the two acute vertices. 120° 4 6 d

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.

Practice★☆☆Not started
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.

Solve
Practice★☆☆Not started
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.

Solve
Practice★★☆Not started
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.

Solve

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).

Triangle with sides 3, 5, and 7 centimeters with the unknown angle C opposite the longest side. 7 3 5 C = ?
Practice★☆☆Not started
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$.

Solve
Practice★☆☆Not started
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.

Solve
Practice★★☆Not started
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.

Solve

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.

Two distances measured from a point C to find the inaccessible distance between A and B. 40° A B C 15 m 20 m AB = ?

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.

Practice★☆☆Not started
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$.

Solve
Practice★★☆Not started
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$.

C B A 180.2 m 125.5 m d = ? 75°
Solve
Practice★★☆Not started
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?

Solve

Tougher problems: equations

Here the law is combined with algebra: setting up an equation with unknown $x$ or solving a system.

Practice★★★Not started
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.

Solve
Practice★★★Not started
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.

Solve
Practice★★★Not started
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$.

Solve

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.

Triangle ABC with the median from A to the midpoint M of side BC, which divides it into two triangles. B C A M a/2 a/2 m
Practice★★☆Not started
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.

Solve
Practice★★★Not started
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$.

Solve
Practice★★★Not started
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$.

A B C D 3 4 5 6 x = ?
Solve

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$.

Triangle ABC with the altitude from C landing at H on AB; AH measures b cos A and HB measures a cos B. A B C H b cos A a cos B
Practice★★★Not started
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)$

Solve

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.

Two circles intersecting at P and Q; the common chord PQ is perpendicular to the line of centers O1 O2. O₁ O₂ P Q

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$.

Practice★★★Not started
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).

Solve
Practice★★★Not started
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.

Solve

Summary

See all the exercises in this section