LinearAlgebra - Maple Programming Help

Home : Support : Online Help : Mathematics : Linear Algebra : LinearAlgebra Package : Queries : LinearAlgebra/IsOrthogonal

LinearAlgebra

 IsOrthogonal
 test if a Matrix is orthogonal
 IsUnitary
 test if a Matrix is unitary

 Calling Sequence IsOrthogonal(A, M) IsUnitary(A, M)

Parameters

 A - square Matrix M - (optional) square Matrix

Description

 • 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](..).

Examples

 > with(LinearAlgebra):
 > G := map(simplify, GivensRotationMatrix( , 1, 2, 3 ));
 ${G}{≔}\left[\begin{array}{ccc}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)& {\mathrm{sin}}{}\left({\mathrm{\theta }}\right)& {0}\\ {-}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)& {\mathrm{cos}}{}\left({\mathrm{\theta }}\right)& {0}\\ {0}& {0}& {1}\end{array}\right]$ (1)
 > Normalizer := x -> simplify(x,'trig'):
 > IsOrthogonal(G);
 ${\mathrm{true}}$ (2)
 > map(simplify, G . Transpose(G));
 $\left[\begin{array}{ccc}{1}& {0}& {0}\\ {0}& {1}& {0}\\ {0}& {0}& {1}\end{array}\right]$ (3)
 > Q := <|>;
 ${Q}{≔}\left[\begin{array}{cc}\frac{{3}{}\sqrt{{10}}}{{10}}& \frac{{I}}{{10}}{}\sqrt{{10}}\\ {-}\frac{\sqrt{{10}}}{{10}}& \frac{{3}{}{I}}{{10}}{}\sqrt{{10}}\end{array}\right]$ (4)
 > IsOrthogonal(Q);
 ${\mathrm{false}}$ (5)
 > IsUnitary(Q);
 ${\mathrm{true}}$ (6)
 > A := <<1,2>|<4,-3>>:
 > C := <<25/121,2/121>|<2/121,5/121>>:
 > A . C . Transpose(A);
 $\left[\begin{array}{cc}{1}& {0}\\ {0}& {1}\end{array}\right]$ (7)
 > IsOrthogonal(A,C);
 ${\mathrm{true}}$ (8)