# Unitary matrix

A unitary matrix is a complex square matrix whose columns (and rows) are orthonormal. It has the remarkable property that its inverse is equal to its conjugate transpose.

A unitary matrix whose entries are all real numbers is said to be orthogonal.

## Preliminary notions

In order to understand the definition of a unitary matrix, we need to remember the following things.

We say that two vectors and are orthogonal if and only if their inner product is equal to zero:

We can use the inner product to define the norm (length) of a vector as follows:

We say that a set of vectors is orthonormal if and only ifthat is, if and only if the elements of the set have unit norm and are orthogonal to each other.

When the vectors are arrays of complex numbers and, in particular, column vectors having complex entries, the usual way to define the inner product iswhere and are vectors and denotes the conjugate transpose of .

When the vectors are arrays of real numbers, the inner product is the usual dot product between two vectors:where denotes the transpose of .

## Definition

We are now ready to give a definition of unitary matrix.

Definition A complex matrix is said to be unitary if and only if it is invertible and its inverse is equal to its conjugate transpose, that is,

Remember that is the inverse of a matrix if and only if it satisfieswhere is the identity matrix. As a consequence, the following two propositions hold.

Proposition is a unitary matrix if and only if

Proposition is a unitary matrix if and only if

Let us make a simple example.

Example Define the complex matrixThe conjugate transpose of isThe matrix product between and isThen, is unitary.

## Orthonormality of the columns

Unitary matrices have the property that their columns are orthonormal.

Proposition A matrix is unitary if and only if its columns form an orthonormal set.

Proof

Note that the -th entry of the identity matrix is Moreover, by the very definition of matrix product, the -th entry of the product is the product between the -th row of (denoted by ) and the -th column of (denoted by ): In turn, by the definition of conjugate transpose, the -th row of is equal to the conjugate transpose of the -th column of . Therefore, we have thatHaving established these facts, let us prove the "if" part of the proposition. Suppose that the columns of form an orthonormal set. Then, which impliesfor any and . As a consequence, which means that is unitary. Let us now prove the "only if" part. Suppose that is unitary. Then,which impliesAs a consequence, the columns of are orthonormal.

Example Consider again the matrixand denote its two columns by The two columns have unit norm becauseandThey are orthogonal because

## Unitary transpose

A very simple property follows.

Proposition A matrix is unitary if and only if its transpose is unitary.

Proof

We already know that is unitary if and onlyWe can transpose both sides of the equation and obtain the equivalent conditionwhere we have used the fact that the order of conjugation and transposition does not matter. The latter condition is satisfied if and only if is unitary, which proves the proposition.

## Orthonormality of the rows

Not only the columns but also the rows of a unitary matrix are orthonormal.

Proposition A matrix is unitary if and only if its rows form an orthonormal set.

Proof

The rows of are the columns of , which is unitary 1) if and only if it has orthonormal columns; 2) if and only if is unitary.

## Conjugate transpose

Another proposition that can be proved in few lines.

Proposition A matrix is unitary if and only if its conjugate transpose is unitary.

Proof

We already know that is unitary if and only if By taking the complex conjugate of both sides of the equation, we obtainorwhich is equivalent to saying that is unitary.

## Product of unitary matrices

The product of unitary matrices is a unitary matrix.

Proposition Let and be two unitary matrices. Then, the product is unitary.

Proof

The conjugate transpose of isTherefore,which implies that is unitary.

## Unitary and triangular matrices

The following fact is sometimes used in matrix algebra.

Proposition Let be a unitary matrix. If is triangular (either lower or upper) and its diagonal entries are positive, thenwhere is the identity matrix.

Proof

Let us start from the case in which is upper triangular (UT). Since is UT, only the first entry of its first column can be different from zero:Since is unitary, the norm of one of its columns must be equal to 1. Since by assumption the diagonal entries of must be positive, the norm of the column is unitary only ifthat is, if is the first vector of the canonical basis. Since is UT, only the first two entries of its second column can be different from zero:The inner product between the first two columns of isSince the columns of are orthogonal to each other, the latter inner product must be equal to zero, which implies that Therefore,Since the norm of must be equal to 1, it must be that . Thus, is the second vector of the canonical basis. For each of the other columns of , we proceed similarly: we impose that some entries of the column be equal to zero because is triangular; we prove that other entries must be equal to zero in order to satisfy the orthogonality conditions; we prove that the only non-zero entry must be equal to 1 in order to satisfy the requirement of normality. The process ends when we have proved that is equal to the -th column of the canonical basis, for . Thus, is equal to the identity matrix. If is lower triangular and unitary, then is upper triangular and unitary. As a consequence, we have that , which implies that .

## Non-square matrices with orthonormal columns

The most important property of unitary matrices applies also to matrices that are not square but have orthonormal columns.

Proposition Let be a matrix such that its columns form an orthonormal set. Then, where is the identity matrix.

Proof

Denote by the -th column of . By the definition of matrix product, the matrixis an matrix whose -th entry isbecause the columns of are orthonormal. In other words,where is the identity matrix.

## Orthogonal matrix

If all the entries of a unitary matrix are real (i.e., their complex parts are all zero), then the matrix is said to be orthogonal.

If is a real matrix, it remains unaffected by complex conjugation. As a consequence, we have that

Therefore a real matrix is orthogonal if and only if

Since an orthogonal matrix is unitary, all the properties of unitary matrices apply to orthogonal matrices.

## Solved exercises

Below you can find some exercises with explained solutions.

### Exercise 1

Define the matrix

Find a scalar such that is unitary.

Solution

We need to find such thatLet us first compute the conjugate transpose of :Then, we can compute its product with :Thus, if we choose , we obtain