Previous Page Next Page Contents

numeric::eigenvalues -- numerical eigenvalues of a matrix

Introduction

numeric::eigenvalues(A) returns numerical eigenvalues of the matrix A.

Call(s)

numeric::eigenvalues(A)

Parameters

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

Returns

an ordered list of numerical eigenvalues

Side Effects

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

Related Functions

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

Details

Example 1

We compute the eigenvalues of the 3x3 Hilbert matrix:

>> numeric::eigenvalues(linalg::hilbert(3))
                [0.002687340356, 0.1223270659, 1.408318927]

Precision goal and working precision are set by DIGITS:

>> A := array(1..3, 1..3,
              [[   I     ,     PI   ,  exp(1)  ],
               [   2     ,  10^100  ,    1     ],
               [10^(-100), 10^(-100), 10^(-100)]
              ]):
>> DIGITS := 10: numeric::eigenvalues(A)
                        [1.0 I, 5.0e-101, 10.0e99]

Note that small eigenvalues may be influenced by round-off. We increase the working precision. The previous numerical eigenvalue 5.0*10^(-101) is improved to (1.0+2.718...*I)*10^(-100):

>> DIGITS := 200: eigenvals := numeric::eigenvalues(A):
>> DIGITS := 10: eigenvals
      [- 6.283185307e-100 + 1.0 I, 1.0e-100 + 2.718281829e-100 I,
      
         1.0e100 + 2.031919862e-102 I]
>> delete A, eigenvals:

Example 2

The following matrix has domain components:

>> A := Dom::Matrix(Dom::IntegerMod(7))(
       [[6, -1, 4], [0,  3, 3], [0,  0, 3]])
                      +-                           -+
                      |  6 mod 7, 6 mod 7, 4 mod 7  |
                      |                             |
                      |  0 mod 7, 3 mod 7, 3 mod 7  |
                      |                             |
                      |  0 mod 7, 0 mod 7, 3 mod 7  |
                      +-                           -+

Note that numeric::eigenvalues computes the eigenvalues of the following matrix:

>> A::dom::expr(A), numeric::eigenvalues(A)
                      +-         -+
                      |  6, 6, 4  |
                      |           |
                      |  0, 3, 3  |, [3.0, 3.0, 6.0]
                      |           |
                      |  0, 0, 3  |
                      +-         -+

If the eigenvalues are to be computed over the component domain Dom::IntegerMod(7), then linalg::eigenvalues should be used:

>> linalg::eigenvalues(A, Multiple)
                       [[6 mod 7, 1], [3 mod 7, 2]]
>> delete A:

Background

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000