mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Math

Reply
 
Thread Tools
Old 2020-11-10, 22:21   #1
preda
 
preda's Avatar
 
"Mihai Preda"
Apr 2015

101001101102 Posts
Default Inverse of a particular matrix

I have a very special matrix, square n*n, where the lines 0..(n-1) are:
line(i)={1/(i+1), 1/(i+2), ... , 1/(i+n)}

for example, for n==2:
Code:
1   1/2
1/2 1/3
for n==3:
Code:
1   1/2 1/3
1/2 1/3 1/4
1/3 1/4 1/5
I would like to find the inverse (as a function of "n").

(I would also be interested in *how* to solve the question (not only in the answer), if it's not too complicated)

Thank you!

Last fiddled with by preda on 2020-11-10 at 22:22
preda is offline   Reply With Quote
Old 2020-11-10, 22:44   #2
preda
 
preda's Avatar
 
"Mihai Preda"
Apr 2015

2×23×29 Posts
Default

The above matrix originated from attempting to do a least-squares polynomial fit to a function evaluated over a (large) set of equidistant points. (the order of the matrix corresponds to the degree of the polynomial.)
preda is offline   Reply With Quote
Old 2020-11-10, 23:29   #3
masser
 
masser's Avatar
 
Jul 2003
wear a mask

52×61 Posts
Default

Have you heard about Hilbert matrices?
masser is offline   Reply With Quote
Old 2020-11-10, 23:33   #4
preda
 
preda's Avatar
 
"Mihai Preda"
Apr 2015

2×23×29 Posts
Default

Quote:
Originally Posted by masser View Post
Have you heard about Hilbert matrices?
Thanks! I thought that must be some well-known matrix, but I didn't know its name :)
preda is offline   Reply With Quote
Old 2020-11-10, 23:35   #5
masser
 
masser's Avatar
 
Jul 2003
wear a mask

52×61 Posts
Default

As the wiki article states, those matrices are useful for testing linear algebra solvers; that's how I first learned about them.
masser is offline   Reply With Quote
Old 2020-11-11, 00:06   #6
preda
 
preda's Avatar
 
"Mihai Preda"
Apr 2015

2×23×29 Posts
Default

In pari/gp:
Code:
1 / mathilbert(n)

Last fiddled with by preda on 2020-11-11 at 00:07
preda is offline   Reply With Quote
Old 2020-11-11, 03:27   #7
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

24×32×29 Posts
Default

Hilbert matrices are notorious for being "numerically bad." It is however ridiculously easy to prove they're "positive definite," hence invertible.

If n is a positive integer, f = f(x) is a polynomial of degree n-1,

f = a0 + a1*x + .... + an-1xn-1, we can write [f] as the product of a 1xn and an nx1 matrix (Pari-GP notation),

[f] = [a0, a1, ..., an-1]*[1;x;...;xn-1]. Taking the transpose,

[f] = [1,x,...,xn-1]*[a0; a1; ...; an-1] Multiplying,

[f2] = [a0, a1, ..., an-1]*[1;x;...;xn-1]*[1,x,...,xn-1]*[a0; a1; ...; an-1]

Multiplying the middle two matrices gives the nxn matrix whose i, j entry is xi+j-2. Now, integrate from 0 to 1, and we find:

The (1x1 matrix whose entry is) the integral from 0 to 1 of f2(x) dx may thus be expressed

[a0, a1, ..., an-1]*Hn*[a0; a1; ...; an-1].

The integral is positive unless f is identically zero, so Hn is positive-definite.

All you need, then, is a set of polynomials of degree 0, 1, 2, ..., n-1 which are orthogonal WRT integration from 0 to 1, (starting, obviously, with the constant polynomial 1). The "standard" set is the "shifted" Legendre polynomials. (The usual Legendre polynomials are orthogonal WRT integration from -1 to 1.)

Last fiddled with by Dr Sardonicus on 2020-11-11 at 03:28 Reason: gixnif ostpy
Dr Sardonicus is offline   Reply With Quote
Old 2020-11-11, 06:15   #8
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

2×11×421 Posts
I want to muck with forum's tex software. (by posting straight from Wiki.)

Quote:
The inverse of the Hilbert matrix can be expressed in closed form using binomial coefficients; its entries are
\((H^{-1})_{ij} = (-1)^{i+j}(i + j - 1) \binom {n + i - 1}{n - j} \binom {n + j - 1}{n - i} \binom {i + j - 2}{i - 1}^2\)
Batalov is offline   Reply With Quote
Old 2020-11-11, 06:32   #9
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

600310 Posts
Default

Quote:
Originally Posted by Batalov View Post
I want to muck with forum's tex software. (by posting straight from Wiki.)


\((H^{-1})_{ij} = (-1)^{i+j}(i + j - 1) \binom {n + i - 1}{n - j} \binom {n + j - 1}{n - i} \binom {i + j - 2}{i - 1}^2\)
That isn't tex, that is relying on some ugly JS interpreter.

This is tex:
\((H^{-1})_{ij} = (-1)^{i+j}(i + j - 1) \binom {n + i - 1}{n - j} \binom {n + j - 1}{n - i} \binom {i + j - 2}{i - 1}^2\)

At least I can see the tex, although binom isn't defined.

Last fiddled with by retina on 2020-11-11 at 06:32
retina is online now   Reply With Quote
Old 2020-11-11, 07:04   #10
Nick
 
Nick's Avatar
 
Dec 2012
The Netherlands

22·5·79 Posts
Default

Quote:
Originally Posted by retina View Post
That isn't tex, that is relying on some ugly JS interpreter.

This is tex:
\((H^{-1})_{ij} = (-1)^{i+j}(i + j - 1) {n + i - 1\choose n - j} {n + j - 1\choose n - i} {i + j - 2\choose i - 1}^2\)

At least I can see the tex, although binom isn't defined.
Use {n \choose r}.

Last fiddled with by Nick on 2020-11-11 at 07:08 Reason: Typo
Nick is offline   Reply With Quote
Old 2020-11-11, 07:15   #11
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

32·23·29 Posts
Default Thanks

Quote:
Originally Posted by Nick View Post
Use {n \choose r}.
retina is online now   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inverse of Smoothness Probability paul0 Math 6 2017-07-25 16:41
mi64: inverse does not exist wreck NFS@Home 1 2016-05-08 15:44
Lurid Obsession with Mod Inverse only_human Miscellaneous Math 26 2012-08-10 02:47
Inverse of functions Raman Math 5 2011-04-13 23:29
Inverse Laplace Transform flouran Math 1 2010-01-18 23:48

All times are UTC. The time now is 12:20.

Sat Jan 23 12:20:08 UTC 2021 up 51 days, 8:31, 0 users, load averages: 2.41, 2.66, 2.64

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.