<s>[INST] How to find the determinant of this matrix I have the following matrix:
$
\begin{bmatrix}
 a & 1 & 1 & 1 \\
 1 & a & 1 & 1 \\
 1 & 1 & a & 1 \\
 1 & 1 & 1 & a \\
\end{bmatrix}
$
My approach is to rref the matrix so that i can find the determinant by multiplying along the diagonals.
I attempted to do an rref and ended up with 
$
\begin{bmatrix}
 1 & a & 1 & 1 \\
 1-a & a-1 & 0 & 0 \\
 0 & 1-a & a-1 & 1 \\
 0 & 0 & 1-a & a-1 \\
\end{bmatrix}
$
I then factored out (1-a) to get this
$
\begin{bmatrix}
 1 & a & 1 & 1 \\
 1 & -1 & 0 & 0 \\
 0 & 1 & -1 & 1 \\
 0 & 0 & 1 & -1 \\
\end{bmatrix}
$
which will then make my determinant a multipile of $(1-a)^3$: 
$\det(A) = (1-a)^3x$
But now here I don't know what to do. I have a feeling that my approach is wrong. Any help or guide please?
 [/INST] To find the determinant you could just do it brute force by "Expansion by Minors" using the first row:
$$\begin{align}
\det \begin{bmatrix}
 a & 1 & 1 & 1 \\
 1 & a & 1 & 1 \\
 1 & 1 & a & 1 \\
 1 & 1 & 1 & a \\
\end{bmatrix} = a\det 
\begin{bmatrix}
  a & 1 & 1 \\
  1 & a & 1 \\
  1 & 1 & a \\
\end{bmatrix} \\- 1\det\begin{bmatrix}
  1 & 1 & 1 \\
  1 & a & 1 \\
  1 & 1 & a \\
\end{bmatrix} \\+ 1\det \begin{bmatrix}
  1 & a & 1 \\
  1 & 1 & 1 \\
  1 & 1 & a \\
\end{bmatrix} \\- 1\det\begin{bmatrix}
  1 & a & 1 \\
  1 & 1 & a \\
  1 & 1 & 1 \\
\end{bmatrix}
\end{align}
$$
</s>