Skip to content
AI360Xpert
Beta

Trigonometric Identities

Identities are the short list of trig equations that are always true, so you can swap hard expressions for easy ones instead of recomputing.

Squaring the legs of a 60 degree angle gives 0.25 plus 0.75 equals 1, which is the Pythagorean identity drawn as rebuilt area
Squaring the legs of a 60 degree angle gives 0.25 plus 0.75 equals 1, which is the Pythagorean identity drawn as rebuilt area

Why Does This Exist?

Trig expressions pile up fast: a rotation composed with another rotation, a wave squared inside a power calculation, a phase shifted by an offset. Multiplying everything out each time is slow and error-prone. Identities are pre-proved shortcuts, equations true for every angle, that collapse these tangles into one line.

In ML they surface wherever waves and rotations are manipulated: simplifying Fourier terms, deriving filter responses, normalizing phasors, and checking that a rotation matrix truly preserves length. This page teaches the three identities that do almost all the work, each with its proof sketch. The functions themselves live in sine, cosine, tangent; angle measurement is in angles, radians and degrees.

The one idea you need first

An identity is an equation with a variable that holds for every value of that variable, unlike a conditional equation such as x+2=5x + 2 = 5 that holds only for x=3x = 3. Identities rewrite expressions; equations solve for unknowns. Everything below is a rewrite rule, valid at any angle.

Think of It Like This

A phrasebook, not a dictionary

A dictionary tells you what each word means; a phrasebook tells you that two whole sentences say the same thing, so you can use whichever is shorter. Trig functions are the vocabulary, and identities are the phrasebook: "sine squared plus cosine squared" and "one" are two ways of saying the same thing.

You would never re-derive the translation mid-conversation. You memorize the dozen phrases that come up daily and look up the rest. The three below are the greetings and farewells of trig: used constantly, worth knowing cold.

How It Actually Works

The three workhorses, with θ\theta and ϕ\phi as angles:

sin⁡2θ+cos⁡2θ=1,tan⁡θ=sin⁡θcos⁡θ,cos⁡2θ=cos⁡2θ−sin⁡2θ\sin^2 \theta + \cos^2 \theta = 1, \qquad \tan \theta = \frac{\sin \theta}{\cos \theta}, \qquad \cos 2\theta = \cos^2 \theta - \sin^2 \theta

In plain words: the squared legs of the unit-circle triangle always rebuild the radius 1 (Pythagoras with hypotenuse 1); tangent is sine divided by cosine by definition of slope; and the double-angle form reads the cosine of twice an angle off the single-angle values. sin⁡2θ\sin^2 \theta means (sin⁡θ)2(\sin \theta)^2, the square of the value, not the sine of a square.

Why the first is true: the unit-circle point is (cos⁡θ,sin⁡θ)(\cos \theta, \sin \theta) at distance 1 from the origin, so Pythagoras gives cos⁡2θ+sin⁡2θ=12=1\cos^2 \theta + \sin^2 \theta = 1^2 = 1 directly. The double-angle forms (sin⁡2θ=2sin⁡θcos⁡θ\sin 2\theta = 2 \sin \theta \cos \theta and the cosine version above) come from the angle-addition rules, which state sin⁡(θ+ϕ)\sin(\theta + \phi) and cos⁡(θ+ϕ)\cos(\theta + \phi) in terms of the parts; setting ϕ=θ\phi = \theta doubles the angle.

Worked example

Verify all three at θ=60°\theta = 60°, where sin⁡=0.8660\sin = 0.8660 and cos⁡=0.5\cos = 0.5:

  • Pythagoras: 0.86602+0.52=0.75+0.25=1.00.8660^2 + 0.5^2 = 0.75 + 0.25 = 1.0 exactly.
  • Tangent: 0.8660/0.5=1.7320.8660 / 0.5 = 1.732, matching tan⁡60°\tan 60°.
  • Double angle: cos⁡120°\cos 120° should equal 0.52−0.86602=0.25−0.75=−0.50.5^2 - 0.8660^2 = 0.25 - 0.75 = -0.5. And indeed cos⁡120°=−0.5\cos 120° = -0.5.

Three identities, one angle, zero disagreement. Note how the double-angle result lands in the second quadrant with the correct negative sign for free.

Watch Out For

Squaring the angle instead of the value

sin⁡2θ\sin^2 \theta is (sin⁡θ)2(\sin \theta)^2, but hurried reading produces sin⁡(θ2)\sin(\theta^2), the sine of the squared angle. At θ=60°\theta = 60° the right reading gives 0.750.75 while the wrong one gives sin⁡3600°=0\sin 3600° = 0. Totally different, no error raised.

Keep the square outside the function name visually: write (sin⁡θ)2(\sin \theta)^2 in your own notes until the convention is automatic, and distrust any identity application whose result looks like a raw angle.

Dividing by a cosine that is zero

The tangent identity and any rewrite that divides by cos⁡θ\cos \theta silently assumes cos⁡θ≠0\cos \theta \neq 0. At 90°90° the "identity" tan⁡=sin⁡/cos⁡\tan = \sin/\cos divides by zero, and chained simplifications built on it produce infinities dressed as algebra.

Before dividing, check the angle is not an odd multiple of 90 degrees. In code, prefer formulations that keep sine and cosine paired over ones that isolate a tangent.

The Quick Version

  • sin⁡2θ+cos⁡2θ=1\sin^2 \theta + \cos^2 \theta = 1 always: Pythagoras on the unit circle.
  • tan⁡θ=sin⁡θ/cos⁡θ\tan \theta = \sin \theta / \cos \theta: tangent is the slope by definition.
  • cos⁡2θ=cos⁡2θ−sin⁡2θ\cos 2\theta = \cos^2 \theta - \sin^2 \theta and sin⁡2θ=2sin⁡θcos⁡θ\sin 2\theta = 2 \sin \theta \cos \theta handle doubled angles.
  • At 60 degrees: 0.75+0.25=10.75 + 0.25 = 1, ratio 1.7321.732, double-angle cosine −0.5-0.5.
  • sin⁡2θ\sin^2 \theta squares the value, never the angle.
  • Never divide by cosine without checking it is nonzero first.