Unit 4, lesson 16

Complex Inner Products

Why complex length needs the conjugate transpose, the complex inner product with conjugate symmetry and positive definiteness, sesquilinear forms, the norm it defines and the Gram matrix of a basis.

  • Video 16
  • Complex Geometry and Orthonormal Coefficients

The vector x=(1,i)x = (1, i) in C2\mathbb{C}^2 is not zero, yet the real recipe for squared length gives xTx=1+i2=0x^{\mathsf{T}}x = 1 + i^2 = 0. A squared length that vanishes on a nonzero vector is useless, so the recipe has to change once the scalars are complex. Conjugating one of the two copies repairs it, because (a−ib)(a+ib)=a2+b2(a - ib)(a + ib) = a^2 + b^2 for real aa and bb. This lesson builds the complex inner product on that observation, settles which argument is linear, and shows how a basis stores an inner product in its Gram matrix. Throughout, a tuple such as (1,i)(1, i) stands for a column vector.

Key terms

Conjugate transpose

Definition The conjugate transpose of a matrix A∈Cm×nA \in \mathbb{C}^{m \times n} is the matrix A∗∈Cn×mA^{*} \in \mathbb{C}^{n \times m} obtained by transposing and conjugating every entry,

A∗=A‾T,(A∗)ij=aji‾.A^{*} = \overline{A}^{\mathsf{T}}, \qquad (A^{*})_{ij} = \overline{a_{ji}}.

A column x∈Cnx \in \mathbb{C}^n becomes the row x∗=[x1‾⋯xn‾]x^{*} = \begin{bmatrix} \overline{x_1} & \cdots & \overline{x_n} \end{bmatrix}, so for columns x,y∈Cnx, y \in \mathbb{C}^n

x∗y=x1‾ y1+⋯+xn‾ yn.x^{*}y = \overline{x_1}\,y_1 + \cdots + \overline{x_n}\,y_n.

The rules (A∗)∗=A(A^{*})^{*} = A, (cA)∗=c‾ A∗(cA)^{*} = \overline{c}\,A^{*} and (AB)∗=B∗A∗(AB)^{*} = B^{*}A^{*} hold whenever the sizes allow the product. For a real matrix the conjugate transpose is the transpose. A square matrix HH with H∗=HH^{*} = H is called Hermitian.

In plain words Turn rows into columns and conjugate every entry. In the product x∗xx^{*}x each coordinate meets its own conjugate, and xj‾ xj=∣xj∣2\overline{x_j}\,x_j = \lvert x_j \rvert^2 is never negative, while the unconjugated xj2x_j^2 can be negative or not even real.

Example For x=(1,i)x = (1, i) the two recipes disagree,

xTx=1+i2=0,x∗x=1+(−i)(i)=2.\begin{gathered} x^{\mathsf{T}}x = 1 + i^2 = 0, \\[0.4em] x^{*}x = 1 + (-i)(i) = 2. \end{gathered}

For a rectangular matrix,

A=[12+i−i301+i],A∗=[132−i0i1−i].\begin{gathered} A = \begin{bmatrix} 1 & 2 + i & -i \\ 3 & 0 & 1 + i \end{bmatrix}, \\[0.4em] A^{*} = \begin{bmatrix} 1 & 3 \\ 2 - i & 0 \\ i & 1 - i \end{bmatrix}. \end{gathered}

Complex inner product

Definition Let VV be a vector space over F\mathbb{F}, where F\mathbb{F} is R\mathbb{R} or C\mathbb{C}. An inner product on VV assigns to each pair x,y∈Vx, y \in V a scalar ⟨x,y⟩∈F\langle x, y \rangle \in \mathbb{F} such that for all x,y,z∈Vx, y, z \in V and all a,b∈Fa, b \in \mathbb{F}

⟨x,ay+bz⟩=a⟨x,y⟩+b⟨x,z⟩,⟨y,x⟩=⟨x,y⟩‾,⟨x,x⟩>0  whenever x≠0.\begin{aligned} &\langle x, ay + bz \rangle \\[0.4em] &\quad = a\langle x, y \rangle + b\langle x, z \rangle, \\[0.4em] &\langle y, x \rangle = \overline{\langle x, y \rangle}, \\[0.4em] &\langle x, x \rangle > 0 \ \text{ whenever } x \ne 0. \end{aligned}

The first rule is linearity in the second argument. The second is conjugate symmetry, which forces every value ⟨x,x⟩\langle x, x \rangle to be real. The third is positive definiteness, treated in more detail below. The first argument is then conjugate-linear, since

⟨ax+bz,y⟩=⟨y,ax+bz⟩‾=a⟨y,x⟩+b⟨y,z⟩‾=a‾⟨x,y⟩+b‾⟨z,y⟩.\begin{aligned} &\langle ax + bz, y \rangle = \overline{\langle y, ax + bz \rangle} \\[0.4em] &\quad = \overline{a\langle y, x \rangle + b\langle y, z \rangle} \\[0.4em] &\quad = \overline{a}\langle x, y \rangle + \overline{b}\langle z, y \rangle. \end{aligned}

When F=C\mathbb{F} = \mathbb{C} this is a complex inner product, and VV with it is a complex inner product space. Over R\mathbb{R} the conjugations do nothing and the rules are those of a real inner product. The standard inner product on Cn\mathbb{C}^n is ⟨x,y⟩=x∗y\langle x, y \rangle = x^{*}y. Some books make the first argument linear instead. Every formula in this course uses the convention above, with the second argument linear.

In plain words An inner product turns two vectors into a scalar. A scalar factor comes out of the second slot unchanged and out of the first slot conjugated, and swapping the two vectors conjugates the result.

Example The standard inner product satisfies the rules. It is linear in yy by matrix multiplication, conjugating ∑jxj‾ yj\sum_j \overline{x_j}\,y_j gives ∑jyj‾ xj=y∗x\sum_j \overline{y_j}\,x_j = y^{*}x, and x∗x=∑j∣xj∣2x^{*}x = \sum_j \lvert x_j \rvert^2 is positive unless every entry is 00. For x=(1,i)x = (1, i) and y=(1,1)y = (1, 1) the value is ⟨x,y⟩=1−i\langle x, y \rangle = 1 - i. Multiplying either input by ii gives

⟨ix,y⟩=i‾ (1−i)=−1−i,⟨x,iy⟩=i (1−i)=1+i,\begin{aligned} \langle ix, y \rangle &= \overline{i}\,(1 - i) = -1 - i, \\[0.4em] \langle x, iy \rangle &= i\,(1 - i) = 1 + i, \end{aligned}

and swapping gives ⟨y,x⟩=1+i\langle y, x \rangle = 1 + i, the conjugate of 1−i1 - i.

Sesquilinear form

Definition Let VV be a complex vector space. A sesquilinear form on VV is a map s ⁣:V×V→Cs \colon V \times V \to \mathbb{C} that is linear in its second argument and conjugate-linear in its first, so that for all x,y,z∈Vx, y, z \in V and a,b∈Ca, b \in \mathbb{C}

s(x,ay+bz)=a s(x,y)+b s(x,z),s(ax+bz,y)=a‾ s(x,y)+b‾ s(z,y).\begin{aligned} s(x, ay + bz) &= a\,s(x, y) \\[0.4em] &\quad + b\,s(x, z), \\[0.4em] s(ax + bz, y) &= \overline{a}\,s(x, y) \\[0.4em] &\quad + \overline{b}\,s(z, y). \end{aligned}

It is Hermitian if s(y,x)=s(x,y)‾s(y, x) = \overline{s(x, y)} for all x,yx, y, and then every value s(x,x)s(x, x) is real. A complex inner product is exactly a Hermitian sesquilinear form that is positive definite. On Cn\mathbb{C}^n every sesquilinear form is s(x,y)=x∗Hys(x, y) = x^{*}Hy for exactly one matrix H∈Cn×nH \in \mathbb{C}^{n \times n}, namely hij=s(ei,ej)h_{ij} = s(e_i, e_j), and the form is Hermitian exactly when H∗=HH^{*} = H. A complex bilinear form, linear in both arguments, is a different object. If the new basis vectors have old coordinate columns forming an invertible matrix SS, a sesquilinear form’s matrix changes by conjugate congruence H↦S∗HSH \mapsto S^{*}HS, while a bilinear form’s matrix changes by congruence M↦STMSM \mapsto S^{\mathsf{T}}MS.

In plain words Sesquilinear means one and a half times linear. One slot is fully linear and the other is linear up to conjugating scalars, and that half step is what lets a complex form give real, positive squared lengths.

Example The form b(x,y)=xTyb(x, y) = x^{\mathsf{T}}y on C2\mathbb{C}^2 is bilinear. For x=(1,2)x = (1, 2) it gives b(x,x)=5b(x, x) = 5, while b(ix,ix)=i2⋅5=−5b(ix, ix) = i^2 \cdot 5 = -5. The same computation works for any bilinear form and any xx with b(x,x)>0b(x, x) > 0, so no complex bilinear form on a nonzero complex space is positive definite. The form

s(x,y)=x1‾ y1−x2‾ y2,s(x, y) = \overline{x_1}\,y_1 - \overline{x_2}\,y_2,

with matrix diag⁡(1,−1)\operatorname{diag}(1, -1), is Hermitian sesquilinear, but s(e2,e2)=−1s(e_2, e_2) = -1. It meets every rule of an inner product except positivity.

Positive definiteness

Definition A Hermitian sesquilinear form ss on a complex vector space VV is positive definite if s(x,x)>0s(x, x) > 0 for every nonzero x∈Vx \in V. A Hermitian matrix H∈Cn×nH \in \mathbb{C}^{n \times n} is positive definite if

z∗Hz>0for every nonzero z∈Cn.\begin{gathered} z^{*}Hz > 0 \\[0.4em] \text{for every nonzero } z \in \mathbb{C}^n. \end{gathered}

The number z∗Hzz^{*}Hz is real because HH is Hermitian, so the condition makes sense, and a positive definite HH makes ⟨x,y⟩H=x∗Hy\langle x, y \rangle_H = x^{*}Hy an inner product on Cn\mathbb{C}^n. Over R\mathbb{R} the same definitions apply to real vectors, and a real Hermitian matrix is simply a symmetric one. Linearity already gives s(0,0)=0s(0, 0) = 0, so positive definiteness says that squared length is zero only for the zero vector and is never negative. A single nonzero vector with s(x,x)≤0s(x, x) \le 0 rules a form out.

In plain words Every nonzero vector must get a positive squared length. Zero is reserved for the zero vector, and negative squared lengths are not allowed at all.

Example Take HH with rows (2,1)(2, 1) and (1,2)(1, 2). Because ∣z1+z2∣2=∣z1∣2+∣z2∣2+z1‾z2+z2‾z1\lvert z_1 + z_2 \rvert^2 = \lvert z_1 \rvert^2 + \lvert z_2 \rvert^2 + \overline{z_1}z_2 + \overline{z_2}z_1,

z∗Hz=2∣z1∣2+2∣z2∣2+z1‾z2+z2‾z1=∣z1+z2∣2+∣z1∣2+∣z2∣2.\begin{aligned} z^{*}Hz &= 2\lvert z_1 \rvert^2 + 2\lvert z_2 \rvert^2 \\[0.4em] &\quad + \overline{z_1}z_2 + \overline{z_2}z_1 \\[0.4em] &= \lvert z_1 + z_2 \rvert^2 \\[0.4em] &\quad + \lvert z_1 \rvert^2 + \lvert z_2 \rvert^2. \end{aligned}

Every term is nonnegative, and the last two vanish together only when z=0z = 0. So HH is positive definite and x∗Hyx^{*}Hy is an inner product on C2\mathbb{C}^2, with no eigenvalues needed. At z=(1,i)z = (1, i) the value is 2+1+1=42 + 1 + 1 = 4. The Hermitian matrices diag⁡(1,−1)\operatorname{diag}(1, -1) and diag⁡(1,0)\operatorname{diag}(1, 0) fail, since the nonzero vector e2e_2 gives −1-1 and 00.

Norm from an inner product

Definition In an inner product space over F\mathbb{F}, the norm of xx is the nonnegative square root

∥x∥=⟨x,x⟩.\lVert x \rVert = \sqrt{\langle x, x \rangle}.

It satisfies ∥x∥≥0\lVert x \rVert \ge 0, with equality only for x=0x = 0, and ∥ax∥=∣a∣ ∥x∥\lVert ax \rVert = \lvert a \rvert\,\lVert x \rVert for every scalar aa, because ⟨ax,ax⟩=a‾ a ⟨x,x⟩\langle ax, ax \rangle = \overline{a}\,a\,\langle x, x \rangle. Vectors xx and yy are orthogonal when ⟨x,y⟩=0\langle x, y \rangle = 0, and by conjugate symmetry this holds exactly when ⟨y,x⟩=0\langle y, x \rangle = 0. Expanding the sum gives

∥x+y∥2=∥x∥2+∥y∥2+2Re⁡⟨x,y⟩,\begin{aligned} \lVert x + y \rVert^2 &= \lVert x \rVert^2 + \lVert y \rVert^2 \\[0.4em] &\quad + 2\operatorname{Re}\langle x, y \rangle, \end{aligned}

so orthogonal vectors satisfy ∥x+y∥2=∥x∥2+∥y∥2\lVert x + y \rVert^2 = \lVert x \rVert^2 + \lVert y \rVert^2. The triangle inequality ∥x+y∥≤∥x∥+∥y∥\lVert x + y \rVert \le \lVert x \rVert + \lVert y \rVert, which makes this a norm in the full sense, is not automatic. It follows from the Cauchy-Schwarz inequality in the next lesson.

In plain words Length comes from pairing a vector with itself. Multiplying a vector by a complex number of absolute value 11, a phase, can change its coordinates but never its length.

Example For x=(1,i)x = (1, i) and y=(i,1)y = (i, 1), both squared norms are 22 and ⟨x,y⟩=1⋅i+(−i)⋅1=0\langle x, y \rangle = 1 \cdot i + (-i) \cdot 1 = 0, so the vectors are orthogonal. Their sum (1+i,1+i)(1 + i, 1 + i) has squared norm 2+2=42 + 2 = 4, the sum of the squared norms. For every real θ\theta the vector eiθxe^{i\theta}x still has norm 2\sqrt{2}, and (3+4i)x(3 + 4i)x has norm 525\sqrt{2}.

Gram matrix

Definition Let VV be an inner product space over F\mathbb{F} with basis B=(b1,…,bn)\mathcal{B} = (b_1, \dots, b_n). Its Gram matrix is G∈Fn×nG \in \mathbb{F}^{n \times n} with entries

Gij=⟨bi,bj⟩.G_{ij} = \langle b_i, b_j \rangle.

If xx and yy have coordinate columns ξ=[x]B\xi = [x]_{\mathcal{B}} and η=[y]B\eta = [y]_{\mathcal{B}}, expanding both sums gives

⟨x,y⟩=∑i,jξi‾ ηj⟨bi,bj⟩=ξ∗Gη.\begin{aligned} \langle x, y \rangle &= \sum_{i, j} \overline{\xi_i}\,\eta_j \langle b_i, b_j \rangle \\[0.4em] &= \xi^{*}G\eta. \end{aligned}

The conjugation falls on the whole first coordinate column. The matrix GG is Hermitian, since Gji=Gij‾G_{ji} = \overline{G_{ij}}, and positive definite, since ξ∗Gξ=∥x∥2>0\xi^{*}G\xi = \lVert x \rVert^2 > 0 for ξ≠0\xi \ne 0. Conversely, every Hermitian positive definite G∈Fn×nG \in \mathbb{F}^{n \times n} defines an inner product on Fn\mathbb{F}^n by ⟨ξ,η⟩G=ξ∗Gη\langle \xi, \eta \rangle_G = \xi^{*}G\eta. The basis is orthonormal exactly when G=IG = I, and a change of basis with matrix SS as above replaces GG by S∗GSS^{*}GS.

In plain words The Gram matrix records how the basis vectors pair with each other, and from it the inner product of any two vectors can be computed from their coordinates alone. A new basis can give a different Gram matrix for the same inner product.

Example In R2\mathbb{R}^2 with the dot product, take b1=(1,0)b_1 = (1, 0) and b2=(1,1)b_2 = (1, 1). Then

G=[1112].G = \begin{bmatrix} 1 & 1 \\ 1 & 2 \end{bmatrix}.

The coordinate column ξ=(0,1)\xi = (0, 1) describes b2=(1,1)b_2 = (1, 1), and ξTGξ=2\xi^{\mathsf{T}}G\xi = 2, its true squared length, not 11. In C2\mathbb{C}^2 with the standard inner product, the basis b1=(1,i)b_1 = (1, i), b2=(1,1)b_2 = (1, 1) gives

G=[21−i1+i2],G = \begin{bmatrix} 2 & 1 - i \\ 1 + i & 2 \end{bmatrix},

which is Hermitian. The coordinates ξ=(1,−1)\xi = (1, -1) describe b1−b2=(0,−1+i)b_1 - b_2 = (0, -1 + i), whose squared norm is 22, and indeed ξ∗Gξ=2−(1−i)−(1+i)+2=2\xi^{*}G\xi = 2 - (1 - i) - (1 + i) + 2 = 2.

Check yourself

  1. In C2\mathbb{C}^2 with the standard inner product, let x=(2,i)x = (2, i) and y=(1+i,1)y = (1 + i, 1). Find ⟨x,y⟩\langle x, y \rangle, ⟨y,x⟩\langle y, x \rangle, ∥x∥\lVert x \rVert, ∥y∥\lVert y \rVert and ⟨ix,y⟩\langle ix, y \rangle.
Show the answer

Conjugate the first vector, then multiply and add,

⟨x,y⟩=2(1+i)+(−i)(1)=2+i.\begin{aligned} \langle x, y \rangle &= 2(1 + i) + (-i)(1) \\[0.4em] &= 2 + i. \end{aligned}

By conjugate symmetry ⟨y,x⟩=2−i\langle y, x \rangle = 2 - i. The norms are ∥x∥=4+1=5\lVert x \rVert = \sqrt{4 + 1} = \sqrt{5} and ∥y∥=2+1=3\lVert y \rVert = \sqrt{2 + 1} = \sqrt{3}. A factor ii in the first slot comes out conjugated, so ⟨ix,y⟩=−i(2+i)=1−2i\langle ix, y \rangle = -i(2 + i) = 1 - 2i. Watch for the unconjugated product xTy=2+3ix^{\mathsf{T}}y = 2 + 3i, which is not the inner product.

  1. In C2\mathbb{C}^2 let x=(1,0)x = (1, 0) and y=(i,0)y = (i, 0). Check that ∥x+y∥2=∥x∥2+∥y∥2\lVert x + y \rVert^2 = \lVert x \rVert^2 + \lVert y \rVert^2. Does it follow that xx and yy are orthogonal?
Show the answer

The sum is (1+i,0)(1 + i, 0), with squared norm ∣1+i∣2=2=1+1\lvert 1 + i \rvert^2 = 2 = 1 + 1. Yet ⟨x,y⟩=1‾⋅i=i≠0\langle x, y \rangle = \overline{1} \cdot i = i \ne 0, so the vectors are not orthogonal. In fact y=ixy = ix lies on the same complex line as xx. The expansion

∥x+y∥2=∥x∥2+∥y∥2+2Re⁡⟨x,y⟩\begin{aligned} \lVert x + y \rVert^2 &= \lVert x \rVert^2 + \lVert y \rVert^2 \\[0.4em] &\quad + 2\operatorname{Re}\langle x, y \rangle \end{aligned}

shows that the squared norms add exactly when Re⁡⟨x,y⟩=0\operatorname{Re}\langle x, y \rangle = 0. Over C\mathbb{C} that is weaker than orthogonality, so the converse of the Pythagorean identity fails.

  1. Which of these define an inner product on C2\mathbb{C}^2? (a) ⟨x,y⟩=xTy\langle x, y \rangle = x^{\mathsf{T}}y. (b) ⟨x,y⟩=x∗Hy\langle x, y \rangle = x^{*}Hy with HH having rows (2,i)(2, i) and (−i,1)(-i, 1). (c) ⟨x,y⟩=x∗Dy\langle x, y \rangle = x^{*}Dy with D=diag⁡(1,0)D = \operatorname{diag}(1, 0).
Show the answer

Rule (a) is not an inner product. It is bilinear, and the nonzero vector (i,0)(i, 0) gives i2=−1i^2 = -1.

Rule (b) is an inner product. The slot rules hold for x∗Myx^{*}My with any 2×22 \times 2 matrix MM, by matrix multiplication. This HH is also Hermitian, because conjugating and transposing returns rows (2,i)(2, i) and (−i,1)(-i, 1), so conjugate symmetry holds too. For positivity, expand ∣z2−iz1∣2\lvert z_2 - iz_1 \rvert^2 to get

z∗Hz=∣z1∣2+∣z2−iz1∣2.z^{*}Hz = \lvert z_1 \rvert^2 + \lvert z_2 - iz_1 \rvert^2.

Both terms are nonnegative. If the sum is 00, then z1=0z_1 = 0 and then z2=0z_2 = 0, so the form is positive definite.

Rule (c) is not an inner product. The matrix is Hermitian, but the nonzero vector (0,1)(0, 1) has squared length 00, so positive definiteness fails.

How this lesson connects

It also uses the dot product and length in real coordinate space.