Skip to content

11. Complex Numbers & Hermitian Transpose

Updated
17 Sept 2026
4 min read
6 sections
Page 13 of 17
Master Linear Algebra with Python

Complex Numbers & Hermitian Transpose

While most introductory linear algebra applications deal with real-valued data (R\mathbb{R}), modern AI and signal processing systems (such as Fourier Transforms, quantum computing, and complex-valued neural networks) frequently leverage Complex Numbers (C\mathbb{C}).

In this lesson, we introduce the geometry of complex numbers, how to multiply them, how to calculate dot products of complex vectors, and why a special operation called the Hermitian Transpose is critical to keep geometric properties like length and distance intact.


1. What are Complex Numbers?

In school, we are taught that numbers exist on a one-dimensional real number line with zero in the middle, negative numbers on the left, and positive numbers on the right.

Complex numbers extend this framework from a 1D line to a 2D plane.

Instead of one axis, we now have two axes representing the Complex Plane:

  • Real Axis (Horizontal): Represents the real-valued portion of the number.
  • Imaginary Axis (Vertical): Represents the imaginary portion of the number.
z=a+bi(where a,b∈R)z = a + bi \quad (\text{where } a, b \in \mathbb{R})

Here, ii is the imaginary operator, defined mathematically as the square root of negative one: i=−1  ⟹  i2=−1i = \sqrt{-1} \quad \implies \quad i^2 = -1

(Note: In engineering and physics, jj is often used instead of ii because ii is reserved for electrical current.)

A Complex Number as a 2D Vector

A single complex number z=a+biz = a + bi can be conceptualized as a standard 2D vector in the complex plane: z≡[ab]z \equiv \begin{bmatrix} a \\ b \end{bmatrix}

Because of this 2D nature, any complex number contains two key properties:

  1. Magnitude (Absolute Value / Norm): The straight-line distance from the origin to the point in the complex plane: $$
z= \sqrt{a^2 + b^2}
  1. Angle (Phase / Argument): The rotation angle relative to the positive real axis.

2. The Complex Conjugate

To understand the Hermitian Transpose, we first need to understand the Complex Conjugate (written as z∗z^* or zˉ\bar{z}).

Algebraic Perspective

To calculate the complex conjugate of a complex number, we simply flip the sign of the imaginary component while leaving the real part completely unchanged:

z = a + bi \quad \implies \quad z^ = a - bi z = a - bi \quad \implies \quad z^ = a + bi $$

If a number is purely real (b=0b = 0), taking its conjugate does absolutely nothing: (a+0i)∗=a−0i=a(a + 0i)^* = a - 0i = a

Geometric Perspective

Plotting a complex number alongside its conjugate reveals that taking the complex conjugate represents a perfect reflection across the horizontal real axis:

Complex conjugate reflection across the real axis
Complex conjugate reflection across the real axis

The horizontal coordinate (real part) and the absolute distance from the imaginary axis remain identical; only the vertical orientation (imaginary sign) flips.


3. Multiplying Two Complex Numbers

Multiplying two complex numbers is slightly more involved than multiplying real numbers, but it follows standard algebraic FOIL factoring.

Let z=a+biz = a + bi and w=c+diw = c + di. Their product z⋅wz \cdot w is computed as:

z⋅w=(a+bi)(c+di)z \cdot w = (a + bi)(c + di)
=ac+adi+bci+bdi2= ac + adi + bci + bdi^2

Recall that i2=−1i^2 = -1, so bdi2bdi^2 simplifies to $-bd$. Grouping the real and imaginary parts together yields:

z⋅w=(ac−bd)+(ad+bc)iz \cdot w = (ac - bd) + (ad + bc)i

4. The Hermitian Transpose (Conjugate Transpose)

The Hermitian Transpose (also known as the conjugate transpose), denoted by a capital H\text{H} or superscript asterisk (vH\mathbf{v}^{\text{H}} or v∗\mathbf{v}^*), combines transposing with taking the complex conjugate of every element.

vH=(v∗)T\mathbf{v}^{\text{H}} = (\mathbf{v}^*)^{\text{T}}

For example, let's take the Hermitian transpose of a 5D complex column vector:

[13i−2i4−5]H=[13i−2i4−5]∗=[1−3i+2i4−5]\begin{bmatrix} 1 \\ 3i \\ -2i \\ 4 \\ -5 \end{bmatrix}^{\text{H}} = \begin{bmatrix} 1 \\ 3i \\ -2i \\ 4 \\ -5 \end{bmatrix}^* = \begin{bmatrix} 1 & -3i & +2i & 4 & -5 \end{bmatrix}

Notice that the signs of all imaginary components are flipped (3i→−3i3i \rightarrow -3i, −2i→+2i-2i \rightarrow +2i), while purely real components remain unchanged.


5. Why do we need the Hermitian Transpose?

For any real vector, the dot product of a vector with itself is guaranteed to be a positive real number representing its squared length: vTv=∥v∥2≥0\mathbf{v}^{\text{T}}\mathbf{v} = \|\mathbf{v}\|^2 \geq 0

However, this breaks when vectors contain complex numbers!

To see why, let's look at a complex number z=3+4iz = 3 + 4i in the complex plane. Geometrically, this represents a standard 3-4-5 right triangle with a hypotenuse (straight-line distance from origin) of exactly $5$:

Hermitian transpose geometric length preservation
Hermitian transpose geometric length preservation

Let's compute the squared length of this coordinate vector algebraically:

Using standard transposition (zTzz^{\text{T}}z):

zTz=(3+4i)(3+4i)z^{\text{T}}z = (3 + 4i)(3 + 4i)
=9+12i+12i+16i2= 9 + 12i + 12i + 16i^2
=9+24i−16=−7+24i= 9 + 24i - 16 = -7 + 24i

This is a nonsensical complex number and cannot represent a physical squared distance!

Using the Hermitian transpose (zHzz^{\text{H}}z):

zHz=(3+4i)(3−4i)z^{\text{H}}z = (3 + 4i)(3 - 4i)
=9−12i+12i−16i2= 9 - 12i + 12i - 16i^2
=9+16=25= 9 + 16 = 25

Taking the square root gives us the correct, positive geometric length: ∥z∥=25=5\|z\| = \sqrt{25} = 5.

Using the Hermitian transpose guarantees that the dot product of any complex vector with itself always returns a positive real number representing its true squared length.


6. Python Implementation

In NumPy, a standard transpose (v.T or np.transpose(v)) does not conjugate complex numbers. To get the correct Hermitian transpose, we must explicitly combine the transpose and conjugate methods:

python
import numpy as np

# 1. Define a complex number (3 + 4i)
z = complex(3, 4)

# Real geometric magnitude (should be 5.0)
print(f"Correct magnitude: {np.linalg.norm(z)}")

# Regular transpose multiplication (incorrect for magnitude)
print(f"Regular multiplication:  {np.transpose(z) * z}")

# Hermitian conjugate transpose multiplication (correct)
print(f"Hermitian multiplication: {np.transpose(z.conjugate()) * z}")

print("\n-----------------------------------------------\n")

# 2. Define a complex vector
v = np.array([ 3, 4j, 5+2j, complex(2, -5) ])

print("Original vector v:")
print(v)

print("\nRegular transpose v.T (does not conjugate):")
print(v.T)

print("\nHermitian transpose (conjugates and transposes):")
# v.conj().T computes the true Hermitian transpose
print(v.conj().T)
Out · stdout
Correct magnitude: 5.0
Regular multiplication:  (-7+24j)
Hermitian multiplication: (25+0j)

-----------------------------------------------

Original vector v:
[3.+0.j 0.+4.j 5.+2.j 2.-5.j]

Regular transpose v.T (does not conjugate):
[3.+0.j 0.+4.j 5.+2.j 2.-5.j]

Hermitian transpose (conjugates and transposes):
[3.-0.j 0.-4.j 5.-2.j 2.+5.j]

Key Takeaways

  • Complex Plane: Complex numbers exist in a 2D plane spanned by a real axis and an imaginary axis (i=−1i = \sqrt{-1}).
  • Complex Conjugate: Flipped imaginary component sign (z∗z^*), geometrically reflecting the number across the real axis.
  • Hermitian Transpose (vH\mathbf{v}^{\text{H}}): Combines standard transposition with taking the complex conjugate of each element.
  • Geometric Preservation: The Hermitian transpose guarantees that the dot product of a vector with itself yields a positive real number representing its true length squared.