LinearAlgebra
IsOrthogonal
test if a Matrix is orthogonal
IsUnitary
test if a Matrix is unitary
Calling Sequence
Parameters
Description
Examples
IsOrthogonal(A, M)
IsUnitary(A, M)
A
-
square Matrix
M
(optional) square Matrix
The IsOrthogonal(A) function determines if A is an orthogonal Matrix (AA' = I, where A' is the transpose and I is the identity Matrix).
The IsOrthogonal(A,M) function determines if A is an orthogonal Matrix with respect to the inner product defined by M (AMA' = I).
In general, the IsOrthogonal function returns true if it can determine that Matrix A is orthogonal, false if it can determine that the Matrix is not orthogonal, and FAIL otherwise.
The IsUnitary(A) function determines if A is a unitary Matrix (A . A* = I, where A* is the Hermitian transpose and I is the identity Matrix).
The IsUnitary(A,M) function determines if A is a unitary Matrix with respect to the inner product defined by M (A . M . A* = I).
In general, the IsUnitary function returns true if it can determine that Matrix A is unitary, false if it can determine that the Matrix is not unitary, and FAIL otherwise.
This function is part of the LinearAlgebra package, and so it can be used in the form IsOrthogonal(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[IsOrthogonal](..).
with⁡LinearAlgebra:
G≔map⁡simplify,GivensRotationMatrix⁡cos⁡θ,sin⁡θ,1,2,3
G≔cos⁡θsin⁡θ0−sin⁡θcos⁡θ0001
Normalizer≔x↦simplify⁡x,trig:
IsOrthogonal⁡G
true
map⁡simplify,G·Transpose⁡G
100010001
Q≔sqrt⁡10⋅310,−sqrt⁡1010|sqrt⁡10⁢I10,3⁢sqrt⁡10⁢I10
Q≔3⁢1010I10⁢10−10103⁢I10⁢10
IsOrthogonal⁡Q
false
IsUnitary⁡Q
A≔1,2|4,−3:
C≔25121,2121|2121,5121:
A·C·Transpose⁡A
1001
IsOrthogonal⁡A,C
See Also
LinearAlgebra[HermitianTranspose]
LinearAlgebra[IdentityMatrix]
LinearAlgebra[Transpose]
Matrix
Download Help Document