Determinant of a circulant matrix I am interested in the calculation of the determinant of a $N\times N$ matrix with the following shape (for $N=5$)
\begin{equation}
A = \begin{pmatrix}
a & b & 0 & 0 & b \\
b & a & b & 0 & 0 \\
0 & b & a & b & 0 \\
0 & 0 & b & a & b \\
b & 0 & 0 & b & a \\
\end{pmatrix}
\end{equation}
As the matrix is diagonally dominant, I know it is nonsingular.  
Is there a general result for the calculation of $\det A$ for any value of $N$? If so, how can it be derived?

Following the formula from the link in the comment, we have the following.  Let $\omega$ denote an $N$th root of unity, then 
$$
\det(A) = \prod_{j=0}^{N-1} [a + b(\omega^j + \omega^{-j})] = 
\prod_{j=0}^{N-1} [a + 2b\cos(2\pi j/N)].
$$
Hopefully this is sufficient for your purposes.
