HOME David Terr Ph.D. Math, UC Berkeley 6.2. The Law of Cosines Besides the law of sines, the law of cosines is another very useful trigonometric theorem. It can either be used directly to determine the length of a side of a triangle, given the lengths of its other two sides and the opposite angle, or else it can be used indirectly to determine the angles of a triangle, given the lengths of its sides. We state and prove the Law of Cosines below. Theorem 6.2.1: Consider the triangle shown below with angles A, B, and C and opposite sides of length a, b, and c respecitvely. Then we have (6.2.2) a2 = b2 + c2 - 2bc cos A Proof: Consider the diagram below, which is the same diagram but with the altitude h included. The altitude divides the side of length b into two segments, one of length c cos A and the other of length b - c cos A = a cos C as shown. Now by applying the Pythagorean theorem to both right triangles shown, we have h2 = c2 - (c cos A)2 = a2 - (b - c cos A)2. Expanding the right side, we find c2 - (c cos A)2 = a2 - b2 + 2bc cos A - (c cos A)2, whence c2 = a2 - b2 + 2bc cos A. Finally, solving for a2, we find a2 = b2 + c2 - 2bc cos A. QED It should be noted that the Law of Cosines implies two additional equations, namely (6.2.3) b2 = c2 + a2 - 2ca cos B and (6.2.4) c2 = a2 + b2 - 2ab cos C Both of these formulas follow easily from (6.2.2) merely by relabeling the sides and angles of the triangle in the figure. Note that (6.2.4) reduces to the Pythagorean Theorem in the case where C = 90°, since in this case we have cos C = 0. Solving (6.2.2) for A, we find (6.2.5) A = arccos((b2 + c2 - a2) / 2bc) Similarly, solving (6.2.3) for B and (6.2.4) for C yield the equations (6.2.6) B = arccos((c2 + a2 - b2) / 2ca) (6.2.7) C = arccos((a2 + b2 - c2) / 2ab) These equations may be used to find the angles of a triangle with given side lengths.   Example 1: A triangle has sides of length 3 and 4, which form an angle of 80°. Find the length of the remaining side (opposite the 80° angle). Solution: We let b = 3, c = 4, and A = 80°. By (6.2.2), we find a2 = b2 + c2 - 2bc cos A = 32 + 42 - (2)(3)(4) cos 80° = 25 - (24)(0.174) = 20.83 whence a = √20.83 = 4.56.   Example 2: A triangle has sides of length 4, 5, and 6. Use the Law of Cosines to determine its angles. Solution: For this problem we have a = 4, b = 5, and c = 6. Solving (6.2.5) for A, we find A = arccos((52 + 62 - 42) / (2)(5)(6)) = arccos(4/60) = arccos(3/4) = 41.4°. Solving (6.2.6) and (6.2.7) for B and C respectively yields B = arccos((62 + 42 - 52) / (2)(6)(4)) = arccos(27/48) = arccos(9/16) = 55.8°. C = arccos((42 + 52 - 62) / (2)(4)(5)) = arccos(5 / 40) = arccos(1/8) = 82.8°. Copyright © 2007-2009 - MathAmazement.com. All Rights Reserved.