Determinant of a matrix with $t$ in all off-diagonal entries.

It seems from playing around with small values of $n$ that

$$\det \left( \begin{array}{ccccc} -1 & t & t & \dots & t\\ t & -1 & t & \dots & t\\ t & t & -1 & \dots & t\\ \vdots & \vdots & \vdots & \ddots & \vdots\\ t & t & t & \dots& -1 \end{array}\right) = (-1)^{n-1}(t+1)^{n-1}((n-1)t-1)$$

where $n$ is the size of the matrix.

How would one approach deriving (or at least proving) this formally?

Motivation

This came up when someone asked what is the general solution to:

$$\frac{a}{b+c}=\frac{b}{c+a}=\frac{c}{a+b},$$

and for non-trivial solutions, the matrix above (with $n=3$) must be singular. In this case either $t=-1\implies a+b+c=1$ or $t=\frac{1}{2}\implies a=b=c$.

So I wanted to ensure that these are also the only solutions for the case with more variables.

-
Did you try induction? –  zarathustra Aug 14 '14 at 17:08
Induction combined with this should do it. –  Daniel R Aug 14 '14 at 17:09
Induction is the way to go, but first, subtract the first row from all the other rows to get a much easier calculation. –  fixedp Aug 14 '14 at 17:10
When $n=2$ seems to fail. $1-t^2$ RHS, $-2 t^3-3 t^2+1$ LHS, right? –  carlosayam Aug 14 '14 at 17:14
The matrix size should be $n+1$; @caya gives the $n=2$ case. –  Semiclassical Aug 14 '14 at 17:17

Using elementary operations instead of induction is key. \begin{align} &\begin{vmatrix} -1 & t & t & \dots & t\\ t & -1 & t & \dots & t\\ t & t & -1 & \dots & t\\ \vdots & \vdots & \vdots & \ddots & \vdots\\ t & t & t & \dots& -1 \end{vmatrix}\\ &= \begin{vmatrix} -t-1 & 0 & 0 & \dots & t+1\\ 0 & -t-1 & 0 & \dots & t+1\\ 0 & 0 & -t-1 & \dots & t+1\\ \vdots & \vdots & \vdots & \ddots & \vdots\\ t & t & t & \dots& -1 \end{vmatrix}\\ &= \begin{vmatrix} -t-1 & 0 & 0 & \dots & 0\\ 0 & -t-1 & 0 & \dots & 0\\ 0 & 0 & -t-1 & \dots & 0\\ \vdots & \vdots & \vdots & \ddots & \vdots\\ t & t & t & \dots& (n - 1)t -1 \end{vmatrix}\\ &= (-1)^{n - 1}(t + 1)^{n - 1}((n - 1)t - 1) \end{align}

-
For clarity, first he is doing "Row N = Row N - Last Row" then he is doing "Last Row = Last Row - Row N" –  DanielV Aug 14 '14 at 17:46

You can write the expression as $$\det(t C - (t+1)I)$$ where $C = \mathbf{1}\mathbf{1}^T$ is the matrix of all $1$'s, formed by the column of ones times its transpose. Using the identity $\det(I+cr) = 1+rc$, you can first factor out $(t+1)$: $$\det(t C - (t+1)I) = (-1)^n(t+1)^n \det\left(I - \frac{t}{t+1} \mathbf{1}\right) = (-1)^n(t+1)^n \left(1 - \frac{nt}{t+1}\right)$$

-
That's brilliant, nothing could be more elegant. :) –  MGA Aug 14 '14 at 17:37
+1, but what do you mean by $cr$ and $rc$? Are these row and column vectors, abbreviated $r$ and $c$, respectively? (My assumption) –  apnorton Aug 15 '14 at 3:44
Correct, they are row and column vectors. I stole that from the Wiki page on Determinant –  Victor Liu Aug 15 '14 at 21:42

Note that your matrix is the sum of the matrix $T$ with all entries equal to $t$ and the matrix $-(1+t)I$. Therefore the determinant you are asking about is the value at $X=-(1+t)$ of the characteristic polynomial $\chi_{-T}$ of $-T$.

Since $T$ has rank (at most) $1$, its eigenspace for eigenvalue $0$ has dimension $n-1$, so the characteristic polynomial of $-T$ is $\chi_{-T}=X^{n-1}(X+nt)$ (the final factor must be that because the coefficient of $X^{n-1}$ in $\chi_{-T}$ is $\def\tr{\operatorname{tr}}-\tr(-T)=nt$). Now setting $X=-(1+t)$ gives $$\det(-(1+t)I-T)=(-1-t)^{n-1}(-1-t+nt)=(-1-t)^{n-1}(-1+(n-1)t)$$ as desired.

This kind of question is recurrent on this site; see for instance Determinant of a specially structured matrix and How to calculate the following determinants (all ones, minus $I$).

-

Here is another characterization of the result. For convenience, I will take the matrix size as $n+1$ rather than $n$. First, note that we may factor $t$ from each of the $n+1$ rows, and so the determinant may be written as $$\det{[t(M-t^{-1} I_{n+1})]} =t^{n+1} \det(M-t^{-1} I_{n+1})$$ where $(M)_{ij}=1-\delta_{ij}$ for $1\leq i,j\leq n+1$.

Next, observe that $M$ has $n$ independent eigenvectors of the form $\hat{e}_i-\hat{e}_{n+1}$ ($1\leq i\leq n$), each with eigenvalue $-1$; in addition, $M$ also has the eigenvector $\sum_{i=1}^{n+1}\hat{e}_i$ with eigenvalue $n$. Consequently the characteristic polynomial of $M$ in powers of $t^{-1}$ is $$\det(M-t^{-1} I_{n+1})=(-1-t^{-1})^n (n-t^{-1}) = t^{-n-1}\cdot (-1)^n (1+t)^n (nt+1)$$ and so the prior result yields the desired identity.

-