How can I calculate this big determinant?

I am stuck at calculating the determinant of this $n$ size square matrix.

\begin{vmatrix} a & b & \dots & \dots &b \\ b &\ddots & \ddots &&\vdots \\ \vdots &\ddots&&\ddots&\vdots \\ \vdots &&\ddots&\ddots&b \\ b &\dots & \dots & b & a \end{vmatrix}

To calculate the determinant I want the matrix to look like this:

\begin{vmatrix} x & * & \dots & \dots &* \\ 0 &\ddots & \ddots &&\vdots \\ \vdots &\ddots&&\ddots&\vdots \\ \vdots &&\ddots&\ddots&* \\ 0 &\dots & \dots & 0 & x \end{vmatrix}

And the determinant would be $x^n$

I have tried several things and I got

\begin{vmatrix} a & b & \dots & \dots &b \\ b &\dots & \dots &b&a \\ 0 &a-b&b-a&0&0 \\ \vdots &0&a-b&b-a&\vdots \\ \vdots &&\ddots&\ddots&0 \\ 0 &\dots & \dots & a-b & b-a \end{vmatrix}

But I can't manage to get the matrix fully diagonalized.

• is the matrix all $b$s except for the diagonal where it is $a$? – RGS Nov 13 '16 at 20:32
• Have you tried some sort of combination of induction and cofactor expansion? – TomGrubb Nov 13 '16 at 20:33
• en.wikipedia.org/wiki/Circulant_matrix#Determinant – Jack Nov 13 '16 at 20:35
• @RSerrao yes it is. – John Keeper Nov 13 '16 at 20:35
• We can write this matrix as $M = (a-b)I + \frac {b}{n}xx^T$, where $x$ is the vector consisting of only $1$s. It's very easy to find the eigenvalues of $x$, and from there find the eigenvalues of $M$. From there, the determinant is simply the product of eigenvalues. – Omnomnomnom Nov 13 '16 at 20:38