We perform Gaussian elimination by applying each transformation also on the corresponding column:
Subtract the first row/column from the others and then the second from the third:
\(
\begin{pmatrix}
1 &1 &1\\
1 &0 &0\\
1 &0 &a
\end{pmatrix}
\sim\sim
\begin{pmatrix}
1 &0 &0\\
0 &-1 &-1\\
0 &-1 &a-1
\end{pmatrix}
\sim\sim
\begin{pmatrix}
1 &0 &0\\
0 &-1 &0\\
0 &0 &a
\end{pmatrix}
\)
The signatutre depends on the sign of \(a\), as this will affect the number of positive, negative or zero elements of the resulting diagonal matrix.