## `linalg::frobeniusForm` -- Frobenius form of a matrix

#### Introduction

`linalg::frobeniusForm``(A)` returns the Frobenius form of the matrix A, also called the Rational Canonical form of A.

#### Call(s)

`linalg::frobeniusForm(A <, All>)`

#### Parameters

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

#### Options

`All` | - | returns the list `[R, P]` with the Frobenius form R of `A` and a transformation matrix P such that A = P * R * P^(-1).

#### Returns

a matrix of the same domain type as `A`, or the list `[R, P]` when the option All is given.

#### Related Functions

`linalg::jordanForm`, `linalg::hermiteForm`, `linalg::smithForm`, `linalg::minpoly`

#### Details

- `linalg::frobeniusForm``(A, All)` computes the Frobenius form R of `A` and a transformation matrix P such that A = P * R * 1/P.
- The Frobenius form as computed by `linalg::frobeniusForm` is unique (see below).
- The component ring of `A` must be a field, i.e., a domain of category `Cat::Field`.

#### Example 1

The Frobenius form of the following matrix over C:

    >> A := Dom::Matrix(Dom::Complex)(
         [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
       )

                                   +-         -+
                                   |  1, 2, 3  |
                                   |           |
                                   |  4, 5, 6  |
                                   |           |
                                   |  7, 8, 9  |
                                   +-         -+

is the matrix:

    >> R := linalg::frobeniusForm(A)

                                  +-          -+
                                  |  0, 0,  0  |
                                  |            |
                                  |  1, 0, 18  |
                                  |            |
                                  |  0, 1, 15  |
                                  +-          -+

The transformation matrix P can be selected from the list `[R, P]`, which is the result of `linalg::frobeniusForm` with option All:

    >> P := linalg::frobeniusForm(A, All)[2]

                                  +-           -+
                                  |  1, 1,  30  |
                                  |             |
                                  |  0, 4,  66  |
                                  |             |
                                  |  0, 7, 102  |
                                  +-           -+

We check the result:

    >> P * R * P^(-1)

                                   +-         -+
                                   |  1, 2, 3  |
                                   |           |
                                   |  4, 5, 6  |
                                   |           |
                                   |  7, 8, 9  |
                                   +-         -+

#### Background

- The Frobenius form of a square matrix A is the matrix

          +---------+
          |R[1]    0|
          |   .     |
      R = |    .    | ,
          |     .   |
          | 0   R[r]|
          +---------+

  where R[1],...,R[r] are known as companion matrices and have the form:

             +-----------------+
             |0         -a[0]  |
             |1 .              |
      R[i] = |  . .            |, i = 1..r.
             |   1 0 -a[n[i]-1]|
             +-----------------+

  In the last column of the companion matrix R[i], you see the coefficients of its minimal polynomial in ascending order, i.e., the polynomial m[i]:= X^n[i] + a[n[i]-1]*X^(n[i]-1) + ... + a[1]*X + a[0] is the minimal polynomial of the matrix R[i].

  For these polynomials the following holds: m[i] divides m[i+1] for i=1..r-1, and m[r] is the minimal polynomial of A.

  The Frobenius form defined in this way is unique.

- Reference: P. Ozello: Calcul exact des formes de Jordan et de Frobenius d'une matrice, pp. 30-43. Thèse de l'Universite Scientifique Technologique et Medicale de Grenoble, 1987

#### Changes

- new function

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