Skip to main content
K12 LibreTexts

4.1.6: Law of Cosines

  • Page ID
    4158
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Find unknown side given two sides and included angle.

    Sides of an Oblique Triangle

    You are playing a game called ‘‘Over the Line’’, where you stand at one corner of a triangle and hit a ball. The field looks like this:

    f-d_c651de3d3063ac67be9a414989ed5db878256f28afb83fda95197660+IMAGE_TINY+IMAGE_TINY.jpg
    Figure \(\PageIndex{1}\)

    Points are scored by hitting the ball so that it lands beyond the first line in the triangle, but before the second line.

    Given that the angle on the left hand side of the triangle is \(15^{\circ}\), and the length of the sides of the triangle going to the first scoring line are 30 yards, can you calculate the length of the line you have to hit the ball past to score?

    Finding the Sides of an Oblique Triangle

    This lesson takes ideas that have only been applied to right triangles and interprets them so that they can be used for any type of triangle.

    First, the laws of sines and cosines take the Pythagorean Theorem and ratios and apply them to any triangle.

    The Law of Cosines is a generalization of the Pythagorean Theorem, where the angle C is the angle between the two given sides of a triangle:

    \(c^2=a^2+b^2−2(a)(b)\cos C\)

    You'll notice that if this were a right triangle, \(\cos C=\cos 90^{\circ}=0\), and so the third term would disappear, leaving the familiar Pythagorean Theorem.

    One case where we can use the Law of Cosines is when we know two sides and the included angle in a triangle (SAS) and want to find the third side.

    Solving for Unknown Values

    1. Using \(\Delta DEF\), \(\angle E=12^{\circ}\), \(d=18\), and \(f=16.8\). Find \(e\).

    f-d_50182bed24a16f1ce9420edb6cd76c0eb553002e80ebafedd246f2f4+IMAGE_TINY+IMAGE_TINY.jpg
    Figure \(\PageIndex{2}\)

    Since \(\Delta DEF\) isn’t a right triangle, we cannot use the Pythagorean Theorem or trigonometry functions to find the third side. However, we can use our newly derived Law of Cosines.

    \(\begin{aligned} e^2&=18^2+16.8^2−2(18)(16.8)\cos 12 && \text{ Law of Cosines} \\ e^2 &=324+282.24−2(18)(16.8)\cos 12 && \text{ Simplify squares} \\ e^2&=324+282.24−591.5836689 && \text{ Multiply} \\ e^2&=14.6563311 && \text{ Add and subtract from left to right} \\ e&\approx 3.8 && \text{ Square root} \end{aligned}\)

    ∗Note that the negative answer is thrown out as having no geometric meaning in this case.

    2. An architect is designing a kitchen for a client. When designing a kitchen, the architect must pay special attention to the placement of the stove, sink, and refrigerator. In order for a kitchen to be utilized effectively, these three amenities must form a triangle with each other. This is known as the “work triangle.” By design, the three parts of the work triangle must be no less than 3 feet apart and no more than 7 feet apart. Based on the dimensions of the current kitchen, the architect has determined that the sink will be 3.6 feet away from the stove and 5.7 feet away from the refrigerator. If the sink forms a \(103^{\circ}\) angle with the stove and the refrigerator, will the distance between the stove and the refrigerator remain within the confines of the work triangle?

    f-d_36f1c49d559e5e5300f7401201af146c94ce7fb33a47129e26d1e060+IMAGE_TINY+IMAGE_TINY.jpg
    Figure \(\PageIndex{3}\)

    In order to find the distance from the sink to the refrigerator, we need to find side \(x\). To find side \(x\), we will use the Law of Cosines because we are dealing with an obtuse triangle (and thus have no right angles to work with). We know the length two sides: the sink to the stove and the sink to the refrigerator. We also know the included angle (the angle between the two known lengths) is \(103^{\circ}\). This means we have the SAS case and can apply the Law of Cosines.

    \(\begin{aligned} x^2 &=3.6^2+5.7^2−2(3.6)(5.7)\cos 103 && \text{ Law of Cosines} \\ x^2 &=12.96+32.49−2(3.6)(5.7)\cos 103 && \text{ Simplify squares} \\ x^2 &=12.96+32.49+9.23199127 && \text{ Multiply} \\ x^2 &=54.68199127 && \text{ Evaluate} \\ x &\approx 7.4 && \text{ Square root} \end{aligned}\)

    No, this triangle does not conform to the definition of a work triangle. The sink and the refrigerator are too far apart by 0.4 feet.Solve for \(j\).

    3. Using \(\Delta JKL\), \(\angle J=2^{\circ}\), \(l=25\), and \(k=27\). Find \(j\).

    Since \(\Delta JKL\) isn’t a right triangle, we cannot use the Pythagorean Theorem or trigonometry functions to find the third side. However, we can use our newly derived Law of Cosines.

    \(\begin{aligned} j^2 &=25^2+27^2−2(25)(27)\cos 2 && \text{ Law of Cosines} \\ j^2&=625+729−2(25)(27)\cos 2 && \text{ Simplify squares} \\ j^2 &=625+729−1349.18 && \text{ Multiply} \\ j^2&=4.82 && \text{ Add and subtract from left to right} \\ j &\approx 2.20 && \text{ Square root} \end{aligned}\)

    ∗Note that the negative answer is thrown out as having no geometric meaning in this case.

    Example \(\PageIndex{1}\)

    Earlier, you were asked to calculate the length of the line you have to hit the ball past to score.

    Solution

    Since you know that the length of each of the other 2 sides is 30 yards, and the angle is \(15^{\circ}\), you can use the Law of Cosines to find the length of the third side.

    \(\begin{aligned} c^2&=a^2+b^2−2ab\cos \theta \\ c^2&=30^2+30^2−(2)(30)(30)\cos 15^{\circ} \\ c^2&=900+900−1738.67 \\ c^2&=1800−1738.67 \\ c^2&=61.33c\approx 7.83 \end{aligned}\)

    Example \(\PageIndex{2}\)

    Find side "\(a\)" in this triangle, where \(\angle A=50^{\circ}\), \(b=8\), \(c=11\)

    f-d_7c3d72174bc8a4351626bc82583b2899667b3f449db8f4540385ac25+IMAGE_TINY+IMAGE_TINY.jpg
    Figure \(\PageIndex{4}\)

    Solution

    \(a^2=8^2+11^2−2\cdot 8\cdot 11\cdot \cos 50^{\circ}\), \(a\approx 8.5\)

    Example \(\PageIndex{3}\)

    Find side "\(l\)" in this triangle where \(\angle L=79.5^{\circ}\), \(m=22.4\), \(p=13.17\)

    f-d_287585166e9dd1c346842f026e55bac37c670032b0864cb29a72e939+IMAGE_TINY+IMAGE_TINY.jpg
    Figure \(\PageIndex{5}\)

    Solution

    \(l^2=22.4^2+13.17^2−2\cdot 22.4\cdot 13.17\cdot \cos 79.5^{\circ}\), \(l\approx 23.8\)

    Example \(\PageIndex{4}\)

    Find side "\(b\)" in this triangle where \(\angle B=67.2^{\circ}\), \(d=43\), \(e=39\)

    f-d_a6b0e544776ab39ed69fe8baf5e9158780ca501ace3c4d404a03623e+IMAGE_TINY+IMAGE_TINY.jpg
    Figure \(\PageIndex{6}\)

    Solution

    \(b^2=39^2+43^2−2\cdot 39\cdot 43\cdot \cos 67.2^{\circ}\), \(b\approx 45.5\)

    Review

    1. State the Law of Cosines.

    For each triangle below, state the values of \(a\), \(b\), and \(c\).


    1. f-d_1866fea5ddb4fecd8fc8c30dfe1995a88cc6b5d49040e2488023be5c+IMAGE_TINY+IMAGE_TINY.png
      Figure \(\PageIndex{7}\)

    2. f-d_5c252a3d7d9948af388da049f5c499e021a445e5d3926a117ef55089+IMAGE_TINY+IMAGE_TINY.png
      Figure \(\PageIndex{8}\)

    3. f-d_78b2f9b7a8ee921c632e883d8e4aabc2782c0e628fa0890281591535+IMAGE_TINY+IMAGE_TINY.png
      Figure \(\PageIndex{9}\)

    4. f-d_ec9ba4270c2b6a0602a02d4d34daba743e3f2a51ce813196a88a3ffe+IMAGE_TINY+IMAGE_TINY.png
      Figure \(\PageIndex{10}\)

    5. f-d_d1e382aaae511c02b86d0ad8b97070c98b838b418502950e2c8c113e+IMAGE_TINY+IMAGE_TINY.png
      Figure \(\PageIndex{11}\)

    6. f-d_1c9acf952cfdb70cfa90b9b16614ad4659829b45bc70f9c22574dd41+IMAGE_TINY+IMAGE_TINY.png
      Figure \(\PageIndex{12}\)

    7. f-d_b02a0c410e73f281269864f92553d458c9cc647eb68712dbc36a952c+IMAGE_TINY+IMAGE_TINY.png
      Figure \(\PageIndex{13}\)

    Now, for each triangle, solve for the missing side using the Law of Cosines.


    1. f-d_1866fea5ddb4fecd8fc8c30dfe1995a88cc6b5d49040e2488023be5c+IMAGE_TINY+IMAGE_TINY.png
      Figure \(\PageIndex{14}\)

    2. f-d_5c252a3d7d9948af388da049f5c499e021a445e5d3926a117ef55089+IMAGE_TINY+IMAGE_TINY.png
      Figure \(\PageIndex{15}\)

    3. f-d_78b2f9b7a8ee921c632e883d8e4aabc2782c0e628fa0890281591535+IMAGE_TINY+IMAGE_TINY.png
      Figure \(\PageIndex{16}\)

    4. f-d_ec9ba4270c2b6a0602a02d4d34daba743e3f2a51ce813196a88a3ffe+IMAGE_TINY+IMAGE_TINY.png
      Figure \(\PageIndex{17}\)

    5. f-d_d1e382aaae511c02b86d0ad8b97070c98b838b418502950e2c8c113e+IMAGE_TINY+IMAGE_TINY.png
      Figure \(\PageIndex{18}\)

    6. f-d_1c9acf952cfdb70cfa90b9b16614ad4659829b45bc70f9c22574dd41+IMAGE_TINY+IMAGE_TINY.png
      Figure \(\PageIndex{19}\)

    7. f-d_b02a0c410e73f281269864f92553d458c9cc647eb68712dbc36a952c+IMAGE_TINY+IMAGE_TINY.png
      Figure \(\PageIndex{20}\)
    8. Prove that the Law of Cosines is equivalent to the Pythagorean Theorem for all right triangles.

    Review (Answers)

    To see the Review answers, open this PDF file and look for section 5.1.

    Vocabulary

    Term Definition
    Included Angle The included angle in a triangle is the angle between two known sides.
    law of cosines The law of cosines is a rule relating the sides of a triangle to the cosine of one of its angles. The law of cosines states that \(c^2=a^2+b^2−2ab\cos C\), where \(C\) is the angle across from side \(c\).
    Oblique Triangle An oblique triangle is a triangle without a right angle as one of its internal angles.
    Side Angle Side Triangle A side angle side triangle is a triangle where two of the sides and the angle between them are known quantities.

    Additional Resources

    Video: Example: Application of the Law of Cosine

    Practice: Law of Cosines


    This page titled 4.1.6: Law of Cosines is shared under a CK-12 license and was authored, remixed, and/or curated by CK-12 Foundation via source content that was edited to the style and standards of the LibreTexts platform.

    CK-12 Foundation
    LICENSED UNDER
    CK-12 Foundation is licensed under CK-12 Curriculum Materials License
    • Was this article helpful?