The cosine equation formula, commonly known as the Law of Cosines, allows you to calculate a missing side length or angle in any triangle when you know specific combinations of other sides and angles. Unlike the Pythagorean theorem, which only applies to right-angled triangles, the Law of Cosines works for all types of triangles, including acute and obtuse ones. To use this formula effectively, you need a basic understanding of trigonometry, a scientific calculator capable of handling inverse cosine functions, and accurate measurements of at least two sides and the included angle, or all three sides.
What You'll Need
- A scientific calculator (ensure it is set to degrees or radians depending on your data).
- Known values for at least two sides and one included angle, or all three sides of the triangle.
- Paper and pencil for sketching the triangle to visualize the relationships between sides and angles.
- Basic algebra skills to rearrange the formula if necessary.
Step-by-Step
- Identify the Known Values: Determine which parts of the triangle you already know. The Law of Cosines is typically used in two scenarios: Side-Angle-Side (SAS), where you know two sides and the angle between them, or Side-Side-Side (SSS), where you know all three sides. Label the sides as $a$, $b$, and $c$, and the opposite angles as $A$, $B$, and $C$.
- Select the Correct Formula Variant: If you are solving for a missing side length (e.g., side $c$), use the standard form: $c^2 = a^2 + b^2 - 2ab \cos(C)$. Here, $C$ is the angle opposite side $c$. If you are solving for a missing angle (e.g., angle $C$), rearrange the formula to isolate $\cos(C)$: $\cos(C) = \frac{a^2 + b^2 - c^2}{2ab}$.
- Substitute the Values: Plug your known numbers into the chosen formula. Be careful with signs, especially if dealing with negative coordinates or vectors, though in standard triangle geometry, side lengths are always positive. Ensure your calculator is in the correct mode (Degrees vs. Radians) matching the unit of your given angle.
- Calculate the Intermediate Steps: For finding a side, square the known sides ($a^2$ and $b^2$), multiply the two known sides by 2 and the cosine of the included angle ($2ab \cos(C)$), then subtract this product from the sum of the squares. For finding an angle, calculate the numerator ($a^2 + b^2 - c^2$) and the denominator ($2ab$) separately before dividing.
- Solve for the Final Value: If calculating a side, take the square root of the result from step 4 to find $c$. If calculating an angle, apply the inverse cosine function ($\arccos$ or $\cos^{-1}$) to the ratio obtained in step 4. This will give you the measure of the angle in degrees or radians.
- Verify the Result: Check that the calculated value makes sense geometrically. The largest angle should be opposite the longest side. If the sum of any two sides is not greater than the third, the triangle cannot exist, indicating an input error.
Common Mistakes
One frequent error is mixing up the angle used in the formula. In the SAS case, you must use the angle included between the two known sides. Using a non-included angle leads to incorrect results because the relationship defined by the Law of Cosines specifically links the square of the opposite side to the adjacent sides and their included angle. Another common mistake is forgetting to switch the calculator mode. If your angle is given in degrees but your calculator is set to radians, the cosine value will be completely wrong, leading to significant errors in both side and angle calculations.
Tips
Always draw a rough sketch of the triangle before starting calculations. Visualizing which side is opposite which angle helps prevent labeling errors. When solving for an angle using the SSS method, remember that the arccosine function returns values between 0 and 180 degrees. This range covers all possible internal angles of a Euclidean triangle, so there is no ambiguity regarding whether the angle is acute or obtuse; the sign of the cosine value handles this automatically. Negative cosine results indicate an obtuse angle (greater than 90 degrees).
Troubleshooting
If you receive a "Math Error" or "Domain Error" when trying to calculate the inverse cosine, check your fraction. The value inside the arccos function must be between -1 and 1. If your calculation yields a number slightly outside this range (e.g., 1.0000001) due to rounding errors during intermediate steps, adjust it back to exactly 1 or -1. If the result is significantly outside this range, re-check your arithmetic for squaring and multiplication errors. If the calculated side length is negative or imaginary, verify that the triangle inequality holds (the sum of any two sides must be greater than the third); if not, the given dimensions do not form a valid triangle.
Frequently Asked Questions
Can I use the Law of Cosines for right triangles?
Yes, but it is unnecessary. For right triangles, the Pythagorean theorem ($a^2 + b^2 = c^2$) is simpler and faster. The Law of Cosines reduces to the Pythagorean theorem when the included angle is 90 degrees, since $\cos(90^\circ) = 0$.
How do I handle obtuse angles?
The formula works identically for obtuse angles. The cosine of an obtuse angle is negative, so the term $-2ab \cos(C)$ becomes positive, correctly increasing the length of the opposite side compared to a right or acute scenario.
Is there a difference between the Law of Cosines and the Cosine Rule?
No, they are the same concept. "Law of Cosines" is more common in American textbooks, while "Cosine Rule" is frequently used in British and international curricula. Both refer to the same mathematical relationship.
What if I only know two sides and a non-included angle?
You cannot directly use the Law of Cosines to solve for the third side without additional information. This is the SSA (Side-Side-Angle) case, which can lead to ambiguous solutions. You would typically use the Law of Sines first to find another angle, then derive the remaining parts.
Do units matter in the formula?
Side lengths must be in consistent units (e.g., all meters or all inches). The angle must match your calculator's mode (degrees or radians). The resulting side length will be in the same unit as the inputs, and the resulting angle will be in the unit selected on your calculator.