Engineering Math - Matrix

 

 

 

Hermitian Matrix

 

Covariance matrices, the Gram matrix HHH of a MIMO channel and the operators of quantum mechanics are all Hermitian. That common property is why their eigenvalues are real and their eigenvectors can be chosen perpendicular. I'll first give the definition and a 2 x 2 example. Then we'll see why the eigenvalues are always real, and finish with the places where engineers meet these matrices.

What is a Hermitian matrix ?

For a real matrix, the natural mirror condition is symmetry, AT = A. For a complex matrix, the transpose alone is not enough, because the quantities we care about, such as power and length, use the conjugate as well. The Hermitian condition adds that conjugate.

Hermitian Matrix is a special type of  matrix, which is same as its conjugate transpose as expressed below.

A equals A dagger

Figure 1. The defining condition. A Hermitian matrix equals its own conjugate transpose.

The dagger in Figure 1 is the physics symbol for the conjugate transpose. Engineering texts usually write the same thing as AH = A, and some write A* = A. All three mean the same condition, and only a square matrix can satisfy it.

In orther words, a Hermitian Matrix has following properties

  • The entries on the main diagonal are real.
  • The element in the ith row and jth column is equal to the complex conjugate of the element in the jth row and ith column
  • Eigenvalues of all Hermitian Matrix are all real
  • A real symmetric matrix is Hermitian : when every entry is real, conjugation changes nothing, so AH = A reduces to AT = A.
  • The diagonal rule follows from the mirror rule : for i = j the mirror rule says aii equals its own conjugate. A number equal to its conjugate has zero imaginary part.
  • A complex symmetric matrix is usually not Hermitian : for example, [[1, i], [i, 1]] equals its transpose, but its conjugate transpose is [[1, -i], [-i, 1]].

What does a Hermitian matrix look like ?

A 2 x 2 example is enough to see every rule at work. Check two things in it: the diagonal entries are real, and the two off-diagonal entries are conjugates of each other.

One example of Hermintian Matrix is as follows. In this example, if you conjugate the matrix A and then transpose it, the result is same as the original matrix (A). So you can say the matrix 'A' is a Hermitian matrix.

The illustration below takes A through the two steps. The first arrow conjugates each entry, so 3 + i becomes 3 - i and 3 - i becomes 3 + i. The second arrow transposes the result, which moves the two off-diagonal entries back to their original places. The final matrix, marked with a dagger, is identical to A. The equals sign at the bottom marks that result.

2 x 2 matrix conjugated and then transposed, giving back the same matrix

Figure 2. Conjugate, then transpose. The two steps undo each other on a Hermitian matrix, so AH = A.

  • The diagonal is real : 3 and 2 are unchanged by conjugation, and the transpose never moves them.
  • The off-diagonal entries are a conjugate pair : a12 = 3 + i and a21 = 3 - i. Conjugation swaps their values, and the transpose swaps their positions, so the matrix comes back unchanged.
  • Trace and determinant are real : trace(A) = 3 + 2 = 5, and det(A) = 3 x 2 - (3 + i)(3 - i) = 6 - 10 = -4. The product of a conjugate pair is |3 + i|2 = 10, which is real.
  • The order of the steps does not matter : transposing first and conjugating second gives the same AH.

Why are the eigenvalues of a Hermitian matrix real ?

A general complex matrix can have complex eigenvalues. So the fact that a Hermitian matrix always has real ones needs a reason, and the reason is short enough to write out. Let's first check the numbers for the example, and then look at the proof.

One of the important characteristics of Hermitian Matrix is that Eigenvalues of all Hermitian Matrix are all real as shown in the following example.

Eigenvalues of the example Hermitian matrix are -0.70156 and 5.70156

Figure 3. Eigenvalues of the example matrix. Both are real, one negative and one positive.

The characteristic equation of A is λ2 - 5λ - 4 = 0, since the trace is 5 and the determinant is -4. Its roots are λ = (5 - √41)/2 and λ = (5 + √41)/2, which are -0.70156 and 5.70156. These are the values in Figure 3.

The proof works for any size. Take an eigenvector x with A x = λ x, and multiply on the left by xH. This gives xHA x = λ xHx. The right side has xHx, the squared length of x, which is real and positive. The left side is also real, because its conjugate is xHAHx, and AH = A. So λ is a real number divided by a positive real number, and it is real.

  • Every quadratic form is real : xHA x is real for any complex vector x, not only for eigenvectors. For the example matrix and x = [1, i]T, it equals 3.
  • Eigenvectors of different eigenvalues are orthogonal : this follows from the same kind of argument. For the example, the two unit eigenvectors have a zero inner product.
  • A Hermitian matrix is always diagonalizable : by the spectral theorem, A = U Λ UH, where U is unitary and Λ is a real diagonal matrix of eigenvalues.
  • Real does not mean positive : the example has one negative eigenvalue, so it is not positive definite. A Hermitian matrix is positive definite only when all its eigenvalues are positive.

Where do Hermitian matrices appear in engineering ?

In wireless communication and signal processing, a Hermitian matrix usually arrives as a product of a matrix with its own conjugate transpose. Such a product is always Hermitian, and its eigenvalues are never negative. That is the property most algorithms rely on.

The covariance matrix of a complex signal vector x is R = E[x xH]. It is Hermitian, because (x xH)H = x xH. In MIMO, the matrix HHH of a channel H plays the same role. For example, H = [[1, i], [1, 1]] gives HHH = [[2, 1 + i], [1 - i, 2]]. Its eigenvalues are 2 - √2 and 2 + √2, about 0.586 and 3.414. They are the squared singular values of H, which set the gains of the two spatial streams.

  • Power is a Hermitian quadratic form : the received power in a beam direction w is wHR w. It is real, as a power must be, because R is Hermitian.
  • Eigen decomposition gives the best directions : the eigenvector of R with the largest eigenvalue is the beamforming vector that collects the most power.
  • Use the Hermitian solver in code : numpy.linalg.eigh and Matlab eig return real eigenvalues for a Hermitian input. A general solver may return tiny imaginary parts caused by rounding. In Matlab, ishermitian checks the condition.
  • Related pages go deeper : see Covariance Matrix and Eigen Decomposition for the matrices and the decomposition used above.

Related Reading : Hermitian Conjugate, Conjugate Transpose