Determinant of a matrix will all off-diagonal elements equal

Consider matrices of the following form: \begin{bmatrix} a & x & \cdots \\ x & b & x &\cdots \\ \vdots & x & c &\cdots \\ & \vdots & x & \ddots & \\ \end{bmatrix} where all $x$ are the same scalar. Is there anything that can be done to calculate the determinant easily? Obviously if $$x=a=b=c=\cdots $$ then the matrix is singular and the determinant is zero. Assume this is not the case.

Do they have any other interesting properties?


Solution 1:

Let $D=\operatorname{diag}(a,b,\ldots)-xI$ and let $e$ be the all-one vector. Then your matrix is equal to $D+xee^T$. As a consequence of the Sherman-Morrison formula, we have $$ \det(D+xee^T) =\det(D)+xe^T\operatorname{adj}(D)e =\prod_{j=1}^nd_{jj}+x\sum_{i=1}^n\prod_{j\ne i}d_{jj}. $$