logoalt Hacker News

Chinjuttoday at 2:31 PM1 replyview on HN

This is like how one often wants to distinguish the points of an affine space from the vectors representing displacements in that space (there is no distinguished origin for the physical world, but there is a distinguished concept of zero displacement). One can add a vector to a point to get a point, or a vector to a vector to get a vector, but cannot add a point to a point to get another point. Yet, it is meaningful to treat a linear combination of points in an affine space as yielding another point in the same space when the weights of the linear combination sum to 1.

The exact same thing is happening here, only multiplicatively, where z1^(1/2) * z2^(1/2) is a combination with two weights of 1/2 (thus, summing to 1). It is geometrically meaningful to treat 2d vectors (displacements in a plane) as complex numbers, raise them to exponents summing to 1, and then multiply these together to get another vector in the same plane. But it is not generally geometrically meaningful to just multiply one vector by another vector to get a third vector in the same space (because this would require distinguishing some particular direction and magnitude as "1").


Replies

sreantoday at 2:38 PM

I agree with you on three dimensional vector products. It's too special, too cute and doesn't generalize to all dimensions, and as you said, you have to keep track of the two types of vectors.

On complex multiplications though, I disagree. It's a great way to do Euclidean manipulations on the 2d plane. Rotations, translations and reflections (via conjugates) are simple. You rarely need calls to trigonometric functions.

If you have runtime support, it's sorta criminal not to use complex multiplication when applicable.

BTW there is another, equivalent, way of deriving the solution which to me seems more intuitive (and not limited to sum of powers to 1):

The angular travel from z1 to z2 is

   z2 / z1. 
I want to travel half of that, so

   √(z2/z1). 
This half travel I apply to z1 like so

    √(z2/z1) * z1
done.

If the need was to continue to travel angularly (rotate) beyond z2, say double the subtended angle, that's easy too. No need for the constraint the sum of powers be 1.

show 2 replies