## `linalg::eigenvectors` -- eigenvectors of a matrix

#### Introduction

`linalg::eigenvectors``(A)` computes the eigenvalues and eigenvectors of the matrix A.

#### Call(s)

`linalg::eigenvectors(A)`

#### Parameters

`A` | - | a square matrix of a domain of category `Cat::Matrix`

#### Returns

a list of sublists, where each sublist consists of an eigenvalue lambda of `A`, its algebraic multiplicity and a basis for the eigenspace of lambda. If a basis of an eigenspace cannot be computed, then `FAIL` is returned.

#### Related Functions

`numeric::eigenvectors`, `linalg::eigenvalues`, `linalg::nullspace`

#### Details

- A floating-point approximation of the eigenvalues and the eigenvectors is computed using `numeric::eigenvectors`, if the matrix `A` is defined over the component ring `Dom::Float` (see example 1). In this case it is recommended to call `numeric::eigenvalues` directly for a better efficiency.
- `linalg::eigenvectors` works as follows: For each eigenvalue lambda of the n x n matrix `A` a basis for the kernel of (lambda*I - A), the eigenspace of `A` with respect to the eigenvalue lambda, is computed using the Gauss-Jordan algorithm (see `linalg::gaussJordan`). Here, I denotes the n x n identity matrix.
- The eigenvectors are of the domain `Dom::Matrix(R)`, where `R` is the component ring of `A`.
- The component ring of the matrix `A` must be a field, i.e., a domain of category `Cat::Field`, for which the solver `solve` is able to compute the zeros of a polynomial.
- It can happen that a basis for the eigenspace of `A` with respect to a certain eigenvalue cannot be computed (e.g., if the component ring does not have a canonical representation of the zero element). In this case `linalg::eigenvectors` answers with a warning message and returns `FAIL`.

#### Example 1

We compute the eigenvalues and the eigenvectors of the matrix

        +-           -+
        |  1,  -3, 3  |
        |             |
    A = |  6, -10, 6  |
        |             |
        |  6,  6,  4  |
        +-           -+

    >> A := Dom::Matrix(Dom::Rational)(
         [[1, -3, 3], [6, -10, 6], [6, 6, 4]]
       ):
       linalg::eigenvectors(A)

          -- --       -- +-      -+ -- --  --        -- +-    -+ -- --
          |  |        |  |   1/4  |  |  |  |         |  |  -1  |  |  |
          |  |        |  |        |  |  |  |         |  |      |  |  |
          |  |  8, 1, |  |  5/12  |  |  |, |  -2, 1, |  |   0  |  |  |,
          |  |        |  |        |  |  |  |         |  |      |  |  |
          |  |        |  |    1   |  |  |  |         |  |   1  |  |  |
          -- --       -- +-      -+ -- --  --        -- +-    -+ -- --

             --         -- +-       -+ -- -- --
             |          |  |  -7/10  |  |  |  |
             |          |  |         |  |  |  |
             |  -11, 1, |  |   -9/5  |  |  |  |
             |          |  |         |  |  |  |
             |          |  |    1    |  |  |  |
             --         -- +-       -+ -- -- --

If we consider the matrix over the domain `Dom::Float` then the call of `linalg::eigenvectors``(A)` results in a numerical computation of the eigenvalues and the eigenvectors of `A` via the function `numeric::eigenvectors`:

    >> B := Dom::Matrix(Dom::Float)(A):
       linalg::eigenvectors(B)

          -- --           -- +-               -+ -- --
          |  |            |  |  -0.3218603429  |  |  |
          |  |            |  |                 |  |  |
          |  |  -11.0, 1, |  |  -0.8276408818  |  |  |,
          |  |            |  |                 |  |  |
          |  |            |  |   0.4598004899  |  |  |
          -- --           -- +-               -+ -- --

             --          -- +-                  -+ -- --
             |           |  |    -0.7071067812   |  |  |
             |           |  |                    |  |  |
             |  -2.0, 1, |  |  -1.518743801e-14  |  |  |,
             |           |  |                    |  |  |
             |           |  |    0.7071067812    |  |  |
             --          -- +-                  -+ -- --

             --         -- +-              -+ -- -- --
             |          |  |  0.2248595067  |  |  |  |
             |          |  |                |  |  |  |
             |  8.0, 1, |  |  0.3747658445  |  |  |  |
             |          |  |                |  |  |  |
             |          |  |  0.8994380268  |  |  |  |
             --         -- +-              -+ -- -- --

#### Changes

- used to be called `linalg::eigenVectors`
- Uses `numeric::eigenvectors` for a floating-point approximation for the eigenvalues and eigenvectors.

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000