Lesson Proof of the Law of Cosines revisited
Algebra
->
Trigonometry-basics
-> Lesson Proof of the Law of Cosines revisited
Log On
Algebra: Trigonometry
Section
Solvers
Solvers
Lessons
Lessons
Answers archive
Answers
Source code of 'Proof of the Law of Cosines revisited'
This Lesson (Proof of the Law of Cosines revisited)
was created by by
ikleyn(52781)
:
View Source
,
Show
About ikleyn
:
<H3>Law of Cosines</H3> <TABLE cellspacing="10"> <TR> <TD> <B><U>Theorem (Law of Cosines)</U></B> <B>For any triangle, with the side lengths a, b, c and opposite angles {{{alpha}}}, {{{beta}}} and {{{gamma}}}</B> {{{c^2 = a^2 +b^2 - 2*a*b*cos(gamma)}}}, {{{b^2 = a^2 +c^2 - 2*a*c*cos(beta)}}}, {{{a^2 = b^2 +c^2 - 2*b*c*cos(alpha)}}}. <B>Figures 1a)</B> and <B>1b)</B> illustrate the Theorem, showing an acute and an obtuse triangles. The side <B>a</B> is opposite to the vertex <B>A</B> and the angle {{{alpha}}}. The side <B>b</B> is opposite to the vertex <B>B</B> and the angle {{{beta}}}. The side <B>c</B> is opposite to the vertex <B>C</B> and the angle {{{gamma}}}. As it is stated, the Theorem is valid for any triangle. </TD> <TD> {{{drawing( 200, 200, 0.5, 5.5, 0.5, 4.5, line( 1, 1, 5, 1 ), line( 1, 1, 4, 4 ), line( 5, 1, 4, 4), locate ( 1, 1, A), locate ( 4.2, 4, B), locate ( 5, 1, C), locate ( 4.7, 2.8, a), locate ( 2.0, 2.8, c), locate ( 3.0, 1, b), locate ( 1.5, 1.4, alpha), locate ( 3.8, 3.6, beta), locate ( 4.5, 1.4, gamma) )}}} <B>Figure 1a. Acute Triangle</B> </TD> <TD> {{{drawing( 300, 200, 0.5, 7.5, 0.5, 4.5, line( 1, 1, 5, 1 ), line( 1, 1, 7, 4 ), line( 5, 1, 7, 4), locate ( 1, 1, A), locate ( 7.2, 4, B), locate ( 5, 1, C), locate ( 6.3, 2.7, a), locate ( 3.7, 2.8, c), locate ( 3.0, 1, b), locate ( 1.8, 1.4, alpha), locate ( 6.3, 3.6, beta), locate ( 4.7, 1.4, gamma) )}}} <B>Figure 1b. Obtuse Triangle</B> </TD> </TR> </TABLE> <TABLE cellspacing="10"> <TR> <TD> <B><U>The Proof of the Theorem</U></B> First, we will prove the theorem for the <B>acute triangle</B>. Let us draw an altitude of the triangle from one vertex (shown as <B>B</B>) perpendicularly to the opposite side AC. This altitude <B>BD</B> is shown in red in <B>Figure 2</B>. Triangles <B>ADB</B> and <B>CDB</B> are the right triangles. Let us denote the segment lengths <B>h=BD</B>, <B>d=AD</B>, <B>e=CD</B> (<B>Figure 2</B>). From the triangle <B>ADB</B> {{{c^2 = d^2+h^2}}}. From the triangle <B>CDB</B> {{{a^2 = e^2+h^2}}}, hence {{{h^2 = a^2-e^2}}}. Substitute the last expression to the previous formula for {{{c^2}}} to exclude <B>h</B>. We get {{{c^2 = d^2+a^2-e^2}}}. Since {{{d = b-e}}}, we have {{{d^2 = (b-e)^2 = b^2 - 2*b*e + e^2}}}. Substitute this to the previous formula for {{{c^2}}}. We get {{{c^2 = b^2-2*b*e+e^2+a^2-e^2 = a^2+b^2-2*b*e}}}. From the right triangle <B>CDB</B> {{{e = a*cos(gamma)}}}. Substitute this to the previous formula for {{{c^2}}}. We get {{{c^2 = a^2+b^2-2*a*b*cos(gamma)}}}, which is the first of the three required equalities. The proof for the remaining two equalities is similar. So, we proved the theorem for the acute triangle. </TD> <TD> {{{drawing( 200, 200,-0.5, 4.5, -0.8, 3.2, line( 0, 0, 4, 0 ), line( 0, 0, 3, 3 ), line( 4, 0, 3, 3), locate ( 0, 0, A), locate ( 3.2, 3, B), locate ( 4, 0, C), locate ( 3.7, 1.8, a), locate ( 1.0, 1.8, c), locate ( 2.0, 0, b), locate ( 0.5, 0.4, alpha), locate ( 3.5, 0.4, gamma), red (line (3,3, 3,0)), locate (3, 0, D), locate ( 2.6, 1.2, h), line( 0, -0.4, 0, -0.7), line( 3, -0.4, 3, -0.7), line( 4, -0.4, 4, -0.7), line( 0.05, -0.55, 1.15, -0.55), locate ( 1.3, -0.4, d), line( 1.70, -0.55, 2.9, -0.55), line( 3.05, -0.55, 3.25, -0.55), locate ( 3.4, -0.4, e), line( 3.70, -0.55, 3.9, -0.55) )}}} <B>Figure 2. Acute Triangle</B> </TD> </TR> </TABLE> <TABLE cellspacing="10"> <TR> <TD> Now, we will prove the theorem for the <B>obtuse triangle</B> case. Let {{{gamma}}} be an <B>acute angle</B> of our triangle. Let us draw an altitude of the triangle from vertex <B>B</B> perpendicularly to the opposite side AC. This altitude <B>BD</B> is shown in red in <B>Figure 3</B>. Triangles <B>ADB</B> and <B>CDB</B> are the right triangles. Let us denote the segment lengths <B>h=BD</B>, <B>e=CD</B> (<B>Figure 3</B>). From the triangle <B>ADB</B> {{{c^2 = (b+e)^2+h^2 = b^2+2*b*e+e^2+h^2}}}. From the triangle <B>CDB</B> {{{a^2 = e^2+h^2}}}, hence {{{h^2 = a^2-e^2}}}. Substitute the last expression to the previous formula for {{{c^2}}} to exclude <B>h</B>. We get {{{c^2 = b^2+2*b*e+a^2}}}. From the right triangle <B>CDB</B> {{{e = a*cos(pi-gamma)= -a*cos(gamma)}}}. Note that we used here the equality {{{cos(pi-gamma)=-cos(gamma)}}} for the complimentary angle. Substitute the lasr expression for <B>e</B> to the previous formula for {{{c^2}}}. We get {{{c^2 = a^2+b^2-2*a*b*cos(gamma)}}}, which is the first of three required equality. Since the remaining two angles in our triangle are acute, the proofs for them are similar to that was done above for the <B>acute triangle</B>. Thus, we proved the theorem for the obtuse triangle. </TD> <TD> {{{drawing( 300, 200,-0.5, 6.5,-0.5, 3.5, line( 0, 0, 4, 0 ), line( 0, 0, 6, 3 ), line( 4, 0, 6, 3), locate ( 0, 0, A), locate ( 6.2, 3, B), locate ( 4, 0, C), locate ( 5.2, 1.8, a), locate ( 2.7, 1.8, c), locate ( 2.0, 0, b), locate ( 0.8, 0.4, alpha), locate ( 5.3, 2.6, beta), locate ( 3.7, 0.4, gamma), line( 4, 0, 6, 0 ), red(line( 6, 3, 6, 0 )), locate ( 6, 0, D), locate ( 6.1, 1.8, h), locate ( 6.0, 0.0, D), locate ( 5.0, 0, e) )}}} <B>Figure 3. Obtuse Triangle</B> </TD> </TR> </TABLE> The last remaining case to prove is the <B>right triangle</B>. If the angle <B>ACB</B> of the triangle <B>ABC</B> is the right angle with the opposite side <B>c</B>, then the <B>Law of Cosines</B> is {{{c^2 = a^2 + b^2}}}, but this is exactly the Pythagorean theorem. This proves the <B>Law of Cosines</B> validity in this case. Since the remaining two angles in our triangle are acute, the proofs for them are similar to that was done above for the <B>acute triangle</B>. Thus, the <B>Law of Cosines Theorem</B> is proved for all cases. Examples of how to use of the <B>Law of Cosines</B> in solving triangles are given in the lesson <A HREF = http://www.algebra.com/algebra/homework/Trigonometry-basics/Solve-triangles-using-Law-of-Cosines.lesson> Solve triangles using Law of Cosines</A> in this module. For navigation over the lessons on Properties of Triangles use this file/link <A HREF=https://www.algebra.com/algebra/homework/Triangles/Compendium-of-properties-of-triangles.lesson>Properties of Trianles</A>. To navigate over all topics/lessons of the Online Geometry Textbook use this file/link <A HREF=https://www.algebra.com/algebra/homework/Triangles/GEOMETRY-your-online-textbook.lesson>GEOMETRY - YOUR ONLINE TEXTBOOK</A>.