Overview:
-
If a matrix A is equal to its conjugate transpose then matrix A is called a Hermitian Matrix.
-
Obtaining the conjugate transpose of matrix involves two steps
-
Get the transpose of the matrix
-
Take the complex conjugate for each of the matrix elements
-
-
Complex conjugate of a complex number is another complex number with the same real part and the imaginary part with the opposite sign. Complex conjugate of a real number is the same number.
-
The main diagonal of a Hermitian matrix is all real numbers.
-
The eigh() function of the linalg module of the NumPy library computes and returns the eigenvalues and the eigenvectors of a given Hermitian matrix.
Example:
# Example Python program that uses eigh() to get the import numpy # Construct a Hermitian matrix hermitianMatrix[0][0] = 2 print("Hermitian matrix:") print("Eigenvalues of the Hermitian matrix:") print("Eigenvectors of a Hermitian matrix:") |
Output:
Hermitian matrix: |