linalg::isHermitean --
checks whether a matrix is Hermitean
Introductionlinalg::isHermitean(A) determines whether
the matrix A is Hermitean, i.e., whether
A=transpose(conjugate(A)).
Call(s)linalg::isHermitean(A)
ParametersA |
- | a square matrix of a domain of category Cat::Matrix |
Returnseither TRUE or FALSE.
Related
Functions
DetailsA does not provide
the method "conjugate", then A is tested for
symmetry, i.e., linalg::isHermitean returns
TRUE if and only if A satisfies the equation
transpose(A) = A.
Example
1Here is an example of a Hermitean matrix:
>> A := Dom::Matrix(Dom::Complex)([[1, I], [-I, 1]])
+- -+
| 1, I |
| |
| - I, 1 |
+- -+
>> linalg::isHermitean(A)
TRUE
The following matrix is not Hermitean:
>> B := Dom::Matrix(Dom::Complex)([[1, -I], [-I, 1]])
+- -+
| 1, - I |
| |
| - I, 1 |
+- -+
>> linalg::isHermitean(B)
FALSE
The reason is the following:
>> linalg::transpose(conjugate(B)) <> B
+- -+ +- -+
| 1, I | | 1, - I |
| | <> | |
| I, 1 | | - I, 1 |
+- -+ +- -+
Example
2Here is an example of a symmetric matrix over the integers:
>> C := Dom::Matrix(Dom::Integer)([[1, 2], [2, -1]])
+- -+
| 1, 2 |
| |
| 2, -1 |
+- -+
>> linalg::isHermitean(C)
TRUE
linalg::isHermitian