Inverse of a matrix whose off-diagonals are constant column-wise I have a $n\times n$ square matrix, $A=I+P$, where $P$ is a matrix with $0$ on the diagonals and where, for all columns $j$, $a_{ij}=c_j $, where $i\neq j$ and $c_j$ does not necessarily equal $c_k$. Also, I assume that $c_j\in(0,1]$ for all j. For example, if $n=3$: $$P=\left(\begin{array}{ccc}
0 & c_{2} & c_{3}\\
c_{1} & 0 & c_{3}\\
c_{1} & c_{2} & 0
\end{array}\right) $$
What I am interested in is the inverse of $A$.  In fact, I am interested in a very specific relationship. Define $D=A^{-1}.$ Then, it looks like $d_{ij}/d_{ji}=c_{i}/c_{j}$. I was wondering if there was a way of showing this relationship analytically (if this in fact holds generally, as I think but am not certain it does). Does anyone have any ideas?
 A: $
\def\o{{\tt1}}\def\p{\partial}
\def\L{\left}\def\R{\right}
\def\LR#1{\L(#1\R)}
\def\diag#1{\operatorname{diag}\LR{#1}}
\def\Diag#1{\operatorname{Diag}\LR{#1}}
\def\trace#1{\operatorname{Tr}\LR{#1}}
\def\qiq{\quad\implies\quad}
\def\grad#1#2{\frac{\p #1}{\p #2}}
\def\c#1{\color{red}{#1}}
\def\m#1{\left[\begin{array}{r}#1\end{array}\right]}
\def\A{A^{-1}}
\def\B{B^{-1}}
$Given the $c$ vector and the all-ones vector $u$, write the $A$ matrix as
$$\eqalign{
A &= \Diag{u-c} + uc^T \\
  &= B + uc^T \\
}$$
and apply the Sherman-Morrison formula to obtain
a formula for the inverse
$$\eqalign{
\A &= \LR{B+uc^T}^{-1} \\
 &= \B -\frac{\B cu^T \B}{\o+c^T\B u} \\
}$$
Since $B$ is diagonal, $\B$ is also diagonal (and particularly easy to calculate). Since your hypothesis involves the off-diagonal terms, you can ignore the $\B$ term altogether. Since it involves a ratio you can also ignore the minus sign and the denominator of the second term.
Therefore, calculate the ratio of the components of the numerator of the second term. Furthermore, since the vector $c$ is arbitrary, you only need to confirm your hypothesis for a single index pair, ${\rm e.g.}\;(i,j)=(2,3)$.
Update
You can use a Hadamard $\LR{\odot}$ product to write the desired ratio as follows
$$\eqalign{
&b = \diag{B}^{-1} \\
&{\B cu^T \B} = \LR{cu^T}\odot\LR{bb^T} \\
&R
 = \frac{\B cu^T \B}{\LR{\B cu^T \B}^T}
 = \frac{\LR{cu^T}\odot\LR{bb^T}}{{\LR{cu^T}^T\odot\LR{bb^T}^T}}
 = \frac{cu^T}{uc^T} \\
}$$
The $(i,j)$ components of the ratio are therefore
$$\eqalign{
R_{ij} = \frac{c_i\o_j}{\o_ic_j} = \frac{c_i}{c_j} \\
}$$
as hypothesized.
