Previous Page Next Page Contents

linalg::hilbert -- Hilbert matrix

Introduction

linalg::hilbert(n) returns the n x n Hilbert matrix H defined by H[i,j]:=1/(i+j-1).

Call(s)

linalg::hilbert(n <, R>)

Parameters

n - the dimension of the matrix: a positive integer
R - the component ring: a domain of category Cat::Rng; default: Dom::ExpressionField()

Returns

an n x n matrix of the domain Dom::Matrix(R).

Related Functions

linalg::invhilbert

Details

Example 1

We construct the 3 x 3 Hilbert matrix:

>> H := linalg::hilbert(3)
                            +-               -+
                            |   1,  1/2, 1/3  |
                            |                 |
                            |  1/2, 1/3, 1/4  |
                            |                 |
                            |  1/3, 1/4, 1/5  |
                            +-               -+

This is a matrix of the domain Dom::Matrix()).

If you prefer a different component ring, the matrix may be converted into the desired domain afterwards (see convert, for example). Alternatively, one can specify the component ring when creating the Hilbert matrix, for example the domain Dom::Float:

>> H := linalg::hilbert(3, Dom::Float)
              +-                                          -+
              |       1.0,          0.5,     0.3333333333  |
              |                                            |
              |       0.5,     0.3333333333,     0.25      |
              |                                            |
              |  0.3333333333,     0.25,          0.2      |
              +-                                          -+
>> domtype( H )
                          Dom::Matrix(Dom::Float)

Background

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000