g05pxf pre- or post-multiplies an
matrix
by a random orthogonal matrix
, overwriting
. The matrix
may optionally be initialized to the identity matrix before multiplying by
, hence
is returned.
is generated using the method of
Stewart (1980). The algorithm can be summarised as follows.
Let
follow independent multinormal distributions with zero mean and variance
and dimensions
; let
, where
is the identity matrix and
is the Householder transformation that reduces
to
,
being the vector with first element one and the remaining elements zero and
being a scalar, and let
. Then the product
is a random orthogonal matrix distributed according to the Haar measure over the set of orthogonal matrices of
. See
Theorem 3.3 in
Stewart (1980).
One of the initialization routines
g05kff (for a repeatable sequence if computed sequentially) or
g05kgf (for a non-repeatable sequence) must be called prior to the first call to
g05pxf.
Stewart G W (1980) The efficient generation of random orthogonal matrices with an application to condition estimates SIAM J. Numer. Anal. 17 403–409
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
The maximum error in
should be a modest multiple of
machine precision (see
Chapter X02).
Background information to multithreading can be found in the
Multithreading documentation.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
None.
Following initialization of the pseudorandom number generator by a call to
g05kff, a
orthogonal matrix is generated using the
option and the result printed.