# The Law of Sine and Cosine

## Introduction

One of the fundamentals of the triangle is the Law of Sines and the Law of Cosines. The Law of Sines and Cosines are the relationships between the angles of a triangle and the lengths of the sides of a triangle. We will derive the Law or Cosines first, then the Law of Sine.

## The Convention

Figure 1 shows the triangle with its sides and vertices labeled. The accepted convention is that the side opposite the vertex and the vertex have corresponding English/Greek designations. For vertex A, the angle meausre is denoted by A or by α. The length of the side oppositve vertex A is given by the lowercase letter a. The same goes for the other 2 sides.

Also, the included angle is the angle created by two sides of a triangle. For example, angle A is the included angle of sides b and c.

## The Law of Cosines

In Figure 1, an altitude from C with height of h is drawn and it touches side AB at C'. It divides AB into x and cx.

Applying the Pythagorean Theorem, we have the following two relationships:

(i) $$b^2 = x^2 + h^2$$

(ii) $$a^2 = (c-x)^2 + h^2$$

We will eliminate h² by subtracting (i) and (ii).

(iii) $$b^2 - a^2 = x^2 + \cancel{h^2} - (c-x)^2 - \cancel{h^2}$$

(iv) $$b^2 - a^2 = \cancel{x^2} - c^2 + 2cx - \cancel{x^2}$$

(v) $$b^2 - a^2 = - c^2 + 2cx$$

Equation (v) reduced quite nicely. We can use the cosine property to find the value of x: $$\cos\alpha = \frac{x}{b}$$. Solving for x: $$x = b\cos\alpha$$. Now, substituting that into (v):

(vi) $$b^2 - a^2 = - c^2 + 2c\cdot b\cos\alpha$$

(vii) $$a^2 = b^2 + c^2 - 2bc\cos\alpha$$  (Isolating the a term.)

Equation (vii) represents the Law of Cosines.

Law of Cosines

For a triangle whose sides are a, b, and c, and whose corresponding angle measures are α, β, and γ, then the following relationships hold true:

$a^2 = b^2 + c^2 - 2bc\cos\alpha$

$b^2 = a^2 + c^2 - 2ac\cos\beta$

$c^2 = a^2 + b^2 - 2ab\cos\gamma$

The Law of Cosines is useful when we know two sides and the included angle of the two sides and we want to find the length of the third side of the triangle. It is also useful for finding the cosine value if we know the length of all three sides.

In a right triangle, if we designate side c as the hypotenuse and angle γ as the right angle, then the relationship becomes the Pythagorean Theorem because cosine of 90° is 0.

We can do some examples to illustrate the usage of the Law of Cosines.

### Problem 1

Problem: Find the cosine values of the three angles in a 4-5-6 triangle.

Solution: Figure 2 shows the approximate angle measures of the 4-5-6 triangle as calculated by Geogebra. Let’s substitute the values we know to find cosine of the smallest angle A.

(i) $$4^2 = 5^2 + 6^2 - 2\cdot 5\cdot 6\cos A$$

(ii) $$16 = 25 + 36 - 60\cos A$$

(iii) $$\cos A = \frac{45}{60} = \frac{3}{4}$$

The cosine of A is $$\frac{3}{4}$$. Using a calculator to calculate the inverse cosine, the measure of angle A is: $$A = \arccos\frac{3}{4} \approx 41.41^{\circ}$$.

Now for angle B:

(i) $$5^2 = 4^2 + 6^2 - 2\cdot 4\cdot 6\cos B$$

(ii) $$25 = 16 + 36 - 48\cos B$$

(iii) $$\cos B = \frac{27}{48} = \frac{9}{16}$$

Coincidentally (I think), $$\cos B$$ is the square of $$\cos A$$. Again, the meausre of angle B is: $$B = \arccos\frac{9}{16} \approx 55.77^{\circ}$$.

Lastly, the largest angle:

(i) $$6^2 = 4^2 + 5^2 - 2\cdot 4\cdot 5\cos C$$

(ii) $$36 = 16 + 25 - 40\cos C$$

(iii) $$\cos C = \frac{5}{40} = \frac{1}{8}$$

The cosine of C is: $$\frac{1}{8}$$. Using a calculator the approximate angle measure is $$C = \arccos\frac{1}{8} \approx 82.82^{\circ}$$.

### Applications

We do not always need to know the third side or the cosine of angle measures. Sometimes, we just need to apply the Law of Cosines for a different goal. For example, to find the equation of conic sections in polar form, Law of Cosines is useful. See The General Polar Equation of Conic Sections - Part 2.

## The Law of Sines

Unlike the Law of Cosines, which only has one angle in the formula, the Law of Sines is the ratio of two angles and two sides. To derive the Law of Sines, we need the help of the circumcircle, which is a circle that passes through the 3 vertices of the triangle.

Consider the circumcircle of triangle ABC. The radius of the circle is R, which we do not know yet. Let’s draw the chord AC' such that it passes through the center of the circle. Therefore, AC' is the diameter. Now, we connect C' with B. Therefore, ABC' is a right triangle because the legs form vertex B form the diameter of the circle.

Also, because point C and C' both have a common chord, angle C equals angle C'. Therefore, we have the following relationship of sine: $$\sin C' = \sin C = \frac{c}{2R}$$. With a little manipulation, this equals:

(i) $$\frac{\sin C}{c} = \frac{1}{2R}$$

We can do the same for vertex A and B and derive the following relationships:

(ii) $$\frac{\sin B}{b} = \frac{1}{2R}$$

(iii) $$\frac{\sin A}{a} = \frac{1}{2R}$$

All of the ratios are equal to $$\frac{1}{2R}$$, and this is the Law of Sines.

Law of Sines

For a triangle whose sides are a, b, and c, and whose corresponding angle measures are A, B, and C, then the following relationships hold true:

$\frac{\sin A}{a} = \frac{\sin B}{b} = \frac{\sin C}{c}$

We used the circumradius in deriving the Law of Sines but we never actually needed to calculate it. How do we find the length of the circumradius if we know the legnths of the three sides of the triangle?

We will employ a clever trick involving the area of a triangle to find the circumradius. Remember that the area of a triangle can be found knowing the three sides of a triangle. The area, K, of a triangle is $$K = \sqrt{S(S-a)(S-b)(S-c)}$$, where S is the semiperimeter. The semiperimeter is half the perimeter of the triangle, or $$S = \frac{1}{2}(a + b + c)$$.

The area, K, of a triangle ABC in Figure 4 is $$K = \frac{1}{2}ch$$, where h is the height of the altitude from vertex C to side AB. This is just the elementary area formula of a triagle.

We can find h in terms of the sine of angle B: $$\sin B = \frac{h}{a}$$ or $$h = a\sin B$$. Substituting this in the area of the triangle formula:

(i) $$K = \frac{1}{2}c \cdot a\sin B$$

Remember we calculated the sine values in terms of R to derive the Law of Sines? That relationship is $$\frac{\sin B}{b} = \frac{1}{2R}$$ or $$\sin B = \frac{b}{2R}$$. Substituting this into (i):

(ii) $$K = \frac{1}{2}c \cdot a \cdot \frac{b}{2R}$$

(iii) $$K = \frac{abc}{4R}$$

(iv) $$R = \frac{abc}{4K}$$

The radius, R, of the circle exscribed on a triangle is equal to $$R = \frac{abc}{4K}$$, where K is the area of the triangle.

### Problem 2

Problem: Find the radius of the circle that passes through the vertices of a triangle whose sides are 4, 5, and 6.

Solution: We used this triangle above. We will find the area first. The semiperimeter is $$S = \frac{1}{2}(4 + 5 + 6) = \frac{15}{2}$$. The area is $$K = \sqrt{\frac{15}{2}(\frac{15}{2} - 4)(\frac{15}{2} - 5)(\frac{15}{2}-6)}$$ = $$\frac{5}{4}\sqrt{63}$$. Substituting into the formula for the circumradius: $$R = \frac{4\cdot 5 \cdot 6}{4\cdot\frac{5}{4}\sqrt{63}}$$ = $$\frac{24}{\sqrt{63}}$$ ≈ 3.02.

Problem: Confirm the area of the 4-5-6 triangle is $$\frac{5}{4}\sqrt{63}$$ using the Law of Cosines.
Solution: The area of the triangle is $$K = \frac{1}{2}ab\sin C$$.
We cannot calculate the sine value by itself because all of the relationships are ratios. But we can calculate the cosine of an angle, and we can use the identity $$\sin^{2}\theta + \cos^{2}\theta = 1$$ to find the sine from cosine.
We found the cosine of C in Problem 1: $$\cos C = \frac{1}{8}$$. Therefore, the sine is $$\sin C = \sqrt{1 - \frac{1}{64}}$$ = $$\frac{\sqrt{63}}{8}$$. Substituting this into the triangle area formula: $$K = \frac{1}{2}\cdot 4 \cdot 5\cdot \frac{\sqrt{63}}{8}$$ = $$\frac{5}{4}\sqrt{63}$$.