<s>[INST] Inverse Identity + Constant Matrix I need to invert a square symmetric matrix $$ C = c\, I+cs\, B    $$
Where: (1) $B$ is a constant matrix of 1 for each entry. (2) $c$ and cs are just positive real numbers. (3) $I$ is the identity.
However, the $\det(B) = 0$ and $B$ by itself does not have an inverse, but I am sure that C must have one.
Problem: What is $C^{-1}$ in terms of $cs, c$?
 [/INST] You could use the Neumann series which is the inverse, if it converges:
$$A^{-1} = \sum_{k=0}^\infty(I-A)^k\qquad\text{(if convergent)}$$
Now we apply this to $\frac1c C = I + \frac{c_s}c B$ and get using $B^k = n^{k-1} B$ for $k>0$ (since $B^2=nB$) the following
\begin{align*}
\sum_{k=0}^\infty\left(I - \frac1c C\right)^k
&= \sum_{k=0}^\infty \left(-\frac{c_s}c\right)^k B^k \\
&= \frac1n\left(\sum_{k=1}^\infty \left(-\frac{c_s n}c\right)^k\right) B + I\\
&= \frac1n\left(\frac1{1+\frac{c_s n}c} - 1\right) B + I\\
&= \frac{-c_s}{c + c_s n}B + I = \left(\frac1c C\right)^{-1},
\end{align*}
at least if $\left|\frac{c_s n}c\right| < 1$. From this it follows
$$ C^{-1} = \frac{-c_s}{c(c+c_sn)}B + \frac1c I. \tag{*}$$
Now we can see that
\begin{align}
\left(\frac{-c_s}{c(c+c_sn)}B + \frac1c I\right)\left(cI + c_s B\right)
&= \frac{-c_s}{c+c_sn}B + \frac{-c_s^2}{c(c+c_sn)}B^2 + I + \frac{c_s}{c}B\\
&= \left(\frac{-c_s}{c+c_sn} + \frac{-n c_s^2}{c(c+c_sn)} + \frac{c_s}{c}\right)B + I \\
&= \frac{-c c_s + -n c_s^2 + c_s(c+c_sn)}{c(c+c_sn)}B + I\\
&= I \\
\end{align}
independent of $\frac{c_s n}c$, as long as $c(c+c_sn)\neq 0$. So (*) holds if $c\neq0$ and $c_s\neq -\frac cn$.
</s>