Previous Page Next Page Contents

linalg::hessenberg -- Hessenberg matrix

Introduction

linalg::hessenberg(A) returns an (upper) Hessenberg matrix H.

Call(s)

linalg::hessenberg(A <, All>)

Parameters

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

Options

All - returns the list [H, P] with a Hessenberg matrix H similar to A and the corresponding nonsingular transformation matrix P such that H = P * A * P^(-1).

Returns

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

Related Functions

linalg::charpoly

Details

Example 1

Consider the matrix:

>> A := Dom::Matrix(Dom::Rational)(
     [[0, 1, 0, -1], [-4/3, 2/3, 5/3, -1/3],
      [-1, 2, 0, 0], [-5/3, 4/3, 1/3, 1/3]]
   )
                        +-                      -+
                        |    0,   1,   0,   -1   |
                        |                        |
                        |  -4/3, 2/3, 5/3, -1/3  |
                        |                        |
                        |   -1,   2,   0,    0   |
                        |                        |
                        |  -5/3, 4/3, 1/3,  1/3  |
                        +-                      -+

The following Hessenberg matrix is similar to A:

>> H := linalg::hessenberg(A)
                      +-                          -+
                      |    0,  -1/4,  -1/7,   -1   |
                      |                            |
                      |  -4/3,  3/2,  34/21, -1/3  |
                      |                            |
                      |    0,   7/8, -17/14,  1/4  |
                      |                            |
                      |    0,    0,  -72/49,  5/7  |
                      +-                          -+

If the corresponding transformation matrix is needed as well, call linalg::hessenberg with option All:

>> [H, P] := linalg::hessenberg(A, All)
       -- +-                          -+  +-                  -+ --
       |  |    0,  -1/4,  -1/7,   -1   |  |  1,   0,    0,  0  |  |
       |  |                            |  |                    |  |
       |  |  -4/3,  3/2,  34/21, -1/3  |  |  0,   1,    0,  0  |  |
       |  |                            |, |                    |  |
       |  |    0,   7/8, -17/14,  1/4  |  |  0, -3/4,   1,  0  |  |
       |  |                            |  |                    |  |
       |  |    0,    0,  -72/49,  5/7  |  |  0, -8/7, -1/7, 1  |  |
       -- +-                          -+  +-                  -+ --

Then P is a nonsingular matrix such that the product P * A * P^(-1) is equal to H:

>> P * A * P^(-1)
                      +-                          -+
                      |    0,  -1/4,  -1/7,   -1   |
                      |                            |
                      |  -4/3,  3/2,  34/21, -1/3  |
                      |                            |
                      |    0,   7/8, -17/14,  1/4  |
                      |                            |
                      |    0,    0,  -72/49,  5/7  |
                      +-                          -+

Background

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000