Test whether a matrix is unitary
This functionality does not run in MATLAB.
linalg::isUnitary tests whether the matrix A is a unitary matrix. An n×n matrix A is unitary, if , where In is the n×n identity matrix.
The square matrix A 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.
The correctness of the result 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.
The axiom 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.
If the component ring of A does not define the method "conjugate" then it is checked whether A is an orthogonal matrix such that A At = En, where En is the n×n identity matrix.
The following matrix is unitary:
A := 1/sqrt(5) * matrix([[1, 2], [2, -1]])
A square matrix of a domain of category Cat::Matrix