Find a mistake in a computation of a determinant. I recently have to solve one exercise in which I need to compute the determinant of the matrix
$$ A= \begin{pmatrix}
a & 1 & 1 &  1 \\
1 & a & 1 &  1 \\
1 & 1 & a &  1 \\
1 & 1 & 1 &  a \\
\end{pmatrix} ,$$
where $a\in\mathbb{R}$. This is how I proceed using famous properties of the determinant
$$\det A = \begin{vmatrix}
a & 1 & 1 &  1 \\
a-1 & 1-a & 0 &  0 \\
0 & a-1 & 1-a &  0 \\
\textbf{0} & \textbf{0} &\textbf{a-1} & \textbf{1-a}  \\
\end{vmatrix} = (1-a) \begin{vmatrix} a & 1 & 1 \\ a-1 & 1-a & 0 \\ 0 & a-1 & 0 \end{vmatrix} + (1-a)\begin{vmatrix} a & 1 & 1 \\ a-1 & 1-a & 0 \\ 0 & a-1 & 1-a \end{vmatrix} ; $$
$$ \det A =  (1-a) \begin{vmatrix} a & 1 & \textbf{1}  \\ a-1 & 1-a & \textbf{0}  \\ 0 & a-1 & \textbf{0}  \end{vmatrix} + (1-a)\begin{vmatrix} a & 1 & 2 \\ a-1 & 1-a & 1-a \\ \textbf{0}  & \textbf{a-1}  & \textbf{0}  \end{vmatrix} ; $$
$$ \det A =  (1-a) \begin{vmatrix}   a-1 & 1-a   \\ 0 & a-1   \end{vmatrix} + (1-a)^2\begin{vmatrix} a & 2 \\ a-1 & 1-a  \end{vmatrix} ; $$
$$ \det A = (1-a)(a-1)^2 + (1-a)^2[-a^2-a+2] = (1-a)(a-1)^2 - (1-a)^2[a^2 + a -2] ; $$ $$\det A = (1-a)(a-1)^2 - (1-a)^2(a+2)(a-1);$$
$$\det A = -(a-1)^3 - (a-1)^2 (a+2)(a-1) = -(a-1)^3 - (a-1)^3(a+2); $$
$$\det A = -(a-1)^3 [1 + (a+2)] =  \boxed{-(a-1)^3(a+3)} $$
I can't see any mistake in my procedure. However, calculating  $\det A$ with a computer, I obtained $$\det A= (a-1)^3(a+3)$$
It is the same result except for a minus sign...
EDIT
This is what I am doing in the first steps, basically substracting rows as follows:
$$\det A =  \begin{vmatrix}
a & 1 & 1 &  1 \\
1 & a & 1 &  1 \\
1 & 1 & a &  1 \\
1 & 1 & 1 &  a \\
\end{vmatrix} =\begin{vmatrix}
a & 1 & 1 &  1 \\
1 & a & 1 &  1 \\
1 & 1 & a &  1 \\
0 & 0 & a-1 &  1-a \\
\end{vmatrix} =\begin{vmatrix}
a & 1 & 1 &  1 \\
1 & a & 1 &  1 \\
0 & a-1 & 1-a &  0 \\
0 & 0 & a-1 &  1-a \\
\end{vmatrix} = \begin{vmatrix}
a & 1 & 1 &  1 \\
a-1 & 1-a & 0 &  0 \\
0 & a-1 & 1-a &  0 \\
0 & 0 & a-1 &  1-a \\
\end{vmatrix} $$
So where is exactly my mistake?
 A: We consider a square matrix $A$ and recall two rules regarding calculation with $\det A$:

*

*Multiplication of a row of $A$ with a scalar $c$ results in $c\cdot\det A$


*Addition of a scalar multiple of a row with another row leaves the value of the determinant unchanged.

Looking at OPs example we obtain
\begin{align*}
 \det A =   \begin{vmatrix}
a & 1 & 1 &  1 \\
1 & a & 1 &  1 \\
1 & 1 & a &  1 \\
1 & 1 & 1 &  a \\
\end{vmatrix} =
\color{blue}{(-1)} \begin{vmatrix}
a & 1 & 1 &  1 \\
1 & a & 1 &  1 \\
1 & 1 & a &  1 \\
\color{blue}{-1} & \color{blue}{-1} & \color{blue}{-1} & \color{blue}{-a} \\
\end{vmatrix} =
(-1)\begin{vmatrix}
a & 1 & 1 &  1 \\
1 & a & 1 &  1 \\
1 & 1 & a &  1 \\
0 & 0 & a-1 & 1-a \\
\end{vmatrix}
 \end{align*}

In the first step we multiply the last row with $-1$ and have to compensate it by a factor $(-1)$ in front of the determinant. In a second step we add the third row to the fourth row.
A: In the first step it seems there is a sign problem indeed
$$\det(A)= \begin{vmatrix}
a & 1 & 1 &  1 \\
1 & a & 1 &  1 \\
1 & 1 & a &  1 \\
1 & 1 & 1 &  a \\
\end{vmatrix}=\begin{vmatrix}
a & 1 & 1 &  1 \\
1 & a & 1 &  1 \\
1 & 1 & a &  1 \\
0 & 0 & 1-a &  a-1 \\
\end{vmatrix}=\begin{vmatrix}
a & 1 & 1 &  1 \\
1 & a & 1 &  1 \\
0 & 1-a & a-1 &  0 \\
0 & 0 & 1-a &  a-1 \\
\end{vmatrix}=$$
$$=\begin{vmatrix}
a & 1 & 1 &  1 \\
1-a & a-1 & 0 &  0 \\
0 & 1-a & a-1 &  0 \\
0 & 0 & 1-a &  a-1 \\
\end{vmatrix}=-\begin{vmatrix}
a & 1 & 1 &  1 \\
a-1 & 1-a & 0 &  0 \\
0 & a-1 & 1-a &  0 \\
0 & 0 & a-1 &  1-a \\
\end{vmatrix}$$
