Nepedia
Back to Discover
Advanced Reader
🔢

Law of cosines

math Maturity 7-9 Next article →

The law of cosines is a fundamental principle in trigonometry. It provides a mathematical relationship between the side lengths of a triangle and the cosine of one of its angles. This rule is essential for solving triangles, which means finding unknown side lengths or interior angles. While the famous Pythagorean theorem is limited to right triangles, the law of cosines is much more versatile. It applies to any triangle, whether it is acute, right, or obtuse.

Triangle with notations 2
Triangle with notations 2

To understand how the law works, consider its mechanism in solving for missing values. If you know the lengths of two sides and the angle between them, you can calculate the third side. This is often called the side-angle-side case. If you know all three side lengths, you can use the formula to find any of the three angles.

triangle-with-an-unknown-angle-or-side
triangle-with-an-unknown-angle-or-side

The formula can even be used to find a third side if you know two sides and an angle that is not between them. In this specific case, the math can lead to two, one, or zero possible positive solutions for the side length. This variation is related to what mathematicians call the side-side-angle congruence ambiguity.

There are different ways to categorize the triangles used in this law. An acute triangle has all angles less than 90 degrees. An obtuse triangle has one angle greater than 90 degrees. A right triangle has exactly one 90-degree angle. The law of cosines handles these cases through the properties of the cosine function. For an acute angle, the cosine value is positive. For an obtuse angle, the cosine value is negative.

Obtuse Triangle With Altitude ZP
Obtuse Triangle With Altitude ZP

When the angle is exactly 90 degrees, the cosine is zero. In this specific instance, the law of cosines simplifies perfectly into the Pythagorean theorem.

Law of cosines in plane trigonometry
Law of cosines in plane trigonometry

The history of this concept spans thousands of years and many cultures. Around 300 BC, the Greek mathematician Euclid described a geometric version of this rule in his work, *Elements*. He did not use modern algebraic notation, but instead expressed the idea through the areas of rectangles. Later, Hellenistic trigonometry and Indian mathematicians developed the concepts of sine and cosine. In the 11th century, al-Bīrūnī used these trigonometric principles to solve astronomical problems.

Ptolemy cos
Ptolemy cos

By the 13th century, the Persian mathematician Naṣīr al-Dīn al-Ṭūsī provided a systematic way to solve triangles by dropping a perpendicular line to create right triangles.

Triangle with trigonometric proof of the law of cosines
Triangle with trigonometric proof of the law of cosines

Significant contributions continued through the 15th century with Jamshīd al-Kāshī. He was a Persian mathematician known for computing highly accurate trigonometric tables. He described methods for solving triangles that were later consolidated into the modern formula. Because of his influence, the law of cosines is sometimes called the *théorème d'Al-Kashi* in France.

Law of cosines following al-Kashi
Law of cosines following al-Kashi

In 1464, the mathematician Regiomontanus published a comprehensive survey of trigonometry that included these methods. It was not until the 16th century that François Viète began using algebraic notation for such rules. By the start of the 19th century, the law reached its current symbolic form.

Modern mathematicians use various methods to prove the law of cosines. One common approach uses the Pythagorean theorem by dropping an altitude to create two right triangles. Another method uses coordinate geometry. By placing a triangle on a Cartesian coordinate system, one can use the distance formula to derive the law.

Triangle-law-of-cosines-proof
Triangle-law-of-cosines-proof

This coordinate method is particularly useful because it does not require treating acute and obtuse triangles as separate cases. There are even proofs involving the areas of shapes, where the law is demonstrated by cutting and pasting geometric pieces.

law of cosines with acute angles
law of cosines with acute angles

The law of cosines connects many different branches of mathematics. It serves as a bridge between geometry and algebra. It also links trigonometry to the study of vectors through the dot product. Furthermore, it relates to the study of circles via Ptolemy's theorem. Even in advanced fields like spherical trigonometry, versions of this law are used to understand shapes on a curved surface. This interconnectedness makes the law of cosines a vital tool in both theoretical math and practical science.

667 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (18)
File:Triangle with notations 2.svg
Triangle with notations 2.svg
File:triangle-with-an-unknown-angle-or-side.svg
triangle-with-an-unknown-angle-or-side.svg
File:SSA triangle ambiguity.png
SSA triangle ambiguity.png
File:Obtuse Triangle With Altitude ZP2.svg
Obtuse Triangle With Altitude ZP2.svg
File:Law of cosines following al-Kashi.png
Law of cosines following al-Kashi.png
File:Law of cosines in plane trigonometry.svg
Law of cosines in plane trigonometry.svg
File:Obtuse Triangle With Altitude ZP.svg
Obtuse Triangle With Altitude ZP.svg
File:Triangle with trigonometric proof of the law of cosines.svg
Triangle with trigonometric proof of the...
File:Triangle-with-cosines.svg
Triangle-with-cosines.svg
File:Triangle-law-of-cosines-proof.png
Triangle-law-of-cosines-proof.png
File:Ptolemy cos.svg
Ptolemy cos.svg
File:law of cosines with acute angles.svg
law of cosines with acute angles.svg

+ 6 more

More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.