How can I find the determinant of a $n\times n$ square matrix whose all diagonal elements are equal to $a$ and off-diagonal elements are equal to $b$?
Determinant of a specially structured matrix ($a$'s on the diagonal, all other entries equal to $b$)