mersenneforum.org > Math Inverse of a particular matrix
 Register FAQ Search Today's Posts Mark Forums Read

 2020-11-10, 22:21 #1 preda     "Mihai Preda" Apr 2015 2×23×29 Posts 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
 2020-11-10, 22:44 #2 preda     "Mihai Preda" Apr 2015 2·23·29 Posts 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.)
 2020-11-10, 23:29 #3 masser     Jul 2003 wear a mask 2×7×109 Posts Have you heard about Hilbert matrices?
2020-11-10, 23:33   #4
preda

"Mihai Preda"
Apr 2015

2·23·29 Posts

Quote:
 Originally Posted by masser Have you heard about Hilbert matrices?
Thanks! I thought that must be some well-known matrix, but I didn't know its name :)

 2020-11-10, 23:35 #5 masser     Jul 2003 wear a mask 27668 Posts As the wiki article states, those matrices are useful for testing linear algebra solvers; that's how I first learned about them.
 2020-11-11, 00:06 #6 preda     "Mihai Preda" Apr 2015 2×23×29 Posts In pari/gp: Code: 1 / mathilbert(n) Last fiddled with by preda on 2020-11-11 at 00:07
 2020-11-11, 03:27 #7 Dr Sardonicus     Feb 2017 Nowhere 3×7×199 Posts 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
2020-11-11, 06:15   #8
Batalov

"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

59×157 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$$

2020-11-11, 06:32   #9
retina
Undefined

"The unspeakable one"
Jun 2006
My evil lair

10111011100112 Posts

Quote:
 Originally Posted by Batalov 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

2020-11-11, 07:04   #10
Nick

Dec 2012
The Netherlands

3×17×31 Posts

Quote:
 Originally Posted by retina 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

2020-11-11, 07:15   #11
retina
Undefined

"The unspeakable one"
Jun 2006
My evil lair

32·23·29 Posts
Thanks

Quote:
 Originally Posted by Nick Use {n \choose r}.

 Similar Threads Thread Thread Starter Forum Replies Last Post paul0 Math 6 2017-07-25 16:41 wreck NFS@Home 1 2016-05-08 15:44 only_human Miscellaneous Math 26 2012-08-10 02:47 Raman Math 5 2011-04-13 23:29 flouran Math 1 2010-01-18 23:48

All times are UTC. The time now is 03:52.

Sun Jan 24 03:52:16 UTC 2021 up 52 days, 3 mins, 0 users, load averages: 1.98, 2.35, 2.36