The cosine law can be applied to both right and oblique triangles, as it is a general principle in trigonometry. In right triangles, the cosine of a right angle is zero, which simplifies the cosine law to the Pythagorean theorem. While it can be rewritten for right triangles, its utility is limited since standard sine and cosine ratios suffice. The cosine law is particularly beneficial for oblique triangles where traditional trigonometric functions cannot be used effectively. Thus, while applicable to all triangles, the cosine law is most useful in oblique cases.