linalg::isHermitean
--
checks whether a matrix is Hermiteanlinalg::isHermitean
(A)
determines whether
the matrix A is Hermitean, i.e., whether
A=transpose(conjugate(A)).
linalg::isHermitean(A)
A |
- | a square matrix of a domain of category Cat::Matrix |
either TRUE
or FALSE
.
A
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.Here 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 | +- -+ +- -+
Here 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