Previous Up Next

2.41.6  Hilbert matrix : hilbert

hilbert takes as argument an integer n.
hilbert returns the Hilbert matrix.
A Hilbert matrix is a square matrix of size n whose elements aj,k are :

aj,k=
1
j+k+1
,    0≤ j, 0 ≤ k 

Input :

hilbert(4)

Output :

[[1,1/2,1/3,1/4],[1/2,1/3,1/4,1/5],[1/3,1/4,1/5,1/6], [1/4,1/5,1/6,1/7]]

Previous Up Next