logoalt Hacker News

ActorNightlyyesterday at 9:13 PM2 repliesview on HN

>"Rotations fell out of the structure of complex numbers. They weren't placed there on purpose. If you want to rotate things there are usually better ways."

I mean, the derivation to rotate things with complex numbers is pretty simple to prove.

If you convert to cartesian, the rotation is a scaling operation by a matrix, which you have to compute from r and theta. And Im sure you know that for x and y, the rotation matrix to the new vector x' and y' is

x' = cos(theta)*x - sin(theta)*y

y' = sin(theta)*x + cos(theta)*y

However, like you said, say you want to have some representation of rotation using only 2 parameters instead of 4, and simplify the math. You can define (xr,yr) in the same coordinates as the original vector. To compute theta, you would need ArcTan(yr/xr), which then plugged back into Sin and Cos in original rotation matrix give you back xr and yr. Assuming unit vectors:

x'= xr*x - yr*y

y'= yr*x + xr*y

the only trick you need is to take care negative sign on the upper right corner term. So you notice that if you just mark the y components as i, and when you see i*i you take that to be -1, everything works out.

So overall, all of this is just construction, not emergence.


Replies

sreanyesterday at 9:31 PM

Yes it's simple and I agree with almost everything except that arctan bit (it loses information, but that's aside story).

But all that you said is not about the point that I was trying to convey.

What I showed was you if you define addition of tuples a certain, fairly natural way. And then define multiplication on the same tuples in such a way that multiplication and addition follow the distributive law (so that you can do polynomials with them). Then your hands are forced to define multiplication in very specific way, just to ensure distributivity. [To be honest their is another sneaky way to do it if the rules are changed a bit, by using reflection matrices]

Rotation so far is nowhere in the picture in our desiderata, we just want the distributive law to apply to the multiplication of tuples. That's it.

But once I do that, lo and behold this multiplication has exactly the same structure as multiplication by rotation matrices (emergence? or equivalently, recognition of the consequences of our desire)

In other words, these tuples have secretly been the (scaled) cos theta, sin theta tuples all along, although when I had invited them to my party I had not put a restriction on them that they have to be related to theta via these trig functions.

Or in other words, the only tuples that have distributive addition and multiplication are the (scaled) cos theta sin theta tuples, but when we were constructing them there was no notion of theta just the desire to satisfy few algebraic relations (distributivity of add and multiply).

show 1 reply
direwolf20today at 12:04 AM

You can define that, but (if you don't already know about complex numbers) it's not obvious that it does anything mathematically interesting. It's just a cache for sin and cos, not a new type of anything. I could say that when evaluating 4th degree polynomials it's useful to have x, x^2 and x^3 immediately at hand, but the combination of those three isn't a new type of number, just a cache.

show 1 reply