Find the determinant of the following $5\times 5$ real matrix:

Let $A\in\mathbb{R^{5\times5}}$ be the matrix: $\left(\begin{array}{l}a&a&a&a&b\\a&a&a&b&a\\a&a&b&a&a\\a&b&a&a&a\\b&a&a&a&a\end{array}\right)$

Find the determinant of $A$.

Hey everyone. What I've done so far: $det\left(\begin{array}{l}a&a&a&a&b\\a&a&a&b&a\\a&a&b&a&a\\a&b&a&a&a\\b&a&a&a&a\end{array}\right)=det\left(\begin{array}{l}b&a&a&a&a\\a&b&a&a&a\\a&a&b&a&a\\a&a&a&b&a\\a&a&a&a&b\end{array}\right)$ (since switching two pairs of rows does not change the determinant)

$= det\left(\begin{array}{l}b-a&0&0&0&a-b\\0&b-a&0&0&a-b\\0&0&b-a&0&a-b\\0&0&0&b-a&a-b\\a&a&a&a&b\end{array}\right)$ (since adding a multiple of one row to another does not change the determinant) for all $1\le i\le 4 \rightarrow R_i-R_5$

Now I am quite stuck. I wanted to obtain a triangular matrix so I can calculate its determinant by the diagonal entries, but I don't know what to do with the last row. I've tried some column operations as well, but have had no success.

Would be happy to get your help, thank you :)

...now take out common factor from rows $1$ to $4$ :

$$(b-a)^4\begin{vmatrix}1&0&0&0&-1\\0&1&0&0&-1\\0&0&1&0&-1\\0&0&0&1&-1\\a&a&a&a&b\end{vmatrix}\;\;(*)$$

and now take $\;aR_1\;$ from row $\;R_5\;$ , then $\;aR_2\;$ for $\;R_5\;$, etc.

$$(*)=(b-a)^4\begin{vmatrix}1&0&0&0&-1\\ 0&1&0&0&-1\\ 0&0&1&0&-1\\ 0&0&0&1&-1\\ 0&0&0&0&b+4a\end{vmatrix}=(b-a)^4(b+4a)$$

Note that the first $4$ vectors \begin{eqnarray*} \begin{bmatrix} 1 \\0 \\0 \\0 \\-1 \\ \end{bmatrix} , \begin{bmatrix} 0 \\1 \\0 \\0 \\-1 \\ \end{bmatrix} , \begin{bmatrix} 0 \\0 \\1 \\0 \\-1 \\ \end{bmatrix} , \begin{bmatrix} 0 \\0 \\0 \\1 \\-1 \\ \end{bmatrix} , \begin{bmatrix} 1 \\1 \\1 \\1 \\1 \\ \end{bmatrix} \end{eqnarray*} are linearly independent & have eigenvalues $a-b$ and the final vector has eigen value $4a+b$. So ...

The eigenvalues of $$\left(\begin{array}{l}a&a&a&a&a\\a&a&a&a&a\\a&a&a&a&a\\a&a&a&a&a\\a&a&a&a&a\end{array}\right)$$ are $$5a,0,0,0,0$$ with eigenvectors as the columns (pairwise perpendicular) of $$\left( \begin{array}{rrrrr} 1 & -1 & -1 & -1 & -1 \\ 1 & 1 & -1 & -1 & -1 \\ 1 & 0 & 2 & -1 & -1 \\ 1 & 0 & 0 & 3 & -1 \\ 1 & 0 & 0 & 0 & 4 \\ \end{array} \right).$$ After adding $(b-a)I,$ the eigenvalues of $$\left(\begin{array}{l}b&a&a&a&a\\a&b&a&a&a\\a&a&b&a&a\\a&a&a&b&a\\a&a&a&a&b\end{array}\right)$$ are $$b+ 4a, \; b-a, \; b-a, \; b-a, \; b-a$$