Both the law of sines and the law of cosines are applicable to any kind of triangles, as opposed to the Pythagoras theorem that only applies to right-angled triangles.
Law of sines
The law of sines is a proportionality relation between the lengths of the sides of a triangle and the sines of the opposite angles. Given the triangle:
We have:
Example
Knowing that two angles of a triangle are:
First, we need to identify the information given in the problem. We have the following triangle:
We know two angles and one side of this triangle. For one of the angles that we know,
we only have one unknown. The rest is information given in the problem. And so, we can compute:
Law of cosines
The law of cosines can be understood like a generalization of Pythagoras theorem for any kind of triangle. In other words, if we apply the law of cosines to a right triangle we obtain the same result as in Pythagoras theorem. We will get a relationship between the length of one side and the length of the other two and with the cosine of the angle formed by them. Given the triangle,
We have:
Example
Let's suppose that we know three sides of a triangle,
Applying the law of cosines again we can find the second angle:
Finally, using our knowledge that the sum of the angles of a triangle is