linalg::isUnitary -- test
whether a matrix is unitary
Introductionlinalg::isUnitary tests whether the matrix A
is a unitary matrix. An n x n matrix A is
unitary, if A * transpose(conjugate(A)) = I, where
I is the n x n identity matrix.
Call(s)linalg::isUnitary(A)
ParametersA |
- | a square matrix of a domain of category Cat::Matrix |
Returnseither TRUE, FALSE, or
UNKNOWN.
Related
Functionslinalg::orthog,
linalg::scalarProduct
DetailsA is a unitary matrix, if and only
if the columns of A form an orthonormal basis with respect
to the scalar product linalg::scalarProduct of two
vectors.FALSE of
linalg::isUnitary can only be guaranteed if the elements
of the component ring R of the matrix A are
canonically represented, i.e., if each element of R has only
one unique representation.Ax::canonicalRep states that a
domain has this property. Hence, linalg::isUnitary returns
FALSE or UNKNOWN, respectively, depending on
whether the component ring of A has the axiom
Ax::canonicalRep.A does not define the method
"conjugate" then it is checked whether A is
an orthogonal matrix such that A*transpose(A)=En, where
En is the n x n identity matrix.
Example
1The following matrix is unitary:
>> A := 1/sqrt(5) * matrix([[1, 2], [2, -1]])
+- -+
| 1/2 1/2 |
| 5 2 5 |
| ----, ------ |
| 5 5 |
| |
| 1/2 1/2 |
| 2 5 5 |
| ------, - ---- |
| 5 5 |
+- -+
>> linalg::isUnitary(A)
TRUE
linalg::isOrthogonal