Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

# linalg::hessenberg

Hessenberg matrix

### Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

## Syntax

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

## Description

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

linalg::hessenberg uses Gaussian elimination without pivoting. There is no special implementation for matrices with floating-point components.

The component ring of A must be a field, i.e., a domain of category Cat::Field.

## Examples

### 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]]
)```

The following Hessenberg matrix is similar to A:

`H := linalg::hessenberg(A)`

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

`[H, P] := linalg::hessenberg(A, All)`

Then P is a nonsingular matrix such that the product PAP- 1 is equal to H:

`P * A * P^(-1)`

## 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.

## Return Values

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

## Algorithms

An n×n matrix A = (ai, j)1 ≤ in, 1 ≤ jn is called an (upper) Hessenberg matrix, if the following holds: ai, j = 0 for all i, j ∈ {1, …, n} with i > j.

For each square matrix A over a field there exists a Hessenberg matrix similar to A. In general, the upper Hessenberg matrix is not unique.

## References

Reference: K.-H. Kiyek, F. Schwarz: Lineare Algebra. Teubner Studienbücher Mathematik, B.G. Teubner Stuttgart, Leipzig, 1999.