How exactly are trig functions related to complex numbers?

The discussion in this thread veered off into obsolete trig functions which reminded me of a question I’ve been meaning to ask.

I did basic trigonometry in high school and have made a study of more advanced trigonometry stuff now that I am taking calculus again. I never had a proper pre-calc course in high school (went straight from Algebra II to AP Calc after a crash-course in trig identities) so I never got a really good feeling for how these things worked, aside from remembering SOHCAHTOA. For example, I only just recently began to really understand the unit-circle definition, and now I wonder why they bother teaching the triangle version at all.

But anyway, in that thread Darleth mentioned

And I’ve heard before that trig functions are related to complex numbers in some way but I’ve never seen a clear explanation of this. If sine, for example, is just the Y coordinate on the unit circle where a given angle intersects, how is that related to complex numbers?

This is the simple, all-equation answer. In short, all trig functions can be represented as e (Euler’s constant) raised to some imaginary power (i times your input value, more or less), possibly with some obscure fiddling around to get precisely the function you want. This is all part of Euler’s Formula, which is just beautiful.

I’m afraid I’m going to need something with a lot more English in it.

Euler’s formula is the answer to your question. What’s not clear about it?

Is that a serious question? Saying “foo is equal to bar because foo equals bar” is not very helpful when one is trying to understand the nature of foo and bar.

Did you see the recent thread I challenge you to explain [the beauty of] Euler’s Equation in terms I can understand?

And here’s a bit from Wikipedia: Relationship [of trigonometric functions] to exponential function and complex numbers

Derleth’s comment might have been inspired by the formulas (seen there):
sin [symbol]q[/symbol] = (e[sup]i[symbol]q[/symbol][/sup]-e[sup]-i[symbol]q[/symbol][/sup])/2i
cos [symbol]q[/symbol] = (e[sup]i[symbol]q[/symbol][/sup]+e[sup]-i[symbol]q[/symbol][/sup])/2

I did see that thread, though I wasn’t really able to follow most of it. The wikipedia link does help somewhat, but I guess where I get stuck is that I still don’t understand what it means to raise something to an imaginary power. I mean, e[sup]4[/sup] is easy to understand because it’s just eee*e, but how does one “count” i e’s?

What’s your take on e^sqrt(2)? That’s a serious question meant to gauge your level of understanding, not snark of some kind.

Well, I understand some non-integer powers like x[sup]1/n[/sup] is the nth root of x, and I understand why that works because of the opposite operation, if you raise that to the nth power then you multiply 1/n * n and you end up back at x.

I don’t really know what to make of a sqrt(2) power.

What it means to raise something to an imaginary power:

Multiplication: What’s the key property of multiplication? Well, for some purposes, the key property of multiplication is that it distributes over addition; f(x + y + z + w + …) = f(x) + f(y) + f(z) + f(w) + … I’ve used parentheses here suggestively; you can read “f(x)” both as meaning “f times x” or as meaning “a function f, applied to an input value x”. This is intentional; for any operation f with this distributivity property, let us feel free to think of applying f to an input value as a kind of multiplication. Thus, we have a notion of multiplying an “operation” by an input “value”.

More about multiplication: Alright, now what about an expression like f * g * v, where f and g are “operations” and v is a “value”? Well, one way of reading this expression is as f * (g * v); by our above considerations, this amounts to f applied to (g applied to v); i.e., f(g(v)). Another way of reading this expression is as (f * g) * v; i.e., (f * g) applied to v. Very well; let us set these two equal [(f * g)(v) = f(g(v))] and say this provides us with a definition of what it is to multiply two operations: f * g is the composite function which first applies g to an input, then applies f to the result of that.

Similarly, the equation 1 * v = v gives us a definition of what 1 is as an operation; it’s the identity function [since 1(v) = v for any input value v].

More about addition, then: What about an expression like (f + g) * v? Well, normally, we want multiplication to distribute on both sides; that is, we want (f + g) * v = f * v + g * v. Very well; in our operational terms, this means (f + g)(v) = f(v) + g(v). So, again, we can take this to provide us with a definition of what it is to add two operations; f + g is the function which, in parallel, applies f to some input and applies g to the same input, then adds the results of these together.

Similarly, the equation 0 * v = 0 gives us a definition of what 0 is as an operation; it’s the constantly zero function [since 0(v) = the value 0 for any input value v. Note that there’s two different "0"s here: one is an operation, one is a value which is an input to that operation].

Pause for an example (the complex numbers!): So far, I haven’t said what kinds of values and what kinds of operations I want to consider. Well, all the above works very, very generally, but in particular, what I’m interested right now is the case where the values I’m looking at are 2d vectors. Some distributive operations on 2d vectors include rotation; e.g., consider the function f(x) = x rotated by 35 degrees (in the direction from <1, 0> to <0, 1>). So, for example, f(<1, 0>) = <cos(35 degrees), sin(35 degrees)>. In fact, rotation by any particular angle is a distributive operation. So operations like “Rotate 182 degrees” can be thought of as multiplications, just as we’re already used to thinking of things like"Become twice as large" as a multiplication.

One extremely common and important rotation function is the one defined by n(x) = x rotated by 180 degrees. [So that, e.g., n(<2, 4>) = <-2, -4>]. Note that n(v) + v = 0 for any vector v. In other words, (n + 1) * v = 0 * v for all v; in other words, n + 1 = 0. In this sense, n = -1, and indeed, we usually do use the name “-1” for this operator, even though we could just as well call it “rotate by 180 degrees” or “half turn” or such things.

Another extremely common and important rotation function is the one defined by i(x) = x rotated by 90 degrees. [So that, e.g., i(<1, 0>) = <0, 1> and i(<0, 1>) = <-1, 0>). Note that i(i(v)) = n(v) for any vector v [since rotating something by 90 degrees and then rotating it by 90 degrees again is as good as rotating it by 180 degrees]. In other words, i * i * v = n * v; in other words, i * i = n = -1. In this sense, i is a square root of -1, and indeed, often, is introduced and conceptualized solely in these terms, even though we could just as well call it “rotate by 90 degrees” or “quarter turn” or such things.

Continuing on to exponentiation: Just as the key property of multiplication was that it turned addition of inputs into addition of outputs, the key property of exponentiation is that it turns addition of inputs into multiplication of outputs. That is, b^(f + g + h + …) = b^f * b^g * b^h * … As before, let us feel free to think of any function with this sort of property as exponentiation with some base. For now, let us restrict the inputs to such a function to be real numbers >= 0.

In particular, consider the function r(t) = the “rotate by t many radians” operation. This function sends any input angle t (in radians) to an output operation on 2d vector spaces. What’s more, it satisfies the all important property to be thought of as exponentiation: r(t) * r(s) = r(t + s), since r(t) * r(s) * v = (v rotated by t radians) rotated by s radians = v rotated by (t + s) radians = r(t + s) * v. So instead of writing r(t), we’ll feel free to write r^t instead.

Natural logarithms: By ln(x), I mean the derivative of x^t with respect to t when t = 0; that is, ln(x)/unit of time is the “interest rate” of the kind of exponential growth where one multiplies by x over every unit of time.

Note: Although an exponential function isn’t necessarily uniquely determined by its value at 1 [knowing b^1 doesn’t necessarily tell one what b^0.5 is, for example], is uniquely determined by its “interest rate”; that is, the function which sends t to b^t is entirely specified by ln(b).

General exponentiation: One key equation, justified quite readily when p is one of our already allowed exponents [a non-negative real number], is that ln(b^p) = p * ln(b). But we can use this to define exponentiation even when p is a more general type of entity; once we know what b and p are, we know what p * ln(b) is, which tells us what ln(b^p) should be, which tells us what the exponential function with base b^p is. In other words, the function sending t to (b^p)^t is the exponential function whose “interest rate” is p * the interest rate of the function sending t to b^t. Now we know how to carry out exponentiation with all kinds of exponents, not just non-negative real exponents. For example, 5^(rotate by 35 degrees) is the result of exponential growth for one unit of time, in such a way as that one’s rate of growth is always equal to one’s current value * ln(5), rotated by 35 degrees, per unit of time. It’s just the solution to some differential equation in the context of 2d space. Nothing magical.

Euler’s theorem: Returning to the concepts of rotation, exponential growth, natural logarithms, etc., one particular, not really all that amazing fact is that ln® = i, which is simply to say “The derivative at t = 0 of the ‘rotate by t radians’ operation is the ‘rotate by 90 degrees’ operation”. This amounts to little more than recognizing that the tangents to a circle are perpendicular to its radius [and remembering how radians are defined as arclength to radius ratios]. However, this isn’t terribly important really for recognizing the relationship between complex numbers and rotation. Still, it’s there.


I’ll continue from here later, though it should be enough to indicate some of the relationship between complex numbers and rotation. Since trigonometry is fundamentally the study of rotation (and not really so much about triangles, as such, despite the name), this gives us the bridge between complex numbers and trigonometry.

This doesn’t make any sense to me. You’re talking about multiplying x, then you bring up some “operation.” What is this operation and where is it coming from, and how is it different from x, which I presume is still a variable?

I’m afraid the rest of the post is lost on me since I don’t understand what you’re talking about here.

Pretend x is a 2d vector and f is a function from 2d vectors to 2d vectors [or a computer program that reads in the value of some register containing a 2d vector and then modifies that register, or such things]. All I’m saying is, instead of writing “f(x)” as one normally would for the result of applying the function f to the vector x, one could just as well say “f * x”, and indeed think of function application as a kind of multiplication. You can think of any function with the suitable distributivity property as as good as multiplication by some constant.

By “operation”, all I basically mean is “function”. Sorry for swapping between the two words.

If it helps, you can also replace “function” throughout with “matrix”. Multiplying a matrix by a vector is as good as applying a certain linear function to that vector, and that is the entire raison d’être of matrices. I just started from a more primitive point than that (explaining why multiplication of matrices should be composition of linear functions and addition of matrices should be, well, pointwise addition of linear functions), but if you’re already comfortable with matrices, including in particular rotation matrices, then you can jump right to the exponentiation section.

All right, I get all the stuff about composite functions, but I don’t really understand how a rotation function is analogous to multiplication, unless you’re just redefining multiplication to mean “any function.”

:confused: I thought n here is a function of vectors? What does n + 1 mean then?

I still don’t understand what you’re doing here. Now we’re defining i as a function, but then it’s not a function, it’s sqrt(-1). This doesn’t make any sense to me.

Let me try to make it simpler:

Suppose there were a “number” R, with the property that for any angle t and any 2d vector v, (R^t) * v = the vector resulting from rotating v by the angle t. Let’s not worry too much about what “numbers” are, or what multiplication and exponentiation “really mean” for now, or even what kinds of things you’re allowed to multiply or add or whatever. We can talk about such details later. For now, let’s just concern ourselves with what we get if we think about such an entity as R and allow ourselves to use some familiar principles of arithmetic with it in certain ways.

Well, clearly, R has a lot to do with rotation. Hell, talking about rotation and talking about R are basically the same thing. So, clearly, R is closely tied to trigonometry, since, as you’ve already essentially realized, trigonometry is the study of rotation.

But what does R have to do with complex numbers?

Well, consider R^(180°). Since rotating a vector by 180° leaves it equal in size but makes it exactly opposite in direction, we have that R^(180°) * v = -v = -1 * v. Cancelling out v, in some sense, we get that R^(180°) = -1.

Now consider R^(90°). Since rotating a vector by 90° twice in a row is the same as rotating it by 180° cumulatively, we have that R^(90°) * R^(90°) * v = R^(180°) * v. Cancelling out v, in some sense, we get that R^(90°) is the square root of R^(180°). Since, as we saw before, R^(180°) can be thought of as -1, then we can think of R^(90°) as a square root of -1. Which is the familiar way in which complex numbers are introduced.

So simply introducing such a number as R [a way of thinking about rotations as “numbers” in themselves] is enough to immediately present a bridge between trigonometry and complex numbers. That’s the fundamental connection between trigonometry and complex numbers.

[You don’t actually need e for any of this, though there’s certainly stuff to be said about e whenever one talks about exponentiation]

OK, but why are you allowed to make v disappear here? Shouldn’t it be (R^(180°))/v = -1?

That’s exactly right. I want you to think of applying any function as a kind of multiplication. And why not? At least, any function which distributes over addition in the right way.

That’s also correct. n is a function on vectors. And so is n + 1. Specifically, n + 1 is the function defined so that (n + 1)(v) = n(v) + v, just as you would expect if function application were the same thing as multiplication.

i is both a function and sqrt(-1). If we’re willing to talk about adding and multiplying functions [as I’m trying to get you to be willing to do, on certain accounts of what it means to add or multiply functions], then there’s no difficulty in saying “i is a function with the property that i * i + 1 = 0”.

You may have a prejudice against thinking of functions and numbers as the same sorts of things; you may have a prejudice against thinking of functions as arithmetic entities capable of being added, multiplied, etc. It’s understandable that you should find this an odd way of viewing things, since so rarely do we stress it in mathematics education. Yet, it is quite fundamental! Indeed, releasing yourself from this prejudice will allow you to view things in some very nice ways; it will make many things much more understandable and even simple, at least once you get over the initial, perhaps daunting hump of learning to think at such a level of abstraction.

And besides, as I said, it’s exactly what’s going on when one talks about matrix arithmetic, which you may already be familiar with; one is essentially adding and multiplying linear functions on vector spaces, only one calls them “matrices” instead of “functions”.

Anyway, ignore the above post if you like, since I think the simpler explanation may be connecting better*. So, responding on that line:

There’s a v on both sides of the equation, the left and the right. We start with R^(180°) * v = -1 * v; if I divide out v from both the left and the right, we end with R^(180°) = -1.

[*: I think the only really good way to teach math is in dialogue, in back-and-forth conversation. Alas, the latency of a message board messes with this a bit, but I’ll try my best to modify my explanations to match your needs and where you’re coming from. Continue letting me know what works and what doesn’t.]

Ah, right. OK. Well let me read over this stuff again and I’ll bug you with more questions.

How about something with pictures? Give these three articles a go. This writer has a knack for explaining math:

  1. A Visual, Intuitive Guide to Imaginary Numbers
  2. An Intuitive Guide To Exponential Functions & e
  3. Intuitive Understanding Of Euler’s Formula

These are FANTASTIC. Thanks.

I’m still a little unclear on what’s going on with imaginary exponents but I think that’s because I have some block about continuous growth vs. repeated multiplication. I suspect this is due to not really having enough practice with logarithms.