Live data from Hacker News

Why does e to pi i equal -1? (2015) [video]

youtube.com

121–130 of 148 posts

Re: Why does e to pi i equal -1? (2015) [video]

#121
post #63

Earlier quoted context omitted.

Yay skew symmetric matrixes. It's also fun to introduce e as a matrix operator for 3d rotations. It's useful for kinematics and having compact representations for axis angle notations. It's a little far in my head but at some point it felt like a ha-ha moment with the Euler identity, in the "2d version".

In the three-dimensional case, for any practical purpose, use quaternions. https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotati... (At least if you’re ever needing to compose rotations; to apply a quaternion to a big array of 3-vectors, go ahead and convert it to a 3x3 matrix first, which should end up slightly more efficient.) 3x3 rotation matrices are really hard to keep normalized properly, whereas quatern…

Quaternions are a useful tool for manipulating rotations in a lot of common applications. But that wasn't my point here. Also quaternions are hard to grasp by humans. I find axis-angle much more palatable in general.

Imaginary numbers can be represented with a 2x2 skew symmetric matrix with no stretch of the imagination at all. And 3x3 skew symmetric matrixes represent rotations most compactly with only 3 actual variables. Instead of 4 for quaternions, 9 for "classic rotation matrixes", or the need to tell which is the order of the angles if you're given 3 euler angles.

There are interesting applications of Lie Algebra on SO(3) [1], notably in computer vision where a global energy is minimized across two successive rgb-d "shots" in order to recover the infinitesimal rotation [2]. It's going to be easier to minimize energy on something that is most compactly defined, and always amounts to a valid rotation.

[1] https://en.wikipedia.org/wiki/Rotation_group_SO(3)#Lie_algeb... [2] https://vision.in.tum.de/_media/spezial/bib/kerl13icra.pdf

Re: Why does e to pi i equal -1? (2015) [video]

#122
post #113

I had never understood how imaginary numbers had any bearing on physics (probably because I'd never been taught). But lately I've thinking about how all mathematics must have some natural physical equivalent or relation. E.g. how does multiplication happen in nature.. what does it mean really to multiply something?...how does this happen in nature? For the most part, we take these things as facts and learn the mechan…

It's an interesting and unresolved question whether imaginary numbers are fundamental to the nature of physics or just a handy tool to calculate stuff. They are certainly handy for calculating - they are an easy way to represent oscillations.

Maybe it's a mistake to allow imaginary to ever be separate from real numbers ? Another post here brought up how easily it is to work with imaginaries if you just treat them as the vector [re im]. Maybe (philosophically speaking), there are no purely real numbers. Could it be that all quantities in nature must contain a (sometimes zero) Im component ? That might be a more satisfying interpretation than just allowing them to creep in when they are absolutely required, such as polynomial equations.

Re: Why does e to pi i equal -1? (2015) [video]

#123

Earlier quoted context omitted.

Well I was answering the question about why is C considered numbers - it's a field, hence elements of C behave exactly like numbers. Moreover, it's an 'algebraic closure' of R, hence a more natural choice for "all numbers", and it's a maximal one at that (i.e. quaternions and such are no longer fields and don't really behave like numbers, while C still does). Edit: FWIW, I consider the terminology of 'real' vs 'imagi…

We do: вещественная часть и мнимая часть.

Oh yeah, forgot about that. Well, then Russian terms are as stupid.

Re: Why does e to pi i equal -1? (2015) [video]

#124
post #84

1) e^x is a function whose derivative is equal to its value. 2) e^ix is a function whose derivative is equal to its value rotated by 90 degrees (ie^ix). 3) As x goes from 0 to pi, the trajectory of e^ix always has a velocity vector perpendicular to its current position. For example, when x = 0, the current position is 1 and the velocity vector is i. 4) So the trajectory a circle arc of length pi, which ends at -1.

I think you should explain step 2 in more detail.

[deleted]

Re: Why does e to pi i equal -1? (2015) [video]

#125

1) e^x is a function whose derivative is equal to its value. 2) e^ix is a function whose derivative is equal to its value rotated by 90 degrees (ie^ix). 3) As x goes from 0 to pi, the trajectory of e^ix always has a velocity vector perpendicular to its current position. For example, when x = 0, the current position is 1 and the velocity vector is i. 4) So the trajectory a circle arc of length pi, which ends at -1.

First time I understood this.

Thank you for that.

Re: Why does e to pi i equal -1? (2015) [video]

#126

1) e^x is a function whose derivative is equal to its value. 2) e^ix is a function whose derivative is equal to its value rotated by 90 degrees (ie^ix). 3) As x goes from 0 to pi, the trajectory of e^ix always has a velocity vector perpendicular to its current position. For example, when x = 0, the current position is 1 and the velocity vector is i. 4) So the trajectory a circle arc of length pi, which ends at -1.

First time I understood this. Thank you for that.

You're welcome :-)

Re: Why does e to pi i equal -1? (2015) [video]

#127
post #98

Earlier quoted context omitted.

Well, I'm the guy in the black shirt who did the demo. If you liked that lecture, I'm already starting on some verilog implementations. This is an example multiplication 8 bit * 8 bit -> 16 bit unpacked (20 bits). It differs from standard floating point in that the fractions are stored as two's complement. It takes a little bit of wrapping your head around, but the hidden bit for negative numbers is actually -2 ! Mom…

Posits look too good to be true! Is there a reason why regime bits do not include the sign bit? Then both "0 0001" and "1 1110" could be interpreted as 4 regime bits. Even better we could include the last flipped bit as well and we would have 5 bits. Edit: Well. I see it would result in losing the values 0 and 1. Another question: Since it is fixed length of 4 bits (for N=32) why don't we just extract the 4 bit value…

I wouldn't screw around too much with the sign bit. The way it's laid out is really kind of cool... Negation is simple two's complement.

In my software posit library (which is intentionally strictly binary and not backended by IEEE floats), (https://github.com/interplanetary-robot/SigmoidNumbers) I did everything by first inverting negative numbers and doing decode in the positive domain.

As I design the hardware, it's actually better to NOT do a two's complement inversion to do the decode, and keep the fraction as two's complement!

Also the 4 bit posit was just a simplification to help you understand the structure from a constructive point of view. posits can be of arbitrary length; they have a property I call isomorphic - so appending zeros exactly preserves the value of a short posit when increased in length; conversely, rounding a long posit to a shorter one reports the "nearest representable value".

Re: Why does e to pi i equal -1? (2015) [video]

#128

1) e^x is a function whose derivative is equal to its value. 2) e^ix is a function whose derivative is equal to its value rotated by 90 degrees (ie^ix). 3) As x goes from 0 to pi, the trajectory of e^ix always has a velocity vector perpendicular to its current position. For example, when x = 0, the current position is 1 and the velocity vector is i. 4) So the trajectory a circle arc of length pi, which ends at -1.

Minor wording: e^x is a function whose derivative is equal to itself, or the value of whose derivative is equal to its own value. This might be considered the kind of excessive precision that obscures rather than clarifies (as would be, for example, writing x ↦ e^x in place of just e^x), but lots and lots of confusion can result (especially in a function-analytic setting) from failing to distinguish between a function and its values.

Re: Why does e to pi i equal -1? (2015) [video]

#129
post #81

Earlier quoted context omitted.

Well, I'm the guy in the black shirt who did the demo. If you liked that lecture, I'm already starting on some verilog implementations. This is an example multiplication 8 bit * 8 bit -> 16 bit unpacked (20 bits). It differs from standard floating point in that the fractions are stored as two's complement. It takes a little bit of wrapping your head around, but the hidden bit for negative numbers is actually -2 ! Mom…

Way cool -- I realized that when I checked out your profile just after posting the comment -- what timing -- I discovered the video a few days ago when looking for precise/compact interval representations. Interesting work indeed. Has there been much traction for getting major chip manufacturers to implement this? I know they're all looking for the next big thing and Intel is working on specialized neuromorphic chips…

well seeing as how John invented these numbers literally two months ago, I haven't seen any traction yet! But I am persuing fundraising opportunities. In the demo I showed how you can effectively reduce the bitwidth to 8 bits and still train in a very trivial machine learning exercise. I'm currently enrolled in the udacity machine learning class and implementing everything in parallel in julia so that I can try more complicated architectures using posits.

I do have a hardware architecture in mind for how to very effectively and efficiently execute machine learning calculations using posits.

Re: Why does e to pi i equal -1? (2015) [video]

#130

Earlier quoted context omitted.

It's not really any clearer to me. I cannot generalize my understanding of exponents to anything that deals with imaginary numbers.

For me what made it clicked is realizing that complex numbers are 2D matrices: z = x + i y = [[x -y][y x]]. So really we should be writing z = x * [[1 0][0 1]] + y * [[0 -1][1 0]], but since it's tedious we just call 1 == [[1 0] [0 1]] the 2x2 identity matrix and i == [[0 -1][1 0]], and check that i^2 = -1. Then no more magical i number, the complex product can be derived from the matrix product, the exponential beco…

Using a matrix as an exponent isn't any more comprehensible than an imaginary number to me. If it works for you, that's great, but it's not much help to me.
Post reply on HN