Let us look at the the matrix
$$ M =\begin{bmatrix} a & b & \dots & b \\ b & a & \dots & b \\ \vdots & b & \ddots & \vdots \\ b & \dots & b & a \end{bmatrix}$$
It has one value $a$ on the main diagonal, and another value $b$ everywhere else. Let us assume that $a \neq b$. I wish to find the inverse of every $n\times n$ matrix of this form ($a$ on the diagonal, $b$ everywhere else).