Hello All




---


Consider a matrix with elements:


$A\_{i,j}=x\_i$ for $i=j$  

$A\_{i,j}=1$ for $i\neq j$


Is there a closed form expression for the elements of $A^{-1}$?


Will be glad to know of any reference.


Thanks


HC



Is there a closed form expression for the inverse of the matrix with elements $A_{i,j}=x_i$ for $i=j$ and  $A_{i,j}=1$ for $i\neq j$?
You can use the [Sherman-Morrison formula](http://en.wikipedia.org/wiki/Sherman-Morrison_formula).


In the notation of the Wikipedia article, let $u=v=(1,\ldots,1)'$ and $A$ (***not*** the same as your $A$) be the diagonal matrix with $(x\_{1}-1, \ldots, x\_{n}-1)$ on the diagonal.


Then, if I haven't made a mistake, the entry of the inverse matrix you're looking for is


$\frac{1}{x\_{i}-1} - \frac{ \frac{1}{(x\_{i}-1)^{2}} }{ 1 + \sum\_{k} \frac{1}{x\_{k}-1}}$ if $i=j$, and $ \frac{ -\frac{1}{ (x\_{i}-1)(x\_{j}-1) }}{ 1 + \sum\_{k} \frac{1}{x\_{k}-1}}$ otherwise.


