# Cosine law

The cosine law is one of the fundamental theorems of geometry and here belongs to the field of trigonometry . It is closely related to the Pythagorean theorem .

The law of cosines is very easy to formulate for plane triangles ; for spherical ones it requires six trigonometric functions . In both cases, it contains three identity equations that represent the relationships between the lengths of the sides of triangles and the cosines of their angles .

## Theorem of cosines for plane triangles

### General formulation

Designations in a triangle

For the three sides , and of a triangle, as well as the angle opposite the side (i.e. the angle between the sides and ) : ${\ displaystyle a}$${\ displaystyle b}$${\ displaystyle c}$${\ displaystyle c}$${\ displaystyle a}$${\ displaystyle b}$${\ displaystyle \ gamma}$

${\ displaystyle c ^ {2} = a ^ {2} + b ^ {2} -2 \ cdot a \ cdot b \ cdot \ cos \ gamma}$

Inversion for the angle:

${\ displaystyle \ cos \ gamma = {\ frac {a ^ {2} + b ^ {2} -c ^ {2}} {2 \ cdot a \ cdot b}}}$

The same applies to the other angles:

${\ displaystyle b ^ {2} = a ^ {2} + c ^ {2} -2 \ cdot a \ cdot c \ cdot \ cos \ beta}$
${\ displaystyle a ^ {2} = b ^ {2} + c ^ {2} -2 \ cdot b \ cdot c \ cdot \ cos \ alpha}$

### Equivalent formulation

The three identity equations mentioned above are in turn consequences of the following three cosine formulas and, in the context of trigonometry of the Euclidean plane, are even equivalent to

${\ displaystyle a = b \ cdot \ cos \ gamma + c \ cdot \ cos \ beta}$
${\ displaystyle b = c \ cdot \ cos \ alpha + a \ cdot \ cos \ gamma}$
${\ displaystyle c = a \ cdot \ cos \ beta + b \ cdot \ cos \ alpha}$

These formulas are summarized under the keyword projection sentence or projection sentences.

### The Pythagorean theorem as a special case of the cosine law

With , i.e. for a right triangle , applies . This results in the Pythagorean theorem as a special case of the cosine law in a right triangle : ${\ displaystyle \ textstyle \ gamma = 90 ^ {\ circ} = {\ frac {\ pi} {2}}}$${\ displaystyle \ textstyle \ cos \ gamma = \ cos {\ frac {\ pi} {2}} = 0}$

${\ displaystyle c ^ {2} = a ^ {2} + b ^ {2}}$

The cosine law therefore represents a generalization of the Pythagorean theorem and is also called the Pythagorean extended theorem .

## Cosine law for spherical triangles

When spherical cosine law for spherical triangles the length of the sides of the triangle is in the angular indicate why instead of a trigonometric function whose six occur. The analogue to the plane sentence

${\ displaystyle c ^ {2} = a ^ {2} + b ^ {2} -2 \ cdot a \ cdot b \ cdot \ cos \ gamma}$

is therefore

${\ displaystyle \ cos c = \ cos a \ cdot \ cos b + \ sin a \ cdot \ sin b \ cdot \ cos \ gamma}$,

Note that the sign is reversed. This side cosine law (here for c, analogously for sides a and b) is opposed to the angle cosine law :

${\ displaystyle \ cos \ gamma = - \ cos \ alpha \ cdot \ cos \ beta + \ sin \ alpha \ cdot \ sin \ beta \ cdot \ cos c}$,

where the first sign is negative.

## Applications

### Numerical example

The following page sizes are known in a triangle ABC (designations as usual):

${\ displaystyle a = 4 {,} 00 \; {\ rm {cm}}}$
${\ displaystyle b = 2 {,} 00 \; {\ rm {cm}}}$
${\ displaystyle c = 3 {,} 70 \; {\ rm {cm}}}$

We are looking for the angle size (designations as usual). ${\ displaystyle \ beta}$

${\ displaystyle b ^ {2} = a ^ {2} + c ^ {2} -2 \ cdot a \ cdot c \ cdot \ cos \ beta}$
${\ displaystyle 2 \ cdot a \ cdot c \ cdot \ cos \ beta = a ^ {2} + c ^ {2} -b ^ {2}}$
${\ displaystyle \ cos \ beta \, = \, {\ frac {a ^ {2} + c ^ {2} -b ^ {2}} {2 \ cdot a \ cdot c}} = {\ frac {( 4 {,} 0 \, {\ rm {cm}}) ^ {2} + (3 {,} 7 \, {\ rm {cm}}) ^ {2} - (2 {,} 0 \, { \ rm {cm}}) ^ {2}} {2 \ cdot 4 {,} 0 \, {\ rm {cm}} \ cdot 3 {,} 7 \, {\ rm {cm}}}} = 0 {,} 868}$
${\ displaystyle \ beta = 29 {,} 8 ^ {\ circ}}$

### Congruence clauses

The congruence theorems SSS and SWS state that a triangle is completely determined by specifying three sides or two sides and their intermediate angle. Alternatively, you can also specify two vectors from which the included angle can be calculated. In these cases, the law of cosines allows a fourth piece to be calculated from the three given pieces, namely an angle (in the case of SSS) or the third side (in the case of SWS). If you then want to determine the other angles of a triangle, you can either use the law of cosines again (with side names adapted to the angle you are looking for) or the law of sines . The last angle is best calculated using the sum of the angles of 180 °.

If only one side and two angles are given ( congruence theorem SWW or WSW) or two sides and the opposite angle of the larger side ( congruence theorem SsW), one first calculates one of the missing pieces with the sine law and the missing angle using the angle sum, before one can determine the third side with the cosine law.

## generalization

With vectors in real scalar product spaces , that is, vector spaces with scalar product , the cosine law can also be easily generalized. Designated ${\ displaystyle V}$ ${\ displaystyle \ langle \ cdot, \ cdot \ rangle}$

${\ displaystyle \ | a \ | = {\ sqrt {\ langle a, a \ rangle}}}$

the scalar product norm , i.e. the length, of a vector and with ${\ displaystyle a \ in V}$${\ displaystyle \ theta _ {a, b}}$

${\ displaystyle \ cos \ theta _ {a, b} = {\ frac {\ langle a, b \ rangle} {\ | a \ | \ cdot \ | b \ |}}}$

the angle between the two vectors , then the following applies to the norm of the vector : ${\ displaystyle a, b \ in V}$${\ displaystyle c = ba}$

{\ displaystyle {\ begin {aligned} \ | c \ | ^ {2} & = \ | ba \ | ^ {2} = \ langle ba, ba \ rangle = \ langle b, b \ rangle - \ langle b, a \ rangle - \ langle a, b \ rangle + \ langle a, a \ rangle \\ & = \ | a \ | ^ {2} + \ | b \ | ^ {2} -2 \ cdot \ langle a, b \ rangle = \ | a \ | ^ {2} + \ | b \ | ^ {2} -2 \ cdot \ | a \ | \ cdot \ | b \ | \ cos \ theta _ {a, b} \ end {aligned}}}

## proof

### Elementary geometric proof

The following proof is assumed. For the proof needs to be modified slightly. For , the cosine law results directly from the Pythagorean theorem . ${\ displaystyle \ gamma <90 ^ {\ circ}}$${\ displaystyle \ gamma> 90 ^ {\ circ}}$${\ displaystyle \ gamma = 90 ^ {\ circ}}$

In the partial triangles, the Pythagorean theorem should be used to find an arithmetic expression for . For this you need the squares of the cathetus lengths of this partial triangle: ${\ displaystyle c ^ {2}}$

${\ displaystyle h ^ {2} \, = b ^ {2} -e ^ {2}}$( Pythagorean theorem for the right partial triangle)
${\ displaystyle d ^ {2} = (ae) ^ {2} = a ^ {2} -2 \ cdot a \ cdot e + e ^ {2}}$( binomial formula )

According to Pythagoras, the following applies to the left partial triangle:

${\ displaystyle c ^ {2} \, = h ^ {2} + d ^ {2}}$

So the two arithmetic expressions found above must be added:

${\ displaystyle c ^ {2} = b ^ {2} -e ^ {2} + a ^ {2} -2 \ cdot a \ cdot e + e ^ {2} = a ^ {2} + b ^ { 2} -2 \ cdot a \ cdot e}$

${\ displaystyle \ cos \ gamma = {\ frac {e} {b}}}$

with the inference

${\ displaystyle e = b \ cdot \ cos \ gamma}$.

Inserting this intermediate result into the equation for yields the claim: ${\ displaystyle c ^ {2}}$

${\ displaystyle c ^ {2} = a ^ {2} + b ^ {2} -2 \ cdot a \ cdot b \ cdot \ cos \ gamma}$

### Trigonometric proof

If you draw the plumb line on the side , it is divided into two sections and the following applies: ${\ displaystyle c}$

${\ displaystyle c = a \ cdot \ cos \ beta + b \ cdot \ cos \ alpha}$

Multiplication with gives ${\ displaystyle c}$

${\ displaystyle c ^ {2} = a \ cdot c \ cdot \ cos \ beta + b \ cdot c \ cdot \ cos \ alpha}$

The equations for the other two sides are obtained analogously

${\ displaystyle a ^ {2} = a \ cdot c \ cdot \ cos \ beta + a \ cdot b \ cdot \ cos \ gamma}$
${\ displaystyle b ^ {2} = b \ cdot c \ cdot \ cos \ alpha + a \ cdot b \ cdot \ cos \ gamma}$

If one adds these two equations, then it follows

${\ displaystyle a ^ {2} + b ^ {2} = a \ cdot c \ cdot \ cos \ beta + b \ cdot c \ cdot \ cos \ alpha +2 \ cdot a \ cdot b \ cdot \ cos \ gamma }$
${\ displaystyle a ^ {2} + b ^ {2} -2 \ cdot a \ cdot b \ cdot \ cos \ gamma = a \ cdot c \ cdot \ cos \ beta + b \ cdot c \ cdot \ cos \ alpha }$

Because the right side of the last equation and the right side of coincide, the two left sides can be equated: ${\ displaystyle c ^ {2} = a \ cdot c \ cdot \ cos \ beta + b \ cdot c \ cdot \ cos \ alpha}$

${\ displaystyle c ^ {2} = a ^ {2} + b ^ {2} -2 \ cdot a \ cdot b \ cdot \ cos \ gamma}$

### Proof by means of vector calculation

Following the presentation by Gericke and Raith, the proof of the three cosine formulas is first carried out:

For this one makes the determinations

${\ displaystyle {\ vec {a}} = {\ overrightarrow {BC}}, \ quad {\ vec {b}} = {\ overrightarrow {CA}}, \ quad {\ vec {c}} = {\ overrightarrow {FROM}}}$  .

This yields the equations

${\ displaystyle - {\ vec {a}} = {\ overrightarrow {CB}}, \ quad - {\ vec {b}} = {\ overrightarrow {AC}}, \ quad - {\ vec {c}} = {\ overrightarrow {BA}}}$

as well as using the properties of the scalar product

${\ displaystyle a = | {\ vec {a}} | = | {- {\ vec {a}}} |, \ quad b = | {\ vec {b}} | = | {- {\ vec {b }}} |, \ quad c = | {\ vec {c}} | = | {- {\ vec {c}}} |}$

and

${\ displaystyle \ cos \ alpha = {\ frac {\ langle - {\ vec {b}}, {\ vec {c}} \ rangle} {| {- {\ vec {b}}} | \ cdot | { \ vec {c}} |}} = {\ frac {\ langle - {\ vec {b}}, {\ vec {c}} \ rangle} {b \ cdot c}}, \ quad \ cos \ beta = {\ frac {\ langle - {\ vec {c}}, {\ vec {a}} \ rangle} {| {- {\ vec {c}}} | \ cdot | {\ vec {a}} |} } = {\ frac {\ langle - {\ vec {c}}, {\ vec {a}} \ rangle} {c \ cdot a}}, \ quad \ cos \ gamma = {\ frac {\ langle - { \ vec {a}}, {\ vec {b}} \ rangle} {| {- {\ vec {a}}} | \ cdot | {\ vec {b}} |}} = {\ frac {\ langle - {\ vec {a}}, {\ vec {b}} \ rangle} {a \ cdot b}}}$.

Now draw the basic equation characteristic of the triangle

${\ displaystyle {\ vec {a}} + {\ vec {b}} + {\ vec {c}} = {\ vec {0}}}$

come up and win

${\ displaystyle {\ vec {a}} = (- {\ vec {b}}) + (- {\ vec {c}})}$

and further

${\ displaystyle a ^ {2} = | {\ vec {a}} | ^ {2} = \ langle {\ vec {a}}, {\ vec {a}} \ rangle = \ langle - {\ vec { b}}, {\ vec {a}} \ rangle + \ langle - {\ vec {c}}, {\ vec {a}} \ rangle}$.

Hence it results

${\ displaystyle a = {\ frac {\ langle - {\ vec {b}}, {\ vec {a}} \ rangle} {a}} + {\ frac {\ langle - {\ vec {c}}, {\ vec {a}} \ rangle} {a}} = {\ frac {\ langle - {\ vec {a}}, {\ vec {b}} \ rangle} {a}} + {\ frac {\ langle - {\ vec {c}}, {\ vec {a}} \ rangle} {a}} = b \ cdot \ cos \ gamma + c \ cdot \ cos \ beta}$

and thus the first of the above three cosine formulas.

The other two are obtained in the same way.

The three formulas of the general formulation can then be inferred by means of elementary algebraic operations . The first equation is obtained by multiplying the three cosine formulas above with , and , adding up and solving for . ${\ displaystyle a}$${\ displaystyle b}$${\ displaystyle -c}$${\ displaystyle c ^ {2}}$

## Sources and literature

7. It should be assumed that there is a non-degenerate triangle, i.e. none of the three sides and therefore none of the three vectors has the length .${\ displaystyle 0}$