The Law of Cosines states that in any triangle, c² = a² + b² − 2ab·cos(C), where C is the angle included between sides a and b. In AP Precalculus (Topic 4.8), you use it to find the magnitude of a resultant vector or the angle between two vectors after vector addition.
The Law of Cosines is a triangle relationship that works in any triangle, not just right triangles. It says the square of one side equals the sum of the squares of the other two sides, minus twice their product times the cosine of the angle between them. Written out, that's c² = a² + b² − 2ab·cos(C). The best way to think about it is as the Pythagorean theorem with a correction term. If C is exactly 90°, then cos(C) = 0, the correction term vanishes, and you're left with plain old c² = a² + b².
In AP Precalculus, this formula lives in Topic 4.8 (Vectors). When you add two vectors tip-to-tail, the two vectors and their resultant form a triangle. That triangle usually isn't a right triangle, so SOH-CAH-TOA won't save you. The Law of Cosines lets you find the magnitude of the resultant when you know both vectors' magnitudes and the angle between them, or work backwards to find the angle when you know all three magnitudes.
The Law of Cosines directly supports learning objective AP Pre Calc 4.8.D, which asks you to determine angle measures between vectors and magnitudes of vectors involved in vector addition. The CED states it plainly: the Law of Sines and Law of Cosines can be used to determine side lengths and angle measures of triangles formed by vector addition. That makes it one of the main computational tools of Unit 4's vector section.
There's one trap worth knowing up front. When you add vectors tip-to-tail, the angle inside the triangle is the supplement of the angle between the vectors. If the angle between u and v is 60°, the included angle in the addition triangle is 120°. Getting this wrong flips the sign of the correction term and gives a wrong (but tempting) answer choice on multiple choice questions.
Keep studying AP® Precalculus Unit 4
Law of Sines (Unit 4)
These two laws are partners on vector problems. The Law of Cosines handles side-angle-side and side-side-side setups, while the Law of Sines handles cases where you know an angle and its opposite side. The CED names both as tools for triangles formed by vector addition, so know which setup calls for which law.
Dot product (Unit 4)
The dot product formula u·v = |u||v|cos(θ) is essentially the Law of Cosines rewritten in vector language. Both give you the angle between two vectors. If you're given components, the dot product is usually faster; if you're given magnitudes only, the Law of Cosines is your move.
Magnitude of a vector (Unit 4)
Every Law of Cosines vector problem is really a magnitude problem in disguise. The 'sides' of the triangle are |u|, |v|, and |u + v|, so being fluent with magnitudes (and computing them from components with √(a² + b²)) is the entry ticket.
Cosine function and trig values (Unit 3)
The Law of Cosines puts your Unit 3 trig knowledge to work. Knowing exact values like cos(60°) = 1/2 and cos(120°) = −1/2 lets you solve resultant-magnitude problems cleanly without a calculator detour.
Law of Cosines questions in the vectors topic come in two main flavors. First, you're given two vector magnitudes and the angle between them, and you find the magnitude of the resultant. For example, with |u| = 6, |v| = 8, and a 60° angle between them, you build the addition triangle, use the included angle of 120°, and apply the Law of Cosines to get |u + v|. Second, the problem runs in reverse. Given |p| = 5, |q| = 7, and |p + q| = 10, you solve the Law of Cosines for the cosine of the angle, then take an inverse cosine to find the angle between the vectors. Component-form versions also appear, where vectors like 5i + 12j and 8i + 15j require you to compute magnitudes first, then find the angle (here the dot product is often the cleaner path). In every case, draw the triangle, label which angle you actually have, and check whether it's the angle between the vectors or its supplement.
Both solve non-right triangles, but they fit different information. Use the Law of Cosines when you have two sides and the included angle (SAS) or all three sides (SSS). Use the Law of Sines when you have an angle paired with its opposite side (AAS, ASA, or SSA). Quick check: if you can't match any known angle to its opposite side, the Law of Sines is useless and you need the Law of Cosines.
The Law of Cosines, c² = a² + b² − 2ab·cos(C), works in any triangle and reduces to the Pythagorean theorem when C = 90°.
On the AP exam, it's tested through vector addition (Topic 4.8), where it finds the magnitude of a resultant or the angle between two vectors.
When vectors are added tip-to-tail, the included angle in the triangle is 180° minus the angle between the vectors, so always check which angle the problem actually gives you.
Use the Law of Cosines for SAS and SSS setups, and the Law of Sines when you have an angle matched with its opposite side.
The dot product formula u·v = |u||v|cos(θ) gives the same angle information as the Law of Cosines, and it's usually faster when vectors are given in component form.
It's the formula c² = a² + b² − 2ab·cos(C), which relates the three sides of any triangle to one of its angles. In AP Precalc Topic 4.8, you use it to find resultant vector magnitudes and angles between vectors.
No, that's backwards. It works for every triangle. The Pythagorean theorem is actually the special case you get when the angle is 90°, since cos(90°) = 0 wipes out the −2ab·cos(C) term.
The Law of Cosines needs two sides and the included angle (SAS) or all three sides (SSS). The Law of Sines needs an angle and its opposite side. If no known angle sits across from a known side, reach for the Law of Cosines.
Adding two vectors tip-to-tail creates a triangle whose sides are |u|, |v|, and |u + v|. Apply the Law of Cosines with the included angle, which is 180° minus the angle between the vectors. For example, if |u| = 6, |v| = 8, and the vectors are 60° apart, you use cos(120°) inside the formula.
They're closely related but not identical. The dot product u·v = |u||v|cos(θ) is essentially the Law of Cosines translated into vector form, and both recover the angle between two vectors. With components, the dot product is usually quicker; with only magnitudes, use the Law of Cosines.
Connect this key term to the AP exam workflow: review the course, practice questions, and check related study tools.
Review units, study guides, and course resources.
Check this vocabulary in multiple-choice context.
Apply key concepts in written AP responses.
Estimate the exam score you are working toward.
Review the highest-yield facts before practice.
Put the full course together before test day.