Tutorials › Linear Algebra › Unitary Matrices and Complex Inner-Product Preservation

Orthogonal Matrices and Isometries · Tutorial 716 of 1000

Unitary Matrices and Complex Inner-Product Preservation

Use the conjugate transpose to test unitarity and verify how unitary matrices preserve inner products and lengths in complex vector spaces.

Intermediate 9 min read

What You'll Learn

  • Define the conjugate transpose of a complex matrix and the unitary condition.
  • Relate the equation \(\mathbf{U}^{*}\mathbf{U}=\mathbf{I}\) to orthonormal columns.
  • Prove that a unitary matrix preserves complex inner products and norms.
  • Check unitarity by exact multiplication in complex examples.
  • Spot why replacing the conjugate transpose with the transpose can give a false test.

Why Complex Matrices Need a Conjugate Transpose

For real vectors, the transpose is enough to form the usual dot product. Complex vectors require one additional operation: complex conjugation. If \(z=a+bi\), where \(a,b\in\mathbb{R}\) and \(i^2=-1\), its conjugate is \(\overline{z}=a-bi\). For a complex matrix, the conjugate transpose combines conjugating every entry with transposing the matrix. This is the operation that lets a matrix express preservation of lengths and angles in a complex vector space.

Throughout this tutorial, vectors in \(\mathbb{C}^n\) are columns. We use the convention that the complex inner product is linear in its first argument and conjugate-linear in its second:

$$ \langle\mathbf{x},\mathbf{y}\rangle =\sum_{j=1}^{n}x_j\overline{y_j} =\mathbf{y}^{*}\mathbf{x}. $$

The associated norm is \(\|\mathbf{x}\|=\sqrt{\langle\mathbf{x},\mathbf{x}\rangle}\). In particular, \(\|\mathbf{x}\|^2=\sum_{j=1}^n |x_j|^2\), a nonnegative real number. The order in the inner product matters for complex vectors: with this convention, \(\langle\mathbf{y},\mathbf{x}\rangle=\overline{\langle\mathbf{x},\mathbf{y}\rangle}\).

Definition: If \(\mathbf{A}\in\mathbb{C}^{m\times n}\), its conjugate transpose \(\mathbf{A}^{*}\) is the \(n\times m\) matrix whose entry in row \(j\), column \(i\) is \(\overline{a_{ij}}\). A square matrix \(\mathbf{U}\in\mathbb{C}^{n\times n}\) is unitary if \(\mathbf{U}^{*}\mathbf{U}=\mathbf{I}_n\).

The condition is a matrix equation, not a requirement that the entries of \(\mathbf{U}\) be real. The identity matrix on the right has diagonal entries \(1\) and all other entries \(0\). As the next result shows, the equation says exactly that the columns of \(\mathbf{U}\) are orthonormal in the complex inner product.

The Column Meaning of the Unitary Condition

Two vectors are orthogonal when their inner product is zero, and a list is orthonormal when its vectors are pairwise orthogonal and each has norm \(1\). Write the columns of \(\mathbf{U}\) as \(\mathbf{u}_1,\dots,\mathbf{u}_n\). Multiplying \(\mathbf{U}^{*}\mathbf{U}\) pairs each column with every column, with conjugation supplied by \(\mathbf{U}^{*}\).

Theorem: A square complex matrix \(\mathbf{U}\) is unitary if and only if its columns form an orthonormal list in \(\mathbb{C}^n\).

Proof. The entry in row \(j\), column \(k\) of \(\mathbf{U}^{*}\mathbf{U}\) is \(\sum_{r=1}^{n}\overline{u_{rj}}u_{rk}=\langle\mathbf{u}_k,\mathbf{u}_j\rangle\). If the columns are orthonormal, this entry is \(1\) when \(j=k\) and \(0\) when \(j\ne k\). Thus \(\mathbf{U}^{*}\mathbf{U}=\mathbf{I}_n\), so \(\mathbf{U}\) is unitary. Conversely, if \(\mathbf{U}^{*}\mathbf{U}=\mathbf{I}_n\), the displayed entry equals \(1\) for \(j=k\) and \(0\) otherwise. For \(j=k\) this gives \(\|\mathbf{u}_j\|^2=1\), and for \(j\ne k\) it gives \(\langle\mathbf{u}_k,\mathbf{u}_j\rangle=0\). Therefore the columns are orthonormal. \(\square\)

Worked Example: Checking a Complex Matrix

Verify that the matrix below is unitary by computing its conjugate transpose and the product \(\mathbf{U}^{*}\mathbf{U}\).

$$ \mathbf{U}=\frac{1}{\sqrt{2}} \begin{bmatrix} 1&i\\ i&1 \end{bmatrix}, \qquad \mathbf{U}^{*}=\frac{1}{\sqrt{2}} \begin{bmatrix} 1&-i\\ -i&1 \end{bmatrix}. $$

Conjugation changes \(i\) to \(-i\), and transposition swaps rows and columns. Here the matrix is symmetric, so transposing does not change its arrangement; conjugation still changes its entries. Multiplying gives

$$ \mathbf{U}^{*}\mathbf{U} =\frac{1}{2} \begin{bmatrix} 1&-i\\ -i&1 \end{bmatrix} \begin{bmatrix} 1&i\\ i&1 \end{bmatrix} =\frac{1}{2} \begin{bmatrix} 1+(-i)i&i-i\\ -i+i&(-i)i+1 \end{bmatrix} =\frac{1}{2} \begin{bmatrix} 2&0\\ 0&2 \end{bmatrix} =\mathbf{I}_2. $$

For example, the top-left entry uses \((-i)i=-i^2=1\), while the top-right entry is \(i-i=0\). Thus every entry of the product has been accounted for, and \(\mathbf{U}\) is unitary. Its columns are \(\tfrac{1}{\sqrt{2}}(1,i)^{\top}\) and \(\tfrac{1}{\sqrt{2}}(i,1)^{\top}\); each has squared norm \(1\), and their inner product is zero, in agreement with the theorem.

Unitary Matrices Preserve Inner Products and Norms

Theorem: Let \(\mathbf{U}\in\mathbb{C}^{n\times n}\) be unitary. For all \(\mathbf{x},\mathbf{y}\in\mathbb{C}^n\), \(\langle\mathbf{U}\mathbf{x},\mathbf{U}\mathbf{y}\rangle=\langle\mathbf{x},\mathbf{y}\rangle\). Consequently, \(\|\mathbf{U}\mathbf{x}\|=\|\mathbf{x}\|\) for every \(\mathbf{x}\in\mathbb{C}^n\).

Proof. By the inner-product convention, \(\langle\mathbf{U}\mathbf{x},\mathbf{U}\mathbf{y}\rangle=(\mathbf{U}\mathbf{y})^{*}(\mathbf{U}\mathbf{x})=\mathbf{y}^{*}\mathbf{U}^{*}\mathbf{U}\mathbf{x}\). Since \(\mathbf{U}\) is unitary, \(\mathbf{U}^{*}\mathbf{U}=\mathbf{I}_n\), so this equals \(\mathbf{y}^{*}\mathbf{I}_n\mathbf{x}=\mathbf{y}^{*}\mathbf{x}=\langle\mathbf{x},\mathbf{y}\rangle\). Now set \(\mathbf{y}=\mathbf{x}\). The inner-product equality gives \(\|\mathbf{U}\mathbf{x}\|^2=\|\mathbf{x}\|^2\). Both norms are nonnegative, so taking their nonnegative square roots gives \(\|\mathbf{U}\mathbf{x}\|=\|\mathbf{x}\|\). \(\square\)

This result explains the geometric role of a unitary matrix: applying it to vectors preserves their inner products, and therefore their lengths. If two vectors are orthogonal before applying \(\mathbf{U}\), their inner product is zero; the theorem says their images still have inner product zero. The norm conclusion is not an independent assumption—it follows by using the inner-product result with the same vector in both slots.

Worked Example: Checking an Inner Product and Two Norms

Use the unitary matrix from the previous example with \(\mathbf{x}=(1+i,2)^{\top}\) and \(\mathbf{y}=(i,1-i)^{\top}\). Compute both inner products and check the norm of \(\mathbf{x}\) against the norm of its image.

First apply \(\mathbf{U}\) to \(\mathbf{x}\), keeping the factor \(1/\sqrt{2}\):

$$ \mathbf{U}\mathbf{x} =\frac{1}{\sqrt{2}} \begin{bmatrix} (1+i)+2i\\ i(1+i)+2 \end{bmatrix} =\frac{1}{\sqrt{2}} \begin{bmatrix} 1+3i\\ 1+i \end{bmatrix}. $$

For the second coordinate, \(i(1+i)+2=i+i^2+2=1+i\). Applying \(\mathbf{U}\) to \(\mathbf{y}\) gives

$$ \mathbf{U}\mathbf{y} =\frac{1}{\sqrt{2}} \begin{bmatrix} i+i(1-i)\\ i^2+(1-i) \end{bmatrix} =\frac{1}{\sqrt{2}} \begin{bmatrix} 1+2i\\ -i \end{bmatrix}, $$

because \(i(1-i)=i-i^2=1+i\) and \(i^2+(1-i)=-i\). Using the conjugate of each coordinate of the second argument, the original inner product is

$$ \langle\mathbf{x},\mathbf{y}\rangle =(-i)(1+i)+(1+i)2 =(1-i)+(2+2i) =3+i. $$

The inner product of the images is

$$ \begin{aligned} \langle\mathbf{U}\mathbf{x},\mathbf{U}\mathbf{y}\rangle &=\frac{(1-2i)(1+3i)+i(1+i)}{2}\\ &=\frac{(7+i)+(-1+i)}{2} =3+i. \end{aligned} $$

Here \((1-2i)(1+3i)=1+3i-2i-6i^2=7+i\), and \(i(1+i)=-1+i\). The two inner products agree. For the norm check, \(\|\mathbf{x}\|^2=|1+i|^2+|2|^2=2+4=6\), while

$$ \|\mathbf{U}\mathbf{x}\|^2 =\frac{|1+3i|^2+|1+i|^2}{2} =\frac{10+2}{2} =6. $$

Both norms are nonnegative, so \(\|\mathbf{U}\mathbf{x}\|=\|\mathbf{x}\|=\sqrt{6}\), as required.

When the Matrix Is Not Unitary

A complex matrix is not unitary merely because its entries look like they could preserve lengths, or because a product involving its transpose resembles the identity. The defining test is specifically \(\mathbf{A}^{*}\mathbf{A}=\mathbf{I}\). If this equation fails, the column characterization and preservation theorem do not apply.

Worked Example: Detecting a Nonunitary Matrix

Determine whether \(\mathbf{A}=\begin{bmatrix}1&i\\0&1\end{bmatrix}\) is unitary, and check the effect of \(\mathbf{A}\) on a vector.

Conjugating and transposing gives \(\mathbf{A}^{*}=\begin{bmatrix}1&0\\-i&1\end{bmatrix}\). Therefore

$$ \mathbf{A}^{*}\mathbf{A} = \begin{bmatrix} 1&0\\ -i&1 \end{bmatrix} \begin{bmatrix} 1&i\\ 0&1 \end{bmatrix} = \begin{bmatrix} 1&i\\ -i&(-i)i+1 \end{bmatrix} = \begin{bmatrix} 1&i\\ -i&2 \end{bmatrix} \ne\mathbf{I}_2. $$

Thus \(\mathbf{A}\) is not unitary. A direct norm check confirms that it does not preserve every length: for \(\mathbf{x}=(0,1)^{\top}\), \(\|\mathbf{x}\|=1\), but \(\mathbf{A}\mathbf{x}=(i,1)^{\top}\), whose norm is \(\sqrt{|i|^2+|1|^2}=\sqrt{2}\). The change in norm is consistent with the failed unitary test.

Common Pitfall: Using the Transpose Instead

Wrong calculation: for the unitary matrix in the first example, one might use \(\mathbf{U}^{\top}\mathbf{U}\) in place of \(\mathbf{U}^{*}\mathbf{U}\). Since this particular \(\mathbf{U}\) is symmetric, its transpose is itself, and the incorrect calculation gives

$$ \mathbf{U}^{\top}\mathbf{U} =\frac{1}{2} \begin{bmatrix} 1&i\\ i&1 \end{bmatrix} \begin{bmatrix} 1&i\\ i&1 \end{bmatrix} = \frac{1}{2} \begin{bmatrix} 0&2i\\ 2i&0 \end{bmatrix} = \begin{bmatrix} 0&i\\ i&0 \end{bmatrix}. $$

This is not the identity, but it does not show that \(\mathbf{U}\) is nonunitary. It shows only that the wrong operation was used: \(\mathbf{U}^{\top}\) does not conjugate the entries. The correction is to compute \(\mathbf{U}^{*}\mathbf{U}\), which was shown to equal \(\mathbf{I}_2\). For real matrices, conjugation leaves every entry unchanged, so transpose and conjugate transpose agree. For complex matrices, that shortcut is not valid.

In practice, keep the test tied to the definition: form the conjugate transpose, multiply it by the original matrix in the order \(\mathbf{U}^{*}\mathbf{U}\), and compare every entry with the identity. The inner-product preservation proof then applies to all vectors, not just to selected examples. This is why checking the matrix equation is more informative than checking the norm of one vector.

Check Your Understanding

Use the convention that the complex inner product is linear in its first argument.

  1. For a complex matrix \(\mathbf{A}\), describe the two operations used to form \(\mathbf{A}^{*}\).
  2. What does \(\mathbf{U}^{*}\mathbf{U}=\mathbf{I}_n\) say about the columns of \(\mathbf{U}\)?
  3. Explain why \(\langle\mathbf{U}\mathbf{x},\mathbf{U}\mathbf{y}\rangle=\mathbf{y}^{*}\mathbf{U}^{*}\mathbf{U}\mathbf{x}\).
  4. For \(\mathbf{D}=\begin{bmatrix}i&0\\0&-1\end{bmatrix}\), compute \(\mathbf{D}^{*}\mathbf{D}\) and decide whether \(\mathbf{D}\) is unitary.
  5. Give a reason that \(\mathbf{U}^{\top}\mathbf{U}\) is not the defining test for a complex unitary matrix.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon