HermitianMatrixQ
Details and Options

- HermitianMatrixQ is also known as a self-adjoint.
- A matrix m is Hermitian if m==ConjugateTranspose[m].
- HermitianMatrixQ works for symbolic as well as numerical matrices.
- The following options can be given:
-
SameTest Automatic function to test equality of expressions Tolerance Automatic tolerance for approximate numbers - For exact and symbolic matrices, the option SameTest->f indicates that two entries mij and mkl are taken to be equal if f[mij,mkl] gives True.
- For approximate matrices, the option Tolerance->t can be used to indicate that all entries Abs[mij]≤t are taken to be zero.
- For matrix entries Abs[mij]>t, equality comparison is done except for the last
bits, where
is $MachineEpsilon for MachinePrecision matrices and
for matrices of Precision
.
Examples
open allclose allBasic Examples (1)
Test if a matrix is explicitly Hermitian:
For a real matrix, SymmetricMatrixQ gives the same result:
Scope (4)
A complex Hermitian matrix has symmetric real part and antisymmetric imaginary part:
Approximate MachinePrecision matrix:
Options (2)
SameTest (1)
This matrix is Hermitian for a positive real , but HermitianMatrixQ gives False:
Use the option SameTest to get the correct answer:
Tolerance (1)
Generate a complex-valued Hermitian matrix with some random perturbation of order 10-14:
Adjust the option Tolerance to accept this matrix as Hermitian:
The norm of the difference between the matrix and its conjugate transpose:
Applications (5)
A matrix generated from a Hermitian function is Hermitian:
By using Table, it generates a Hermitian matrix:
The Pauli matrices are Hermitian:
Several statistical measures of complex data are Hermitian matrices, including Covariance:
Use a different method for Hermitian matrices, with failover to a general method:
Construct complex-valued matrices for testing:
For the non-Hermitian matrix m, the function myLS just uses Gaussian elimination:
For the Hermitian indefinite matrix mh, try Cholesky and continue with Gaussian elimination:
For the Hermitian positive definite matrix mpd, try Cholesky, which succeeds:
Check that a matrix drawn from GaussianUnitaryMatrixDistribution is Hermitian:
Check that a matrix drawn from GaussianSymplecticMatrixDistribution is Hermitian:
Properties & Relations (10)
A matrix is Hermitian if m==ConjugateTranspose[m]:
A Hermitian matrix must have real diagonal elements:
Use Diagonal to pick out the diagonal elements:
A real-valued symmetric matrix is Hermitian:
But a complex-valued symmetric matrix may not be:
Any matrix can be represented as the sum of its Hermitian and antihermitian parts:
Use AntihermitianMatrixQ to test whether a matrix is antihermitian:
A Hermitian matrix is always a normal matrix:
Use NormalMatrixQ to test whether a matrix is normal:
Hermitian matrices have all real eigenvalues:
Use Eigenvalues to find eigenvalues:
This also means that their CharacteristicPolynomial has real coefficients:
Hermitian matrices have a complete set of eigenvectors:
Use Eigenvectors to find eigenvectors:
Hermitian matrices have real-valued determinant and trace:
Use Det and Tr for determinant and trace:
A complex-valued matrix can be symmetric but not Hermitian:
A Hermitian matrix is always diagonalizable as tested with DiagonalizableMatrixQ:
Text
Wolfram Research (2007), HermitianMatrixQ, Wolfram Language function, https://reference.wolfram.com/language/ref/HermitianMatrixQ.html (updated 2014).
CMS
Wolfram Language. 2007. "HermitianMatrixQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/HermitianMatrixQ.html.
APA
Wolfram Language. (2007). HermitianMatrixQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/HermitianMatrixQ.html