2 - 2cos(u)cos(v) - 2sin(u)sin(v)
Draw a segment from the origin to p. This is the segment that defines the angle u. Draw another segment from q, perpendicular to this segment. Let these perpendicular segments meet at the point s. Now spq forms another right triangle, with pq as hypotenuse. The altitude of this triangle has length sin(w), while the base is 1-cos(w). Apply the pythagorean theorem again to get the square of the hypotenuse.
2 - 2cos(w)
Set this equal to the earlier expression to obtain the angle subtraction formula:
cos(v-u) = cos(u)cos(v) + sin(u)sin(v)
This is great, but u and v are rather constrained. Let v stray past 90°. Its cosine becomes negative, but cos(u)-cos(v) is still correct for the length of the base of the first triangle. As v-u exceeds 90°, s slides through the origin, and winds up behind the origin. The cosine of w goes negative, yet 1-cos(w) is still the length of the base of the second right triangle. Eventually q is lower than p. The first right triangle points down, rather than up. Now sin(v)-sin(u) is the opposite of the length of the altitude, but the length is squared in the pythagorean formula, so this doesn't matter. When v passes 180°, its sine is negative, yet sin(v)-sin(u) still gives the length of the altitude of the first triangle, at least in absolute value. Our formula holds for any u between 0° and 90°, and any v between u and u+180°.
When v goes beyond u+180°, reflect the picture through the line x = y. This reproduces the earlier case, where our formula holds. The reflection swaps sine and cosine for u and v, which changes the right side of the equation not at all. It also replaces w with 360°-w, which changes its cosine not at all. Thus the formula holds for all v between u and u+360°.
If u is an angle in the second quadrant, subttract 90° from u and v, leaving w unchanged. Now u is in the first quadrant and the formula works. Our rotation moved sine to cosine and cosine to -sine, for both u and v. This changes the formula not at all. Perform a similar rotation when u is in the third or fourth quadrant. Therefore the angle subtraction formula works for all angles u and v.
Replace v with -v to get the angle addition formula:
cos(u+v) = cos(u)cos(v) - sin(u)sin(v)
In the above formula, hold u fixed and let v be a variable. Take the derivative with respect to v. This gives the angle addition for sines.
sin(u+v) = cos(u)sin(v) + sin(u)cos(v)
Replace v with -v to get the angle subtraction formula for sines.
sin(u-v) = sin(u)cos(v) - cos(u)sin(v)
tan(u+v) = (tan(u) + tan(v)) / (1 - tan(u)tan(v))
tan(u-v) = (tan(u) - tan(v)) / (1 + tan(u)tan(v))