# 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?

• ...I'm wondering whether there's a factoring of this matrix that can use the multiplicative property of determinants... hmm...@JPJanet – User001 Apr 8 '16 at 2:23
• If you can see any factoring at all I'd happily take it. I struggle to work with a matrix of "all ones" . It's $(ONES - I)x + v$ but that doesn't seem to help me – JP Janet Apr 8 '16 at 2:32

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}.$$