# $2^z$ behavior when changing real and imaginary components of $z$

I'm reading The Music of the Primes by du Sautoy and I've come across a section that I'm having difficulty understanding:

Euler fed imaginary numbers into the function $2^x$. To his surprise, out came waves which corresponded to a particular musical note. Euler showed that the character of each note depended on the coordinates of the corresponding imaginary number. The farther north one is, the higher the pitch. The farther east, the louder the volume.

My understanding here is that the results are dependent on the sine function and that the real part of the exponent affects the amplitude and the imaginary part of the exponent affects the frequency.

I'd like to understand this more intuitively, which I tend to get through visualization. So I went to Wolfram Alpha and started with graphing $2^{x+iy}$. That wasn't very helpful.

So I tried graphing it with fixed $x$ values, and indeed, I could see the amplitude of the (now 2D) graph changing.

I also see that $2^{x+iy}$ is also expressed as $2^x \cos(y \log(2))+i 2^x \sin(y \log(2))$ and I think I can see that changing the value of $x$ would affect the amplitude.

I'm unable to demonstrate the frequency changing by setting y to specific values.

What am I missing? (...Other than a semester in a Complex Analysis class!)

edit:

So while reading more online, I came across this blog that makes a similar claim. I suspect the book of oversimplifying, but wonder if this explains what was simplified?

[...] But $x^{z-1} + x^{\bar{z} - 1}$ is just a wave whose amplitude depends on the real part of $z$ and whose frequency depends on the imaginary part (i.e., if $z=a+biz=a+bi$, then $x^{z-1} + x^{\bar{z}-1} = 2x^{a-1} cos (b \log x)$) [...]

(I copied this from the blog, but removed some odd \'s ...)

Is it the inclusion of the conjugates that causes this amplitude/frequency?

• Since the question was edited recently, it might be useful to mention that $2^z$ is not uniquely defined when $z$ is complex not real. For example, $2^i$ could quite legitimately be decided to equal $$e^{42\pi}\,(\cos(\log2)+i\sin(\log2)),$$ instead of the choice the OP probably has in mind. – Did May 27 '16 at 6:08
• I recommend you define frequency. Most definitions of frequency answer this question relatively quickly. Period may also be another term you are interested in. – Simply Beautiful Art Nov 29 '16 at 0:42
• Since the question is at least partially about what du Sautoy meant, it would be helpful to include some more context. Could you quote the paragraphs before and after the "Euler fed imaginary numbers..." quote? Does he say anything else about waves? – Chris Culter Dec 1 '16 at 21:46

The issue is that as far as I know, there is no canonical way of translating a "musical note" into a complex number - however you can translate it into a complex function. As SolUmbrae wrote, a note is simply a sine or cosine function defined by its amplitude, frequency and offset. To keep it simple, let's forget about the offset. A pure note (single frequency) can then be written as $f(t) = A\cdot\cos(\omega\cdot t)$, where $t$ represents time. The higher $A$ is, the louder the note will be; the higher $\omega$ is, the higher the pitch.

You can rewrite $f(t)$ as $f(t) = \Re(A\cdot e^{i\omega t})$ (the real part of the complex function $A\cdot e^{i\omega t}$).

This is where the conjugate comes in in your edit : $z + \overline{z} = 2\cdot\Re(z)$ for any complex number $z$, so adding the conjugate allows you to work with real numbers instead of complex ones (but this is besides the point of your original question).

Let's forget about taking the real part and keep $\psi(t) = A\cdot e^{i\omega t}$ as a simple way to represent a sinusoidal wave function (in other words, a note).

I'm going to make one more simplification and consider $e^z$ rather than $2^z$ as the formula to turn complex numbers into notes (this will get rid of the $\log(2)$ in the formula). We then have $e^z=e^{x+iy}=e^x\cdot e^{iy}$ as a formula for "musical notes".

How can we reconcile our two formulas for $e^z$ and $\psi(t)$? We can see that $A$ and $\omega$ are enough to completely define $\psi(t)$ (if you know those two number, you can reconstruct the function) so, in that sense, $\psi(1) = A\cdot e^{i\omega}$ is enough to define a note. Putting it all together, $\psi(1) = A\cdot e^{i\omega} = e^{\log(A)}\cdot e^{i\omega} = e^{\log(A)+i\omega} = e^z$ where $z = \log(A) + i\omega$. In other words, the real part of $z$ corresponds to the (logarithm of) the amplitude of the note, and the imaginary part corresponds to the pitch. The higher $x$ is, the louder the note; the higher $y$ is, the higher the pitch.

Note : this is by no means a rigorous demonstration; it makes several simplifying assumptions, and it conflates the exponential function and the representation of a complex number as $e^{iz}$. But I hope it's enough to grasp the intuition of representing a sine function as a real and imaginary part.

• What you write is all very clear, but I am still not convinced it explains the issue. I personally believe it's quite a stretch for du Sautoy to write that what comes out of $k^z$, with real $k$ and complex $z$, is a wave. What comes out of this function is simply a complex value, period. Without a third variable such as $t$, $A\cdot e^{i\omega}$ is simply a complex number which can be decomposed into a sum of a sine and a cosine using Euler's formula, but that doesn't make it into a wave. – gilbertohasnofb Dec 2 '16 at 19:36
• In this case, "the farther north one is", the larger the imaginary part of the result is. It is still baffling to me what is the comparison with waves and frequencies. – gilbertohasnofb Dec 2 '16 at 19:36

I don't have much to say but I had a complex analysis class and as far as I can tell that wouldn't be of any help.

To understand $2^x \cdot (\cos(y\ln 2) + i \sin(y\ln 2)$ as a pure-note-wave, which is of the form $A\cdot(\cos(\omega \cdot t + \phi_0)$ with so-called amplitude $A$, frequency $\omega$, phase-offset $\phi_0$ (these are just parameters) and time $t$ (which is your independent variable), $y$ would have to be seen as the "time", which is what you are doing when you fix values of $x$ (fixing $A$) and look at the 2D-graph with $y$ on the horizontal axis (if you look at the real part you get consider $\phi_0=0$, for example).

So if $y$ is the "time", then the frequency is always $\omega = \ln 2$, so the pitch is always the same (determined by the exponential base).

I think the book should say "If you go from south to north, you observe (in the real part) a single note wave, whose pitch is always the same and whose amplitude is higher, the further east you chose your path."

• (FYI, You've transcribed the cos/sin expression incorrectly) – rrauenza Jan 15 '16 at 23:53
• This seems to contradict du Sautoy's point -- From what I've heard this frequency component is important. I also tried looking at the equation from a polar coordinates point of view, but then just got further lost. – rrauenza Jan 15 '16 at 23:55