# Sideband #73: Complex 4D

I’ve written a number of posts about four-dimensional Euclidean space, usually in the context of one of my favorite geometrical objects, the tesseract. I’ve also mentioned 4D Euclidean spaces as just one of many possible multi-dimensional parameter spaces. In both cases, the familiar 2D and 3D spaces generalize to additional dimensions.

This post explores a specialized 4D space that uses complex numbers along each axis of a 2D nominally Euclidean space. Each X & Y coordinate has two degrees of freedom, a magnitude and a phase. This doesn’t make 4D spaces easier to visualize, but it can offer a useful way to think about them.

It also connects back to something I wrote about in my QM-101 series.

Let’s start with a quick review of complex numbers, the complex plane, and why complex numbers are so useful. Firstly, an imaginary number is a multiple of i, the imaginary unit, the seemingly impossible square root of -1.

$\displaystyle{i}=\sqrt{-1}$

So an imaginary number has the form:

$\displaystyle{r}{i}$

Where r is some real number (which may be negative). This creates a separate axis, an imaginary axis, that we view as orthogonal to the real number axis. Together they create a two-dimensional Euclidean space we call the complex plane:

Figure 1. The complex plane. The complex numbers in blue denote the real axis; in red denote the imaginary axis; and in black denote the origin. Others are in purple. The center gray square is the unit square.

A complex number is an inherently two-dimensional number that represents a point on this plane. The real and imaginary parts create a value with two degrees of freedom:

$\displaystyle{z}=(a+bi)$

The real part, a, and the imaginary part, bi, each have a real number that gives the length along the respective axis. The two provide a Euclidean XY-type coordinate for the plane.

[For more, see: “Imaginary” Numbers and The Complex Plane.]

§

If we treat the complex plane as a 2D vector space, each complex number is then a vector — an “arrow” pointing from the origin to the point representing the number. Seen as a vector, a complex number has a length (magnitude, aka modulus, aka absolute value) and an angle (argument). Viewing complex numbers as vectors links multiplication to rotation, and rotation is linked to general wave mechanics through sine waves and spinning things.

One way to write a complex number that reflects its argument and magnitude uses basic trigonometry:

$\displaystyle{z}=\eta(\cos\theta+{i}\sin\theta)$

Where eta (η) is the magnitude and theta (θ) is the angle. Given a complex number in coordinate form, z=(a+bi), we can derive both eta and theta:

$\displaystyle\eta=|z|=\sqrt{a^2+b^2}\;,\;\;\;\theta=\arctan(b/a)$

(In fact, deriving theta is a tiny bit more complicated because the effective range of the arctan function is only -90° through +90°. There is a function, atan2, with a full 360° range, but it’s not a standard trigonometric function.)

And because of Euler’s formula [see: Beautiful Math]…

$\displaystyle{e}^{i\theta}=\cos\theta+{i}\sin\theta$

…we can also use the exponential form [see: Circular Math and The exp Function]:

$\displaystyle{z}=\eta{e}^{i\theta}$

Where eta and theta are, respectively, the magnitude and angle (argument). The exponential form makes working with the math a lot easier.

In summary:

$\displaystyle{z}=(a+bi)=\eta(\cos\theta+{i}\sin\theta)=\eta{e}^{i\theta}$

All four forms can express the same complex number.

The main point is that, whether it be the rectangular coordinates, a & b, or the angular values, η & θ, a complex number has two values — two degrees of freedom.

§ §

What if we create a (nominally) Euclidean space using complex number axes rather than ones with real numbers? Each axis then has two degrees of freedom. A point located in such a space has twice as many coordinates as a point located in a Euclidean space that uses real number axes.

In two dimensions we might notate the difference like this:

$\displaystyle(x,y)\;\mathsf{vs}\;(x,y,\theta_x,\theta_y)$

Each axis has a magnitude and an angle (or phase). I like to think of it as twist.

One characteristic is that points that share a physical location — points with the same x & y coordinates — can differ in having different twist coordinates.

Note that there are no degeneracy issues with a point having multiple twists (one per axis). On the Earth, for example, a longitude coordinate has no meaning at the poles — it degenerates there. But standing on either pole one can meaningfully face along any line of longitude, so your twist at the poles still has meaning.

§

As I mentioned at the start, this doesn’t make 4D graphics any easier, but it might provide another way to think about a space with four coordinates. We just need to visualize a 2D X-Y graph and then give points on it a twist on each axis.

Figure 2. 2D with a twist!

(We can imagine the points as small balls that rotate on each axis. Alternately — and I prefer this one — if we imagine the point suspended by rods representing each axis, then it’s the rods that twist. I prefer this one because, in the 2D case, it keeps straight which two axes twist among the three axes a point-ball could rotate on. Obviously that’s a moot point in dimensions higher than two.)

The idea extends to Euclidean 3D, with three axes and three twists, so each point has six coordinates. As with regular Euclidean spaces, the notion extends beyond 3D to as many axes as required, but obviously that takes things into impossible to visualize territory again.

This notion of axes with twist helps understand how a nominally Euclidean space can have complex axes — something allowed in the Hilbert spaces used in quantum mechanics. I got to thinking about it while considering the Bloch sphere and qubit quantum states.

(I should probably mention here that this “twisted axes” notion is not a Hilbert space. I’ll get back to that below, but it’s mainly due to it not having an inner product.)

§

As I discussed in the Bloch sphere post, a qubit superposition implies four degrees of freedom…

$\displaystyle|\Psi\rangle={c_0}|0\rangle+{c_1}|1\rangle$

…because the coefficients of the superposed states are complex numbers, each with two degrees of freedom. We might diagram the unconstrained pair of complex numbers like this:

Figure 3. Two unconstrained complex numbers, each with two degrees of freedom (either an X-Y pair or a magnitude-angle pair).

Each has two degrees of freedom (which can be expressed as rectangular or angular coordinates).

The implied four degrees get reduced to two degrees because the absolute squares of those coefficients must sum to one. We can implement this by requiring that both complex numbers define points that lie on the complex unit circle (the centered circle with a radius of one):

Figure 4. Two constrained complex numbers, each with only one degree of freedom — an angle. The magnitude is always one.

Since the magnitude is always one, it is no longer a degree of freedom. This leaves only the angle of the complex number. In terms of the angular representation, we’ve effectively removed eta, the vector’s length coefficient. This slightly simplifies their representations:

$\displaystyle{c}=(a+bi)=(\cos\theta+{i}\sin\theta)={e}^{i\theta}$

While the rectangular representation, (a+bi), still appears to have two degrees of freedom, its a & b are constrained as described above. These angular representations now only have the single parameter, theta.

These two angles from two complex numbers can then become the angles theta, (θ), and phi, (φ), that specify the quantum state in the Bloch sphere. [see: QM 101: Bloch Sphere]

Note that the coefficients of the superposition (as opposed to a quantum state represented by the Bloch sphere) are further constrained by the requirement their absolute squares sum to one. So this piece illustrates only how degrees of freedom are constrained by requiring a magnitude of one. As coefficients in a superposition, we could have something like this:

$\displaystyle|\Psi\rangle=\frac{1}{\sqrt{2}}|0\rangle+\frac{1}{\sqrt{2}}{e}^{i\pi\theta}|1\rangle$

If both parts are equally likely, or like this:

$\displaystyle|\Psi\rangle=\frac{1}{2}|0\rangle+\frac{\sqrt{3}}{2}{e}^{i\pi\theta}|1\rangle$

If the odds were 25% and 75% respectively. (In both cases, the exponential term provides a relative phase for the superposition.)

(Getting down into the weeds, in the Bloch sphere, a pure quantum state is a point on (or more technically, a vector to) the sphere’s surface (the sphere has a radius of one; the vector has a length of one). A mixed quantum state is a point inside the sphere, and such states cannot be represented by a superposition; they require a density matrix to describe.)

§ §

To wrap things up, a few last details:

If we specify Euclidean spaces using real numbers as:

$\displaystyle\mathbb{R}^2,\,\mathbb{R}^3,\,\mathbb{R}^4,\,\dots$

Where the exponent is the number of dimensions, then we specify Euclidean spaces using complex numbers as:

$\displaystyle\mathbb{C}^2,\,\mathbb{C}^3,\,\mathbb{C}^4,\,\dots$

Note the “blackboard” font used to denote the set of all real numbers, ℝ, and the set of all complex numbers, ℂ. The font also denotes the set of all natural numbers, ℕ and the set of all integers, ℤ. They have Unicode code points u211D, u2102, u2115, and u2124, respectively (values are in hexadecimal).

If these spaces have an appropriate inner product defined, they are Hilbert spaces. (Denoted by ℍ — codepoint u210D.) As already mentioned, the “twisted axes” notion I described, because it uses magnitude-twist pairs, do not have a workable inner product, and is not a Hilbert space.

§ §

As a final observation, the rectangular form of a complex number specifies a specific point on the complex plane, but the angular forms imply a transformation — specifically a rotation. This is especially obvious in the trigonometric form:

$\displaystyle{z}=\eta(\cos\theta+{i}\sin\theta)$

The angle, theta (θ), through the sine and cosine functions, specify a point on the unit circle that can be scaled by eta (η) to any point on the plane. The exponential form does essentially the same thing:

$\displaystyle{z}=\eta{e}^{{i}\pi\theta}$

What’s less obvious is that it’s the point (1, 0i) — the number one as a complex number — that’s rotated by theta and scaled by eta. In this sense, the angular forms are operators on the complex plane (this is more obvious in the exponential form).

It’s a bit of overkill, but we can do the same thing using a matrix operator to specify a complex number:

$\displaystyle{z}=\eta\begin{bmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{bmatrix}\!\begin{bmatrix}{1}\\{0}\end{bmatrix}$

This transforms the whole space, but here we only care what it does to the (complex) number one — it transforms it to whatever complex number we specify.

§ §

This was just a jazz riff on complex number spaces and, just maybe, an interesting way to think about them, especially with regard to a 4D space that makes sense viewed as a complex 2D space (essentially where there is some sense of “pairs” of values).

(That plus a diversion into how four degrees of freedom can be simply constrained to two by requiring points fall on the unit circle.)

Stay Euclidean, my friends! Go forth and spread beauty and light.

The canonical fool on the hill watching the sunset and the rotation of the planet and thinking what he imagines are large thoughts. View all posts by Wyrd Smythe

#### 11 responses to “Sideband #73: Complex 4D”

• Sai Sundar S

You well said about degeneracy and twist to understand even a layman

• Sai Sundar S

I like matrix operator to handle the transforms and very effective in studying logic gates so this articles are really helping me to clear my doubts Thanking you

• Wyrd Smythe

As a trivial example of how working with complex numbers in the exponential form can be a bit easier than working with them in rectangular form, consider the difference between multiplying two complex numbers together.

In rectangular form:

$\displaystyle{z_1}{z_2}=(a+bi)(c+di)=ac+adi+bci+bd(i^2)$

Which reduces to:

$\displaystyle{z_1}{z_2}=(a+bi)(c+di)=(ac-bd)+(ad+bc)i$

On the other hand, using the exponential form:

$\displaystyle{z_1}{z_2}={r_1}{e}^{{i}\theta_1}\;{r_2}{e}^{{i}\theta_2}$

Which reduces to:

$\displaystyle{z_1}{z_2}={r_1}{r_2}{e}^{{i}(\theta_1\!+\!\theta_2)}$

Which computationally is:

$\displaystyle{z_1}{z_2}={r_1}{r_2}\;\exp(\theta_1\!+\!\theta_2)$

Which does seem a bit easier, although this assumes one has the numbers in exponential form to begin with. Translating a rectangular form, (a+bi), to exponential form is:

$\displaystyle{\sqrt{a^2\!+\!b^2}}\;{e}^{(i\arctan(b/a))}$

(Given certain caveats about the arctan function. Use atan2 if available.)

• Wyrd Smythe

As a less trivial example of using the exponential form:

$\displaystyle\langle\Psi|\Psi\rangle=\Psi^{\dagger}\Psi=1$

Assuming Ψ is a pure state with a state vector with length one. But Ψ need not be a basis state; it might be a superposition of basis states:

$\displaystyle|\Psi\rangle={r_0}\,{e}^{i\theta_0}|0\rangle+{r_1}\,{e}^{i\theta_1}|1\rangle$

We could extract the global phase and leave only a relative phase between the states in superposition, but let’s leave it for now and expand the bra-ket notation into matrices:

$\displaystyle|\Psi\rangle={r_0}\,{e}^{i\theta_0}\begin{bmatrix}{1}\\{0}\end{bmatrix}+{r_1}\,{e}^{i\theta_1}\begin{bmatrix}{0}\\{1}\end{bmatrix}=\begin{bmatrix}{{r_0}{e}^{i\theta_0}}\\{{r_1}{e}^{i\theta_1}}\end{bmatrix}$

Then we can reconsider that inner product, ⟨Ψ|Ψ⟩:

$\displaystyle\langle\Psi|\Psi\rangle=\begin{bmatrix}{{r_0}{e}^{-i\theta_0}}&{{r_1}{e}^{-i\theta_1}}\end{bmatrix}\begin{bmatrix}{{r_0}{e}^{i\theta_0}}\\{{r_1}{e}^{i\theta_1}}\end{bmatrix}$

Doing the matrix multiplication gives us:

$\displaystyle\langle\Psi|\Psi\rangle=({r_0}{r_0}\,{e}^{-i\theta_0}{e}^{i\theta_0})+({r_1}{r_1}\,{e}^{-i\theta_1}{e}^{i\theta_1})$

Which reduces to:

$\displaystyle\langle\Psi|\Psi\rangle=({r_0}^{2}+{r_1}^{2})=1$

The exponential terms reduce to 1 because z*z=|z|2, and both are unit vectors. Also because:

$\displaystyle{e}^{{i\theta}-{i\theta}}={e}^{0}=1$

This demonstrates how phase doesn’t matter when it comes to the inner product of a state vector with itself (because such phase is global to the state). Of course the relative phase between the component superposed states does matter. This shows up in the density matrix for the state, which we get from the outer product:

$\displaystyle\rho=|\Psi\rangle\langle\Psi|=\Psi\Psi^{\dagger}$

Expressed with matrices:

$\displaystyle\rho=\begin{bmatrix}{{r_0}{e}^{i\theta_0}}\\{{r_1}{e}^{i\theta_1}}\end{bmatrix}\begin{bmatrix}{{r_0}{e}^{-i\theta_0}}&{{r_1}{e}^{-i\theta_1}}\end{bmatrix}$

Doing the matrix multiplication gives us:

$\displaystyle\rho=\begin{bmatrix}{r_0}{r_0}\,{e}^{i\theta_0}{e}^{-i\theta_0}\;\;&{r_0}{r_1}\,{e}^{i\theta_0}{e}^{-i\theta_1}\\{r_1}{r_0}\,{e}^{i\theta_1}{e}^{-i\theta_0}\;\;&{r_1}{r_1}\,{e}^{i\theta_1}{e}^{-i\theta_1}\end{bmatrix}$

Which reduces to:

$\displaystyle\rho=\begin{bmatrix}{r_0}^{2}&{r_0}{r_1}\,{e}^{i(\theta_0-\theta_1)}\\{r_1}{r_0}\,{e}^{i(\theta_1-\theta_0)}\;\;&{r_1}^{2}\end{bmatrix}$

The trace adds up to 1 (as required), and the phase in the off-diagonals carries information about the coherence of the system described.

• Wyrd Smythe

A reference to phasors (not the Star Trek kind, the math kind) makes me wonder if there might be any similarities to this 2D/4D space notion.

[sigh] One more thing to queue for reading about. Along with spinors, which keep popping up in quantum mechanics with regard to (of course) spin. They are complex vectors that need to be rotated 2×360° to return to the same state. As such, they’re an excellent model for spin 1/2 particles which also need to rotate around twice to return to the same state.

Despite the use of “twist” here, no connection with actual twistor theory

• QM 101: Photon Spin | Logos con carne

[…] thinking about vectors that use complex numbers as components lead to the complex 2D/4D notion I posted about recently. No real connection to Jones vectors, […]

• Wyrd Smythe

I was wrong! This is a 2D Hilbert space. What I didn’t realize is that the inner product has to be defined using the conjugate:

$\langle{v*}|w\rangle$

Exactly as is done in QM.