IsUnitary
Tests if a matrix is unitary.
Syntax
-
IsUnitary(A[, ε])
-
A
is a matrix -
ε
is a positive number
-
Description
If A
is a matrix, then IsUnitary(A, ε)
returns true
iff A
is unitary, that is, iff A^−1 = A*
. Floating-point numbers are compared with epsilon ε
.
Examples
A ≔ ❨❨1/√2, 1/√2, 0❩, ❨0, 0, i❩, ❨1/√2, −1/√2, 0❩❩
⎛ 0.707106781187 0.707106781187 0⎞ ⎜ 0 0 i⎟ ⎝ 0.707106781187 −0.707106781187 0⎠
IsUnitary(A)
true