Previous Page Next Page Contents

numeric::singularvalues -- numerical singular values of a matrix

Introduction

numeric::singularvalues(A) returns numerical singular values of the matrix A.

Call(s)

numeric::singularvalues(A)

Parameters

A - a numerical matrix of domain type DOM_ARRAY or of category Cat::Matrix.

Returns

an ordered list of real floating point values

Side Effects

The function is sensitive to the environment variable DIGITS, which determines the numerical working precision.

Related Functions

linalg::eigenvalues, linalg::eigenvectors, numeric::eigenvalues, numeric::eigenvectors, numeric::singularvectors, numeric::spectralradius

Details

Example 1

The singular values of A and A^H coincide:

>> A := array(1..3, 1..2, [[1, 2*I], [2, 3],[3, PI]]):
>> numeric::singularvalues(A)
                        [1.503668692, 5.882906158]

The Hermitean transpose B=A^H:

>> B := array(1..2, 1..3,[[1, 2, 3], [-2*I, 3, PI]]):
>> numeric::singularvalues(B)
                        [1.503668692, 5.882906158]
>> delete A, B:

Example 2

We use numeric::eigenvalues to compute singular values:

>> M := Dom::Matrix():
>> A := M([[1, 2*I], [PI, 312689/49766*I], [2, 4*I]]):

The Hermitean transpose B=A^H can be computed by the methods conjugate and transpose of the matrix domain:

>> B := M::conjugate(M::transpose(A)):

Note that A^H*A is positive semi-definite and cannot have negative eigenvalues. However, computing small eigenvalues is numerically ill-conditioned and a small negative value occurs due to round-off:

>> numeric::eigenvalues(B*A)
                      [-8.67361738e-19, 74.34802201]

Consequently, an illegal imaginary singular value is computed:

>> map(%, sqrt)
                  [0.0000000009313225746 I, 8.622529908]

We have to increase DIGITS in order to compute this value more accurately:

>> DIGITS := 20: map(numeric::eigenvalues(B*A), sqrt)
         [0.000000000015115433585415141592, 8.6225299075259371493]

With numeric::singularvalues the standard precision suffices:

>> DIGITS := 10: numeric::singularvalues(A)
                      [1.511542232e-11, 8.622529908]
>> delete M, A, B:

Background

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000