How to Learn Trig Derivatives

Quick confession? I never fully learned the trig derivatives. Sure, I memorized $\sin' = \cos$ and $\cos' = -\sin $ like everyone else, but the derivative of tangent? Cosecant? Forget it, magic spells.

After years of searching, there's a middle ground between tedious derivation and rote memorization. Aha moment: all trig functions change using the same process: (sign)(scale)(swapped function).

Here's the Table of Trig Derivatives we'll learn to fill out:

trig-derivatives

As background, learn to visualize the trig functions, and how they're related by the Pythagorean Theorem and similarity:

How to Learn Trig Derivatives How to Learn Trig Derivatives

Part 1: Learn the table

First, let's learn to make the table, one column at a time:

  1. Function: The function to derive (sin, cos, tan, cot, sec, csc)
  2. Sign: The "primary" functions are positive, and the "co" (complementary) functions are negative
  3. Scale: The hypotenuse (red) used by each function
  4. Swap: The other function in each Pythagorean triangle (sin ⇄ cos, tan ⇄ sec, cot ⇄ csc)
  5. Derivative: Multiply to find the derivative

Tada! This procedure somehow finds derivatives for trig fucntions. Learning tips:

  • Think "triple S": sign, scale, swap
  • You've likely memorized $\sin' = \cos$ and $\cos' = -\sin$. Fill in those rows to kickstart the process.

Normally, I prefer insight to memorization. But practically, you're asking about trig derivatives because you have a test, and I want to help you now.

Like a multiplication table, after filling in the entries, we notice patterns. Could $\sin' = \cos$ and $\csc' = -\csc \cot$ have something in common?

You bet.

Part 2: Visualize the derivatives

What's the derivative of sine?

The formal approach is to plug $\sin(x)$ into the definition of derivative, do the algebra, and see that $\cos(x)$ pops out. Accurate, but unsatisfying. If $\sec(x)$ was the derivative, would you notice something was amiss? Probably not.

Here's what's happening geometrically:

Sine Cosine Derivative

The derivative of sine means "How much does our height change when I change my angle?"

I see it like this: we have a starting angle, $x$. We increase it a smidge ($dx$), which we can place along our unit circle (since radians are distance traveled along the perimeter).

We then draw a mini-triangle based on $dx$, similar to the large one, which shows the height and width change as we move along the perimeter.

The large triangle has proportions $\text{red} : \text{blue} : \text{green} = 1 : \cos : \sin$. The mini-triangle has similar proportions, with the longest side of $dx$ instead of 1. Therefore, the mini lengths are:

$\text{mini red} : \text{mini blue} : \text{mini green} = dx : \cos dx : \sin dx$

Since mini blue is the change in sine, and mini green the change in cosine, we have:

$\sin'(x) = \text{height change} = \text{mini blue} = \cos(x) dx$

$\cos'(x) = \text{width change} = (-1) \cdot \text{mini green} = - \sin(x) dx$

Notice the negative sign with $\cos'$, since mini-green points to the left (negative).

Quick Aside: How the Columns Work

The "mini triangle" strategy works for all the trig functions. There are 3 factors:

Q1: What's the sign?

The trig co-functions are the original function applied to the complementary angle.

\displaystyle{\cos(x) = \sin(90 - x) \ \ \ \ \sin(x) = \cos(90 - x) } \displaystyle{\tan(x) = \cot(90 - x) \ \ \ \ \cot(x) = \tan(90 - x) } \displaystyle{\sec(x) = \csc(90 - x) \ \ \ \ \sec(x) = \csc(90 - x) }

Just eyeballing it, we see parameters $x$ and $(90 - x)$ bandied about. The Chain Rule is whispering (screaming?) that the derivatives should be opposite, right?

Let's try it:

$\cos'(x) = [\sin(90 - x)]' = [\sin'(90 - x)][(90-x)'] = \cos(90-x)(-1)$ $= \sin(x)(-1) = -\sin(x) $

Yep, we got a negative sign.

What happened? We converted $\cos$ into its $\sin$ form (turning the angle into the complement), took the derivative, got the $-1$ term, and converted back. All the cofunctions have a similar pattern, giving us a negative sign in the table.

(Note: the negative sign means the cofunction changes opposite the original function, not that the derivative is less than zero. Cosine increases when sine is negative.)

Q2: What's the scale?

Sine and cosine live on the unit circle (radius 1). The other functions use a radius of secant (tan/sec) or cosecant (cot/csc).

Q3: What's the swapped function?

We make a mini-triangle by shrinking the original triangle down, and rotating so $dx$ matches the side of length $1$. It would be strange if, after rotation, the original colors (functions) pointed the same way.

The change must be based on the other function in the triangle (sine's change is based on cosine, cosine on sine, tangent on secant, etc.)

Also, it would be strange for a function to grow based on its own current value, right? (Hold that thought.)

Derivatives of tangent and secant

Ok, let's draw the mini triangles for tangent and secant:

Tangent Secant Derivative

  • First, we draw the $dx$ mini-triangle on the unit circle (like sin/cos).
  • Next, we slide/scale the mini-triangle to fit on the "secant" radius: $dx$ becomes $\sec(x) dx$ on the secant circle.
  • Last, rotate the mini-triangle so the known $1$ side (blue) matches our change of $\sec(x)dx$.

Ok. So how big are the sides of the mini triangle?

$\text{mini blue}: \text{mini green} : \text{mini red} = 1 : \tan(x) : \sec(x)$

We know $\text{mini blue} = \sec(x) dx$, so we just scale up the other sides by that amount:

  • $d\sec = \text{mini green} = \tan(x) [\text{mini blue}] = \tan(x) \sec(x)dx = \sec(x) \tan(x) dx$
  • $d\tan= \text{mini red} = \sec(x) [\text{mini blue}] = \sec(x) \sec(x)dx = \sec^2(x) dx$

Nice! I like how this matches the sine/cosine process. We're just measuring sides in the mini-triangle.

Derivatives of Cosecant and Cotangent

For completeness, here's csc/cot:

Cosecant Cotangent Derivative

Notice how $d\cot$ and $d\csc$ in the mini-triangle move against their positive sides in the big triangle. Using the same sign, scale, swap process, we get:

$\cot' = (-)(\csc)(\csc) = -\csc^2$

$\csc' = (-)(\csc)(\cot) = -\csc \cot$

Colorizing the sides really helps me link the mini-triangle back to the original.

Now, we didn't have to draw this all out: we already know $\tan'$ and $\sec'$. Using the chain rule and complementary functions, we can do:

$\cot(x)' = [\tan(90-x)]' = \tan'(90-x)(90 - x)' = \sec^2(90-x)(-1) = -\csc^2(x)$

$\csc(x)' = [\sec(90-x)]' = \sec'(90-x)(90 - x)' = \sec(90-x)\tan(90-x)(-1)$ $= -\csc(x)\cot(x)$

Summary: What do the derivatives mean?

Blindly memorizing trig derivatives doesn't teach you much.

The deeper intuition: Trig derivatives are based on 3 effects: the sign, the radius (scale), and the other function.

So instead of $\tan' = \sec^2$, think of it as $\tan' = (+)(\sec)(\sec)$, aka $(\text{sign})(\text{scale})(\text{swapped function})$. Heck, you can even see $\cos' = (-)(1)(\sin)$.

If you can complete the derivative table and draw the mini-triangles, you'll have a much better understanding of trig than I ever did.

Happy math.

Appendix: Combined Diagram

It's a bit busy, but here's all the mini-triangles together:

trig-derivatives-combined diagram

Again, the intuition: these mini red/green/blue triangles (which are all similar!) show the changes.

Appendix: Exponential Behavior

Remember how we didn't think a derivative should be based on the same function? Well,

$\tan' = \sec^2 = 1 + \tan^2$

which means tangent grows faster than exponential: it grows based on its own square (vs. "just" the current value).

We see that $\tan(x)$ beats $e^x$ in a race, and exponentials are no slouch! (I'm looking forward to "this is growing tangentially" to be the new catchphrase.)

Appendix: Other mini-triangle layouts

There's other ways we could arrange the mini-triangle. I think it's easiest when the change along the perimeter is mapped to the side of length 1.

But, when finding $\tan'$, you could use the red/blue/green ratios from the 1/cos/sin triangle and find:

$\tan' = \sec \frac{1}{\cos} = \sec^2$

The scale of $\sec$ is the same, but the unknown side is of length $\frac{1}{\cos} dx$. Different approach, same result.

References

Join 450k Monthly Readers

Enjoy the article? There's plenty more to help you build a lasting, intuitive understanding of math. Join the newsletter for bonus content and the latest updates.

Easy Trig Identities With Euler’s Formula

Trig identities are notoriously difficult to memorize: here’s how to learn them without losing your mind.

Starting from the Pythagorean Theorem and similar triangles, we can find connections between sin, cos, tan and friends (read the article on trig).

trig diagram

trig identities

Can we go deeper? Maybe we can connect sine with itself (sin-ception). In math terms, we’re looking for formulas like this (full cheatsheet):

\displaystyle{ \sin(a + b) = \sin(a)\cos(b) + \sin(b)\cos(a) } \displaystyle{ \cos(a + b) = \cos(a)\cos(b) - \sin(a)\sin(b) }

Instead of memorizing these bad mamma jammas, let’s learn to draw the formulas. Euler’s Formula makes it easy.

Connections In Algebra

In algebra, we study relationships like this:

\displaystyle{ (a+b)^2 = a^2 + 2ab + b^2 }

Working out $17^2$ directly is cumbersome. But we can simplify it to:

\displaystyle{17^2 = (10 + 7)^2 = 10^2 + (2 \times 10 \times 7) + 7^2 = 100 + 140 + 49 = 289}

In the computer era, sure, we can just crunch $17^2$ directly. The important aspect is realizing that $(a + b)^2$ can be broken into simpler ingredients: $a^2, b^2, a, b$. This is useful in factoring, simplifying equations, and so on.

Connections In Trig

Let’s turn trig into plain English. What does this mean?

\displaystyle{\sin(a + b) = ?}

Remembering that sine is “height (as a percentage of max)”, this equation asks: If we add two angles, what is their total height?

A quick guess might be to combine the individual heights:

\displaystyle{\sin(a + b) = \sin(a) + \sin(b)}

It looks clean, but isn’t quite right. If we keep adding up angles, their height increases until the max (100%), then starts decreasing.

circle combined height

The relationship between angle and height can’t be simple addition.

Now here’s the weird thing: I can draw what the new height should be (It’s right there!), but I can’t turn my drawing into an equation.

Or can I?

Drawing With Euler’s Formula

Euler’s Formula lets us create a circular path using complex numbers:

euler's formula

Crucially, multiplying complex numbers performs a rotation. Aha! We can use Euler’s Formula to draw the rotation we need:

euler's formula multiplication

  • Start with 1.0, which is at 0 degrees.
  • Multiply by $e^{ia}$, which rotates by $a$.
  • Multiply by $e^{ib}$, which rotates by $b$.
  • Final position = $1.0 \cdot e^{ia} \cdot e^{ib} = e^{i(a+b)}$, or 1.0 at the angle (a+b)

The complex exponential $e^{i(a+b)}$ is pretty gnarly. Just like breaking apart $17^2$, let’s multiply out the pieces:

\displaystyle{e^{i(a+b)} = e^{ia} \cdot e^{ib} }

\displaystyle{ = [\cos(a) + i\sin(a)] \cdot [\cos(b) + i\sin(b)]}

\displaystyle{ = [\cos(a)\cos(b) - \sin(a)\sin(b)] + i[\sin(a)\cos(b) + \sin(b)\cos(a)]}

\displaystyle{ = [\text{combined width}] + i[\text{combined height}]}

Now we’re talking! This version easily separates the horizontal position (real component) and vertical position (imaginary component):

  • Combined height: $ \sin(a + b) = \sin(a)\cos(b) + \sin(b)\cos(a) $
  • Combined width: $ \cos(a + b) = \cos(a)\cos(b) – \sin(a)\sin(b) $

Boom: two annoying-to-remember trig identities in a single computation. Not a bad deal.

Understanding The Equation

Now that we’ve found the equation, let’s grok its meaning. When we add the heights, here’s what’s happening:

sine addition formula combined height

  • The full height of the blue triangle ($\sin(a)$) can’t be used, since the red triangle doesn’t extend as far. (Why? When we add angle $b$, we’re moving at a steeper angle with the same hypotenuse. We gained vertical distance and lost horizontal distance.) We’re effectively “sliding back” $\sin(a)$, reducing it by a factor of $\cos(b)$.
  • The full height of the red triangle ($\sin(b)$) can’t be used either, since it’s at an angle. We’re “turning” $\sin(b)$, reducing it by a factor of $\cos(a)$.

Remember that sine and cosine are percentages. In this case,

\displaystyle{\sin(a + b) = [\sin(a) \times \text{\% we get for a}] + [\sin(b) \times \text{\% we get for b}]}

or

\displaystyle{\sin(a + b) = [\sin(a) \times \cos(b)] + [\sin(b) \times \cos(a)]}

Sure, we would like to get the full height of each triangle. But from the diagram, we see $a$ slides back and $b$ is twisted, so height we actually get is reduced. Think of each cosine as a tax on your height, reducing the amount you take home. (Have a height of .90? That’s nice, Papa Cosine will let you keep 75%. Pay up the rest, sucka!).

Now, what happens for small angles, like $\sin(.01 + .02)?$

We could plug and chug this. But I’m guessing the result is about:

\displaystyle{\sin(.01 + .02) \sim \sin(.03) \sim .03}

Why? My mental diagram for small angles is this:

There’s no perceptible difference between the ideal heights ($\sin(a)$ and $\sin(b)$) and the “taxed” versions ($\sin(a)\cos(b)$ and $\sin(b)\cos(a)$).

  • For tiny angles, $\sin(a + b)$ is a vertical line. It barely loses any height due to the parts sliding or twisting.
  • For small angles, cosine (the percent we keep), is close to 100%. We’re keeping the vast, vast majority of the height we have.
  • $\sin(x) \sim x$ is a common approximation for small angles (often used in Calculus). Essentially, it says $\sin(x)$ is a line for a brief time period. For small angles, $\sin(a + b) \sim \sin(a) + \sin(b) \sim a + b$.

For cosine, we have a similar diagram:

cosine addition formula combined width

  • This time, the conversion factor matches up (cosine with cosine, sine with sine).
  • The full width of the first triangle ($\cos(a)$) gets scaled down to match the width of the second.
  • The sine term is negative since it pushes us backwards, reducing our height. We can use similar triangles to extract out this piece.

I’m not typically thinking about the parts in the diagram, though it’s nice to see how they work a few times. If you just need the trig identity, crank through it algebraically with Euler’s Formula.

Why do we care about trig identities?

Good question. A few reasons:

1. Because you have to (the worst reason). Many trig classes have you memorize these identities so you can be quizzed later (argh). You don’t need to memorize them, you can work out the formula in about a minute. Save your precious brain space for something else.

2. We can now “factor” trig functions into simper parts. We can now separate sine into smaller parts, which is useful in Calculus.

For example, to find the derivative of sine, we need:

\displaystyle{\lim_{dx \to 0} \frac{\sin(a + dx) - \sin(a)}{dx}}

and we let $dx$ go to zero. This is tricky to work on directly, but using the $\sin(a + b)$ formula we have

\displaystyle{\frac{\sin(a + dx)}{dx} = \frac{\sin(a)\cos(dx) + \sin(dx)\cos(a)  - \sin(a)}{dx}}

As $dx$ goes to zero, $\cos(dx) = 1$ (zero angle is full width), so we have:

\displaystyle{= \frac{\sin(a)(1) + \sin(dx)\cos(a)  - \sin(a)}{dx} = \frac{\sin(dx)\cos(a)}{dx} = \left(\frac{\sin(dx)}{dx}\right)\cos(a)}

And as $dx$ goes to zero, $\sin(dx)$ and $dx$ become equal:

\displaystyle{\lim_{dx \to 0} \frac{\sin(dx)}{dx} = 1}

Plugging this in, we get $\cos(a)$ as the derivative of $\sin(a)$. Phew! Working with trig functions isn’t always easy, but at least it’s manageable.

3. It’s computationally efficient. If you’re doing a computer graphics, and frequently calculating sine/cosine (for dot products let’s say), trig identities are useful shortcuts. In the past, these identities were used similar to log tables to make hand-done calculations easier.

4. Math is about seeing connections. Because trig functions are derived from circles and exponential functions, they seem to show up everywhere. Sometimes you simplify a scenario by going from trig to exponents, or vice versa.

5. Deepen your knowledge of Euler’s Formula. Master Euler’s formula and you’ve mastered circles. And from there, the world! (Editor’s note: Kalid’s pinky appears to be affixed to his mouth. We’re working on it.)

See, Euler’s formula lets us draw a circle and read off a position. That’s amazing! We can avoid a lot of painful geometry with a few multiplications. If you’re doing any advanced math, letting Leonhard Euler deep into your soul is well worth it. He’s good company.

That’s it for today. Happy math.

Appendix: Resources and Extended Formulas

You can modify the parameters $a$ and $b$ to create new identities.

Subtraction formula: replace b with -b

\displaystyle{\sin(a - b) = \sin(a)\cos(-b) + \sin(-b)\cos(a)}

\displaystyle{\cos(a - b) = \cos(a)\cos(-b) - \sin(a)\sin(-b)}

Double-angle formula: replace b with a

\displaystyle{\sin(2a) = \sin(a + a) = \sin(a)\cos(a) + \sin(a)\cos(a) = 2\sin(a)\cos(a)}

\displaystyle{\cos(2a) = \cos(a + a) = \cos(a)\cos(a) - \sin(a)\sin(a) = \cos^2(a) - \sin^2(a)}

Half-angle formula: replace and solve

Start with the double-angle formula and solve for $\sin(a)$, which is half the angle used in $\sin(2a)$. Trig without tears (a great resource and name) has more details:

http://brownmath.com/twt/double.htm

A few other references I found helpful:

Topic Reference

Join 450k Monthly Readers

Enjoy the article? There's plenty more to help you build a lasting, intuitive understanding of math. Join the newsletter for bonus content and the latest updates.

Intuition For The Law Of Cosines

The Law of Cosines is presented as a geometric result that relates the parts of a triangle:

basic triangle

\displaystyle{ c^2 = a^2 + b^2 - 2ab\cos(C) }

While true, there’s a deeper principle at work.

The Law of Interactions: The whole is based on the parts and the interaction between them.

The wording “Law of Cosines” gets you thinking about the mechanics of the formula, not what it means. Part of my learning strategy is rewording ideas into ones that make sense.

  • The Law of Cosines, after cranking through geometric steps we’re prone to forget, looks like $c^2 = a^2 + b^2 – 2ab\cos(C)$.

  • This is suspiciously like the expansion that if $c = (a + b)$, then $c^2 = a^2 + b^2 + 2ab$

  • The difference is that $2ab$ has an extra factor, $\cos(C)$, which measures the “actual overlap percentage” ($2ab$ assumes we fully overlap, i.e. where $\cos(C) = 1$).

  • So, the Law of Cosines is really a generalization of how $c^2 = (a + b)^2$ expands when components aren’t fully lined up. We’re treating geometric lines as terms in an algebraic expansion.

Analogy: The Assistant Chef

Imagine a restaurant with a single chef, Alice. She’s overworked, so Bob is hired as her assistant (sous chef).

Based on Alice’s current performance, and Bob’s performance in his interview, what happens when they work together?

Surely the new result must be their combined effort:

\displaystyle{ \text{Total Contribution} = \text{Alice's Work} + \text{Bob's Work}}

Hah! Office workers everywhere are rolling their eyes. You can’t just assume people contribute identically when they’re put together: there are interactions to account for.

Beyond their individual contributions, the two might slow each other down (Where’d you put the whisk again?), or find ways to work together (I’m peeling carrots anyway, use some of mine.).

In a system with several parts, start with the individual contributions and then ask if their interaction will:

  • Help each other
  • Hurt each other
  • Ignore each other

The original idea that “Total = Alice + Bob” is more generally expressed as:

\displaystyle{ \text{Total Contribution} = \text{Alice's Work} + \text{Bob's Work} + \text{Interaction effects} }

Exploring The Scenario

We need to separate the list of participants (Alice, Bob) from the result of their interaction.

Take the numbers 5 and 3. We can write them like so:

  • Parts = (5, 3)

and we’re pretty sure they combine to make 8. But is there another way to get that conclusion?

law of cosines interaction

Yes: we multiply. Beyond repeated counting, multiplication shows what happens when the parts of a system interact:

\displaystyle{(5 + 3)(5 + 3) = 5^2 + (5)(3) + (3)(5) + 3^2 = 25 + 15 + 15 + 9 = 64 }

We’ve gone from “parts view”, $(5, 3)$, to “interaction view”, $(5 + 3)^2$. The result of interaction mode says the system would result in 64 if it did interact with itself.

One caveat: when going to interaction view, we wrote down $(5 + 3)(5 + 3)$, but we can’t simplify $(5 + 3) = 8$ on the outset. We’re using addition for bookkeeping until multiplication can combine the parts.

Oh, another caveat: why can we just add the interactions, but not the parts? Great question. The individual parts might be pointing in different dimensions, and don’t line up nicely on the same scale. The interacting parts turn into area, which can be combined to the same result no matter the orientation.

law of cosines skew

(I’ll investigate this concept more in a follow-up. It’s a neat idea that area is a generic, easily combinable quantity but individual paths are not.)

Generalizing the Principle

Simple setups like (5, 3) are easy to think through, like eyeballing $2x + 3 = 7$ and guessing $x = 2$. But a more complex scenario like $x^2 + 3x = 15$ requires a systematic approach.

The Law of Cosines is a systematic approach to working through the parts:

  1. List the parts
  2. Get every interaction as area
  3. Add to find the total contribution
  4. Convert into the equivalent “single part”

law of cosines example interaction

The last step is often implied. Once we’ve merged the jumble of interactions, we want the single part that could represent the entire system. Is there a single person (Charlie) whose efforts are identical to that of Alice and Bob working together?

The Law of Cosines gives us a way to find Charlie.

What’s the Deal with Cosine?

When two parts interact, they can help, hurt, or ignore each other:

  • Perfect alignment means they help 100% (5 and 3)
  • Perfect mis-alignment means they hurt 100% (5 and -3)
  • Partial alignment or mis-alignment means they help or hurt by a percentage
  • No alignment means they ignore each other

law of cosines positive and negative behavior

How do we measure alignment? With cosine.

Using our trig analogy, cosine is the percentage an angle moves along the ground.

A 0-degree angle follows the ground perfectly (100%), and moving vertically doesn’t follow it at all (0%). Other angles are a fraction in-between.

If the parts in our system can be written as paths, and we know the angle between them is theta ($\theta$), then we can measure the overlap with cosine. One path acts as the ground, and the other is the path we’re following:

\displaystyle{\text{Overlap percentage} = \cos(\text{angle between them}) }

\displaystyle{\text{Actual interaction} = \text{Max Interaction} \cdot \text{Overlap percentage} = ab\cos(\theta)) }

When paths are perfectly aligned, their full strength is used ($ab$ and $ba$). The interaction factor $\cos(\theta)$ modifies that strength to show much they actually work together.

So, our jumble of interactions becomes:

\displaystyle{\text{Overall behavior} = a^2 + b^2 + ab\cos(\theta) + ba\cos(\theta) }

\displaystyle{\text{Overall behavior} = a^2 + b^2 + 2ab\cos(\theta)}

\displaystyle{\text{Single part} = \sqrt{ a^2 + b^2 + 2ab\cos(\theta)}}

Phew! And that’s the Law of Cosines: collect every interaction, account for the alignment, and simplify it to a single part. (The formula is usually written without the square root, but usually you want $c$, not $c^2$.)

Now, why is the Law of Cosines often written with a negative sign? Well, the assumption is that in a typical triangle, a small internal angle $C$ means the sides are negatively aligned, while theta ($\theta$) is an external look at their alignment:

law of cosines angle positive or negative

Similarly, a large internal angle means the sides are positively aligned, and will help each other. Typically, a small angle means you’re moving in the same direction, but this internal/external difference means we reverse the sign.

Personally, I don’t memorize whether there’s a positive or negative sign: I think about whether the parts will help or hurt each other in the scenario, and make the interaction positive or negative. Don’t be a slave to the formula.

Quick Practice Problem

Let’s say my triangle has side $a = 10$ and side $b = 20$. What is side $c$ when the angle between $a$ and $b$ is:

45 degrees in alignment

Here, we need the Law of Cosines. $a$ and $b$ are pointing partially in the same direction. We switch to interaction mode to get to a common, combinable unit (area):

  • $a^2 = 100$
  • $b^2 = 400$
  • $2ab = 2 \cdot 10 \cdot 20 = 400$, but we need to adjust by the interaction factor. That is $\cos(45) = .707$, so the real interaction factor is $400 \cdot .707 = 282.8$

The overall interactions are:

\displaystyle{100 + 400 + 282.8 = 782.8}

and the equivalent single side (c) is:

\displaystyle{ \sqrt{782.8} = 27.97 \text{cm} }

70 degrees in mis-alignment

Again, we need the Law of Cosines. We can see that the angles fight each other, so the interaction will be negative:

\displaystyle{\text{total interaction} = a^2 + b^2 - 2AB\cos(\theta) = 100 + 400 - (2)(10)(20)\cos(70) = 363.19} \displaystyle{ c = \sqrt{636.8} = 19.05 \text{cm} }

Our intuition says this arrangement should be smaller than the previous one (since the sides aren’t working together), and it is.

Full alignment or mis-alignment

When our “triangle” has an angle of 0 degrees (or 180), all the parts are lying flat. Here, the parts are in the same dimension, and can be treated as regular numbers:

  • Fully aligned: 10 + 20 = 30
  • Fully mis-aligned: 10 – 20 = -10 (pointing in direction of B).

The Law of Cosines still works, of course:

  • Full alignment: $a^2 + b^2 + 2ab\cos(\theta) = 100 + 400 + 400\cos(0) = 900$ and $c = \sqrt{900} = 30$
  • Full mis-alignment: $a^2 + b^2 – 2ab\cos(\theta) = 100 + 400 + 400\cos(180) = 100$ which means $c = \sqrt{100} = 10$ (pointing backwards).

Again, we shouldn’t robotically follow the formula: have a rough idea what the result should be, and think through the calculations. (“The overall interaction is this, so the individual side would that…”).

Thinking of interactions is one interpretation: next time, we’ll see it as the Law of Projections.

Happy math.

Appendix: Pythagorean Theorem

The Law of Cosines resembles the Pythagorean Theorem, no?

Now you might suspect why. The Pythagorean Theorem is the special case of zero interaction, which happens when the sides are at right angles. After all, 90 degree angle is vertical, and has 0% overlap with the ground.

The Law of Cosines becomes:

\displaystyle{ c^2 = a^2 + b^2 + interaction }

\displaystyle{ c^2 = a^2 + b^2 + 0}

If we know the parts won’t interact, we can ignore interaction effects. However, the self-interactions are still there and must be combined: $a^2$ and $b^2$ are fine, but the crossover terms $ab$ and $ba$ disappear.

Here’s another version of the Pythagorean Theorem. We can’t combine $a$ and $b$ directly, so combine their interactions and reduce them to a single part:

\displaystyle{c = \sqrt{a^2 + b^2} }

Appendix: The Geometric Proof

You might be hankering for a geometric proof. Here’s one from quora, based on a paper by Knuth:

law of cosines geometric proof

The insight is that we take our original $a-b-c$ triangle and scale it by $a$ (giving the $a^2-ab-ac$ triangle) and $b$ (giving the $ab-b^2-bc$ triangle). These two triangles build a larger, similar triangle $ac-bc-c^2$, and with some trig, the bottom portion can be shown to equal $a^2 + b^2 – 2ab\cos(\theta)$.

While interesting, I don’t like these types of proofs up front. The Law of Cosines is about interactions, not re-arranging triangles. Does this explanation get you thinking about what cosine represents? About when it should be positive, negative, or zero?

Appendix: Another Way to Remember

Imagine sides A and B are pointing in the same direction along the horizontal number line. This means $c = a + b$ and the Law of Cosines reduces to:

\displaystyle{(a + b)^2 = a^2 + b^2 + 2ab}

So, for a 180-degree interior angle, we get a regular algebraic statement. This helps me remember, on the fly, when to add vs. subtract. We add $2ab\cos(\theta)$ when the interior angle is large.

ADEPT Summary

Concept Law of Cosines
Analogy Imagine an assistant chef whose interactions may (or may not) be helpful.
Diagram Intuition For The Law Of Cosines
Example Suppose $a = 10$ and $b = 20$ in a triangle. If they are aligned 45-degrees, their interaction is $a^2 + b^2 + 2ab\cos(45) = 782.8$ and the remaining side is $\sqrt{782.8} = 27.97$ units long.
Plain-English The Law of Interactions: The whole is based on the parts and the interaction between them.
Technical Triangle with internal angle C: $c^2 = a^2 + b^2 – 2ab\cos(C) $
General interaction: $c^2 = a^2 + b^2 + 2ab\cos(\theta) $

Join 450k Monthly Readers

Enjoy the article? There's plenty more to help you build a lasting, intuitive understanding of math. Join the newsletter for bonus content and the latest updates.

Intuition For The Law Of Sines

The Law Of Sines is something I memorized in a class once, but didn’t internalize:

\displaystyle{\frac{\sin(A)}{a} = \frac{\sin(B)}{b} = \frac{\sin(C)}{c} }

Ok, that’s a neat connection, and maybe we can prove it by drawing some right triangles (of course) and re-arranging terms.

But what does it mean?

Rather than the Law of Sines, think of the Law of Equal Perspectives:

law of sines common circle

Each angle & side can independently find the circle that wraps up the whole triangle. This connection lets us start with one angle and work out facts about the others.

Analogy: Kids Describing A Monster

I occasionally frighten the neighborhood children by unchaining the mutant gorilla in my front yard.

The kids run screaming, telling different stories of what they’ve seen:

“Alice claims the monster was 20 feet tall, but we all know she exaggerates by doubling. And Billy’s a bit of a crybaby, and said it was 30 feet tall. Charlie’s fairly no-nonsense and said the beast was exactly 10 feet high.”

If we know a kid’s “exaggeration factor” and the size they claim, we can deduce the true size of the monster. (Furious George has a name, you know.)

Even better, we can predict what other kids might have said: If Alice claimed it was 40 feet, what would Charlie have said?

Triangles And The Monster Circle

What do kids running from monsters have to do with triangles? Well, every triangle is trapped inside its own Monster Circle:

law of sines single circle

Whatever triangle we draw, there’s some circle trying to gobble it up (technically, “circumscribe it”). Try this page to explore an example on your own.

Now here’s the magic: just knowing a single angle and its corresponding side, we can figure out the Monster Circle.

Here’s how. Let’s say we have a triangle like this:

We don’t know anything except the angle $A$ (call it 30 degrees) and the length of side $a$ (call it an inch).

First off: is this the correct drawing of the triangle? Probably not! We don’t know the other sides, so this is equally valid:

It still has the same angle ($A$ = 30 degrees) and the size of the base hasn’t changed (still one inch).

What if we start drawing more possibilities?

law of sines a's perspective

Whoa. From $A$’s point of view all the possible triangles that have “$A$=30 degrees, $a$=1 inch” are on this circle. Whatever B and C end up being, they need to pick an option from this circle.

Similarly, we can argue this from the other perspectives:

  • We can lock down angle $B$ and side $b$, and trace out a circle of possibilities
  • We can lock down angle $C$ and side $c$, and trace out a circle of possibilities

law of sines unified perspective

This is the meaning of the Law of Sines: each angle unknowingly generates the same circle as the others.

(How do we prove, not just see that the possibilities lie on a circle? That’s the Inscribed Angle Theorem, for another day.)

Calculating The Actual Size

We’ve figured out that there is a Monster Circle, now let’s see how big it is. Um… how?

Remember, we can slide around the circle and keep $A$ (30 degrees) and $a$ (1 inch) the same. So let’s slide until we make a right triangle:

right triangle law of sines

Ah! Now we can use sine. Remember that sine is the percentage height compared to the max possible. The max possible height is the full diameter ($d$) of the Monster Circle.

(Why is a 90-degree angle across from the full diameter? Draw a square inside the circle, touching the sides. It must be symmetric, the diagonals pass through the center along the diameter, and are opposite a 90-degree angle.)

With a little re-arranging, we get:

\displaystyle{ \frac{a}{\sin(A)} = d }

Using the same logic for the other sides, we get:

\displaystyle{ \frac{a}{\sin(A)} = \frac{b}{\sin(B)} = \frac{c}{\sin(C)} = d }

In a way, $\sin(A)$ is the “exaggeration factor” that converts the size the angle measured ($a$) to the full diameter ($d$). Each angle is a different kid, and some really misjudge the size of the full circle based on what they see. (90-degrees is right on target.)

Practice Problem

In our example above, $A$ is 30 degrees and $a$ is 1 inch.

We can calculate the diameter pretty fast. First, we get the sine:

\displaystyle{\sin(30) = 0.5}

That means our length $a$ is 50% of the max height, so the full diameter must be 2 inches.

This isn’t enough to figure out the triangle by itself. Let’s say angle $B$ comes along and says it is 45 degrees. How long is $b$?

Well,

\displaystyle{\sin(45) = .707}

which means that $b$ is .707 of the max diameter. Therefore,

\displaystyle{ b = .707 \cdot \text{2 inches} =  \text{1.414 inches}}

Previously, I would plug numbers into the Law of Sines formula and chug away algebraically. Now I can think in terms of the Monster Circle: “Ok, I have the max diameter. I take the sine, and get the fraction of the max diameter for that side.”

Most books write the formula with sin(A) in the numerator. It might read better “Sine A over A” but it distorts the conclusion that $\frac{a}{\sin(A)}$ is the size of the circle.

Put the concept in your own words. The “Law of Sines” is a generic description of what’s in the formula, but the “Law of Equal Perspectives” explains what it means:

  • All parts of the triangle have a perspective on the whole
  • Sine is the “exaggeration factor” that scales up an individual side to the full diameter. (Sine is the percentage of the max possible, and we divide by it.)

Happy math.

Appendix: Obtuse Angles

Technically, because $B$ is over 90 degrees, we can’t ever spin it and have either $A$ or $C$ be a right angle (if we could, the triangle would have over 180 degrees).

law of sines obtuse angle

What to do? Realize the 180-degree complement of $B$ (call it $B\star$) acts like a stand-in on the other side:

law of sines obtuse angle

$B \star$ has the same sine as $B$, which should make sense: they both point upwards along the same trajectory. To help us sleep better at night, we start with $B \star$ in the right-angle setup:

\displaystyle{\sin(B \star) = \sin(B) = \frac{b}{d} }

and get to the same conclusion as before. Phew.

However, the fact that $B$ and $B\star$ can be swapped can lead to problems.

If I have a triangle where I know $A$ (30 degrees) and $a$ (1 inch), and then say $b$ is 1.5 inches, what can you deduce?

The max diameter is 2 inches as before, so

\displaystyle{\sin(B) = \frac{1.5}{2} = .75}

Unfortunately, there are two angles with that sine value: a calculator says $\sin^{-1}(.75) = 48$ degrees, but $180 – 48 = 132$ degrees would work too (more details).

Also, the triangle may not be possible given a hypothetical scenario. If I say $b$ is 3 inches, you know something’s amiss. The max diameter was already calculated to be 2. Even a 90-degree angle, the best possible, could only have a side of 2 inches.

ADEPT Summary

ADEPT Topic Law of Sines
Analogy Imagine kids describing the same monster with varying degrees of exaggeration.
Diagram Intuition For The Law Of Sines
Example Suppose $A$=30 and $a$=1 inch. Since $\sin(A) = 0.5$, the Monster Circle is 1 / 0.5 = 2 inches wide. Given another angle, I can figure out the length of its side. If $B$ = 45 degrees, then side $b$ takes up $\sin(45) = .707$ of the diameter, and is 1.414 inches.
Plain-English Any angle + side can deduce the size of the wrapping circle.
Technical \displaystyle{\frac{a}{\sin(A)} = \frac{b}{\sin(B)} = \frac{c}{\sin(C)} = \text{diameter of circle} }

Join 450k Monthly Readers

Enjoy the article? There's plenty more to help you build a lasting, intuitive understanding of math. Join the newsletter for bonus content and the latest updates.

How To Learn Trigonometry Intuitively

Trig mnemonics like SOH-CAH-TOA focus on computations, not concepts:

body proportions

TOA explains the tangent about as well as $x^2 + y^2 = r^2$ describes a circle. Sure, if you’re a math robot, an equation is enough. The rest of us, with organic brains half-dedicated to vision processing, seem to enjoy imagery. And “TOA” evokes the stunning beauty of an abstract ratio.

I think you deserve better, and here’s what made trig click for me.

  • Visualize a dome, a wall, and a ceiling
  • Trig functions are percentages to the three shapes

Motivation: Trig Is Anatomy

Imagine Bob The Alien visits Earth to study our species.

Without new words, humans are hard to describe: “There’s a sphere at the top, which gets scratched occasionally” or “Two elongated cylinders appear to provide locomotion”.

After creating specific terms for anatomy, Bob might jot down typical body proportions:

  • The armspan (fingertip to fingertip) is approximately the height
  • A head is 5 eye-widths wide
  • Adults are 8 head-heights tall

body proportions trig analogy

How is this helpful?

Well, when Bob finds a jacket, he can pick it up, stretch out the arms, and estimate the owner’s height. And head size. And eye width. One fact is linked to a variety of conclusions.

Even better, human biology explains human thinking. Tables have legs, organizations have heads, crime bosses have muscle. Our biology offers ready-made analogies that appear in man-made creations.

Now the plot twist: you are Bob the alien, studying creatures in math-land!

Generic words like “triangle” aren’t overly useful. But labeling sine, cosine, and hypotenuse helps us notice deeper connections. And scholars might study haversine, exsecant and gamsin, like biologists who find a link between your tibia and clavicle.

And because triangles show up in circles…

circular path

…and circles appear in cycles, our triangle terminology helps describe repeating patterns!

Trig is the anatomy book for “math-made” objects. If we can find a metaphorical triangle, we’ll get an armada of conclusions for free.

Sine/Cosine: The Dome

Instead of staring at triangles by themselves, like a caveman frozen in ice, imagine them in a scenario, hunting that mammoth.

Pretend you’re in the middle of your dome, about to hang up a movie screen. You point to some angle “x”, and that’s where the screen will hang.

Trig dome analogy

The angle you point at determines:

  • sine(x) = sin(x) = height of the screen, hanging like a sign
  • cosine(x) = cos(x) = distance to the screen along the ground [“cos” ~ how “close”]
  • the hypotenuse, the distance to the top of the screen, is always the same

Want the biggest screen possible? Point straight up. It’s at the center, on top of your head, but it’s big dagnabbit.

Want the screen the furthest away? Sure. Point straight across, 0 degrees. The screen has “0 height” at this position, and it’s far away, like you asked.

The height and distance move in opposite directions: bring the screen closer, and it gets taller.

Tip: Trig Values Are Percentages

Nobody ever told me in my years of schooling: sine and cosine are percentages. They vary from +100% to 0 to -100%, or max positive to nothing to max negative.

Let’s say I paid \$14 in tax. You have no idea if that’s expensive. But if I say I paid 95% in tax, you know I’m getting ripped off.

An absolute height isn’t helpful, but if your sine value is .95, I know you’re almost at the top of your dome. Pretty soon you’ll hit the max, then start coming down again.

How do we compute the percentage? Simple: divide the current value by the maximum possible (the radius of the dome, aka the hypotenuse).

That’s why we’re told “Sine = Opposite / Hypotenuse”. It’s to get a percentage! A better wording is “Sine is your height, as a percentage of the hypotenuse”. (Sine becomes negative if your angle points “underground”. Cosine becomes negative when your angle points backwards.)

Let’s simplify the calculation by assuming we’re on the unit circle (radius 1). Now we can skip the division by 1 and just say sine = height.

Every circle is really the unit circle, scaled up or down to a different size. So work out the connections on the unit circle and apply the results to your particular scenario.

Try it out: plug in an angle and see what percent of the height and width it reaches:

The growth pattern of sine isn’t an even line. The first 45 degrees cover 70% of the height, and the final 10 degrees (from 80 to 90) only cover 2%.

This should make sense: at 0 degrees, you’re moving nearly vertical, but as you get to the top of the dome, your height changes level off.

Tangent/Secant: The Wall

One day your neighbor puts up a wall right next to your dome. Ack, your view! Your resale value!

But can we make the best of a bad situation?

trig wall analogy

Sure. What if we hang our movie screen on the wall? You point at an angle (x) and figure out:

  • tangent(x) = tan(x) = height of screen on the wall
  • distance to screen: 1 (the screen is always the same distance along the ground, right?)
  • secant(x) = sec(x) = the “ladder distance” to the screen

We have some fancy new vocab terms. Imagine seeing the Vitruvian “TAN GENTleman” projected on the wall. You climb the ladder, making sure you can “SEE, CAN’T you?”. (Yeah, he’s naked… won’t forget the analogy now, will you?)

Let’s notice a few things about tangent, the height of the screen.

  • It starts at 0, and goes infinitely high. You can keep pointing higher and higher on the wall, to get an infinitely large screen! (That’ll cost ya.)

  • Tangent is just a bigger version of sine! It’s never smaller, and while sine “tops off” as the dome curves in, tangent keeps growing.

How about secant, the ladder distance?

  • Secant starts at 1 (ladder on the floor to the wall) and grows from there
  • Secant is always longer than tangent. The leaning ladder used to put up the screen must be longer than the screen itself, right? (At enormous sizes, when the ladder is nearly vertical, they’re close. But secant is always a smidge longer.)

Remember, the values are percentages. If you’re pointing at a 50-degree angle, tan(50) = 1.19. Your screen is 19% larger than the distance to the wall (the radius of the dome).

(Plug in x=0 and check your intuition that tan(0) = 0, and sec(0) = 1.)

Cotangent/Cosecant: The Ceiling

Amazingly enough, your neighbor now decides to build a ceiling on top of your dome, far into the horizon. (What’s with this guy? Oh, the naked-man-on-my-wall incident…)

Well, time to build a ramp to the ceiling, and have a little chit chat. You pick an angle to build and work out:

trig ceiling

  • cotangent(x) = cot(x) = how far the ceiling extends before we connect
  • cosecant(x) = csc(x) = how long we walk on the ramp
  • the vertical distance traversed is always 1

Tangent/secant describe the wall, and COtangent and COsecant describe the ceiling.

Our intuitive facts are similar:

  • If you pick an angle of 0, your ramp is flat (infinite) and never reachers the ceiling. Bummer.
  • The shortest “ramp” is when you point 90-degrees straight up. The cotangent is 0 (we didn’t move along the ceiling) and the cosecant is 1 (the “ramp length” is at the minimum).

Visualize The Connections

A short time ago I had zero “intuitive conclusions” about the cosecant. But with the dome/wall/ceiling metaphor, here’s what we see:

Trig all functions in a single diagram

Whoa, it’s the same triangle, just scaled to reach the wall and ceiling. We have vertical parts (sine, tangent), horizontal parts (cosine, cotangent), and “hypotenuses” (secant, cosecant). (Note: the labels show where each item “goes up to”. Cosecant is the full distance from you to the ceiling.)

Now the magic. The triangles have similar facts:

Trig identities from similar triangles and pythagorean theorem

From the Pythagorean Theorem ($a^2 + b^2 = c^2$) we see how the sides of each triangle are linked.

And from similarity, ratios like “height to width” must be the same for these triangles. (Intuition: step away from a big triangle. Now it looks smaller in your field of view, but the internal ratios couldn’t have changed.)

This is how we find out “sine/cosine = tangent/1”.

I’d always tried to memorize these facts, when they just jump out at us when visualized. SOH-CAH-TOA is a nice shortcut, but get a real understanding first!

Gotcha: Remember Other Angles

Psst… don’t over-focus on a single diagram, thinking tangent is always smaller than 1. If we increase the angle, we reach the ceiling before the wall:

Trig alternative

The Pythagorean/similarity connections are always true, but the relative sizes can vary.

(But, you might notice that sine and cosine are always smallest, or tied, since they’re trapped inside the dome. Nice!)

Summary: What Should We Remember?

For most of us, I’d say this is enough:

  • Trig explains the anatomy of “math-made” objects, such as circles and repeating cycles
  • The dome/wall/ceiling analogy shows the connections between the trig functions
  • Trig functions return percentages, that we apply to our specific scenario

You don’t need to memorize $1^2 + \cot^2 = \csc^2$, except for silly tests that mistake trivia for understanding. In that case, take a minute to draw the dome/wall/ceiling diagram, fill in the labels (a tan gentleman you can see, can’t you?), and create a cheatsheet for yourself.

In a follow-up, we’ll learn about graphing, complements, and using Euler’s Formula to find even more connections.

Appendix: The Original Definition Of Tangent

You may see tangent defined as the length of the tangent line from the circle to the x-axis (geometry buffs can work this out).

Tangent

As expected, at the top of the circle (x=90) the tangent line can never reach the x-axis and is infinitely long.

I like this intuition because it helps us remember the name “tangent”, and here’s a nice interactive trig guide to explore:

Trig interactive

Still, it’s critical to put the tangent vertical and recognize it’s just sine projected on the back wall (along with the other triangle connections).

Appendix: Inverse Functions

Trig functions take an angle and return a percentage. $\sin(30) = .5$ means a 30-degree angle is 50% of the max height.

The inverse trig functions let us work backwards, and are written $\sin^{-1}$ or $\arcsin$ (“arcsine”), and often written asin in various programming languages.

If our height is 25% of the dome, what’s our angle?

Plugging asin(.25) into a calculator gives an angle of 14.5 degrees.

Now what about something exotic, like inverse secant? Often times it’s not available as a calculator function (even the one I built, sigh).

Looking at our trig cheatsheet, we find an easy ratio where we can compare secant to 1. For example, secant to 1 (hypotenuse to horizontal) is the same as 1 to cosine:

\displaystyle{\frac{\sec}{1} = \frac{1}{\cos}}

Suppose our secant is 3.5, i.e. 350% of the radius of the unit circle. What’s the angle to the wall?


\begin{aligned}
\frac{\sec}{1} &= \frac{1}{\cos} = 3.5 \\
\cos &= \frac{1}{3.5} \\
\arccos(\frac{1}{3.5}) &= 73.4
\end{aligned}

Appendix: A Few Examples

Example: Find the sine of angle x.

Sine Example

Ack, what a boring question. Instead of “find the sine” think, “What’s the height as a percentage of the max (the hypotenuse)?”.

First, notice the triangle is “backwards”. That’s ok. It still has a height, in green.

What’s the max height? By the Pythagorean theorem, we know


\begin{aligned}
3^2 + 4^2 &= \text{hypotenuse}^2 \\
25 &= \text{hypotenuse}^2 \\
5 &= \text{hypotenuse}
\end{aligned}

Ok! The sine is the height as a percentage of the max, which is 3/5 or .60.

Follow-up: Find the angle.

Of course. We have a few ways. Now that we know sine = .60, we can just do:

\displaystyle{\arcsin(.60) = 36.9}

Here’s another approach. Instead of using sine, notice the triangle is “up against the wall”, so tangent is an option. The height is 3, the distance to the wall is 4, so the tangent height is 3/4 or 75%. We can use arctangent to turn the percentage back into an angle:

\displaystyle{\tan = \frac{3}{4} = .75 }

\displaystyle{\arctan(.75) = 36.9}

Example: Can you make it to shore?

Boat Example

You’re on a boat with enough fuel to sail 2 miles. You’re currently .25 miles from shore. What’s the largest angle you could use and still reach land? Also, the only reference available is Hubert’s Compendium of Arccosines, 3rd Ed. (Truly, a hellish voyage.)

Ok. Here, we can visualize the beach as the “wall” and the “ladder distance” to the wall is the secant.

First, we need to normalize everything in terms of percentages. We have 2 / .25 = 8 “hypotenuse units” worth of fuel. So, the largest secant we could allow is 8 times the distance to the wall.

We’d like to ask “What angle has a secant of 8?”. But we can’t, since we only have a book of arccosines.

We use our cheatsheet diagram to relate secant to cosine: Ah, I see that “sec/1 = 1/cos”, so


\begin{aligned}
\sec &= \frac{1}{\cos} = 8 \\
\cos &= \frac{1}{8} \\
\arccos(\frac{1}{8}) &= 82.8
\end{aligned}

A secant of 8 implies a cosine of 1/8. The angle with a cosine of 1/8 is arccos(1/8) = 82.8 degrees, the largest we can afford.

Not too bad, right? Before the dome/wall/ceiling analogy, I’d be drowning in a mess of computations. Visualizing the scenario makes it simple, even fun, to see which trig buddy can help us out.

In your problem, think: am I interested in the dome (sin/cos), the wall (tan/sec), or the ceiling (cot/csc)?

Happy math.

Update: The owner of Grey Matters put together interactive diagrams for the analogies (drag the slider on the left to change the angle):

interactive-2

Thanks!

Topic Reference

Join 450k Monthly Readers

Enjoy the article? There's plenty more to help you build a lasting, intuitive understanding of math. Join the newsletter for bonus content and the latest updates.