It seems that there is a nice inverse for matrices that can be written as a diagonal matrix plus a symmetric matrix consisting of scaled blocks of ones.


Consider a real matrix of the form:
$$\begin{pmatrix}a\_{11}{1}\_{r\_{1}\times r\_{1}}+b\_{1}I\_{r\_{1}} & a\_{12}{1}\_{r\_{1}\times r\_{2}} & a\_{13}{1}\_{r\_{1}\times r\_{3}} \\
a\_{12}{1}\_{r\_{2}\times r\_{1}} & a\_{22}{1}\_{r\_{2}\times r\_{2}}+b\_{2}I\_{r\_{2}} & a\_{23}{1}\_{r\_{2}\times r\_{2}} \\
a\_{13}{1}\_{r\_{3}\times r\_{1}} & a\_{23}{1}\_{r\_{2}\times r\_{2}} & a\_{33}{1}\_{r\_{3}\times r\_{3}} +b\_{3}I\_{r\_{3}}
\end{pmatrix}$$
The $r\_i$ are growing linearly in the matrix size $n$, the $a\_{ij}$ are bounded in absolute value as $n$ grows, while the $b\_i$ are bounded and bounded away from $0$. The matrices $1\_{r\_i \times r\_j}$ are matrices of all ones of the appropriate dimensions, and $I\_{r\_i}$ are identity matrices.


Are there techniques to analyze the inverse of such a matrix? In the 2-by-2 case, we can compute that the inverse is 
\begin{pmatrix}-\frac{b\_{1}^{-1}}{r\_{1}}{1}\_{r\_{1}\times r\_{1}}+b\_{1}^{-1}I\_{r\_{1}}+O(1/n^{2}) & O(1/n^{2})\\
O(1/n^{2}) & -\frac{b\_{2}^{-1}}{r\_{2}}{1}\_{r\_{2}\times r\_{2}}+b\_{2}^{-1}I\_{r\_{2}}+O(1/n^{2})
\end{pmatrix} 
Is there an easy way to see why this should generalize?



Inverse of matrix with blocks of ones
$\newcommand{\de}{\delta}
\newcommand{\De}{\Delta}
\newcommand{\ep}{\epsilon}
\newcommand{\ga}{\gamma}
\newcommand{\Ga}{\Gamma}
\newcommand{\la}{\lambda}
\newcommand{\Si}{\Sigma}
\newcommand{\thh}{\theta}
\newcommand{\R}{\mathbb{R}}
\newcommand{\E}{\operatorname{\mathsf E}} 
\newcommand{\PP}{\operatorname{\mathsf P}}$


Is there an easy way to see why this should generalize? Yes. 


Indeed, this can be extended to any number of blocks. Say a matrix $M$ consists of $q\times q$ blocks, with its $ij$-block given by the formula 
\begin{equation}
 a\_{ij}1\_{r\_i\times r\_j}+b\_i\de\_{ij}I\_{r\_i},
\end{equation}
where $i,j=1,\dots,q$ and $\de\_{ij}$ is the Kronecker symbol. The $ij$-block of the inverse matrix $M^{-1}$ has the same form: 
\begin{equation}
 c\_{ij}1\_{r\_i\times r\_j}+d\_i\de\_{ij}I\_{r\_i}
\end{equation}
for some real $c\_{ij}$ and $d\_i$. 


Noting that $1\_{r\times s}1\_{s\times t}=s1\_{r\times t}$, we see that the $ij$-block of the identity matrix $MM^{-1}$ is 
\begin{equation}
 \sum\_k (a\_{ik}1\_{r\_i\times r\_k}+b\_i\de\_{ik}I\_{r\_i})(c\_{kj}1\_{r\_k\times r\_j}+d\_k\de\_{kj}I\_{r\_k})
 =u\_{ij}1\_{r\_i\times r\_j}+b\_id\_i\de\_{ij}I\_{r\_i}, 
\end{equation}
where
\begin{equation}
 u\_{ij}:=a\_{ij}d\_j+\sum\_k(a\_{ik}r\_k+\de\_{ik}b\_k)c\_{kj}. 
\end{equation}
That is, 
\begin{equation}
 D\_d=D\_{1/b},\quad AD\_b+(AD\_r+D\_b)C=0,
\end{equation}
where $D\_v$ stands for the diagonal matrix with the coordinates of the vector $v=(v\_1,\dots,v\_q)$ on the diagonal, $d:=(d\_1,\dots,d\_q)$, $b:=(b\_1,\dots,b\_q)$, $1/b:=(1/b\_1,\dots,1/b\_q)$, $r:=(r\_1,\dots,r\_q)$, $A:=(a\_{ij})$, and  

\begin{multline\*}
C:=(c\_{ij})=-(AD\_r+D\_b)^{-1}AD\_b
=-(I\_q+D\_r^{-1}A^{-1}D\_b)^{-1}(AD\_r)^{-1}AD\_{1/b} \\ 
=-(I\_q+D\_r^{-1}A^{-1}D\_b)^{-1}D\_{1/(br)}\sim-D\_{1/(br)} 
\end{multline\*}
if, for instance, $A^{-1}$ exists and $\min\_i|r\_i|\to\infty$, where $br:=(b\_1r\_1,\dots,b\_qr\_q)$. Thus, the $ij$-block $c\_{ij}1\_{r\_i\times r\_j}+d\_i\de\_{ij}I\_{r\_i}$ of the inverse matrix $M^{-1}$ behaves as 
\begin{equation}
 \Big(\frac1{b\_i}\,I\_{r\_i}-\frac1{b\_ir\_i}\,1\_{r\_i\times r\_i}\Big)\de\_{ij}, 
\end{equation}
as desired.


