<s>[INST] Help to evaluate determinant I want to evaluate the determinant of the $n \times n$ matrix
$\left|\begin{array}{ccccc} 1 & 0 & \ldots & 0& 0 \\
0 & 0 & \ldots & 0 & -a\\
0 & 0 & \ldots & -a & 0\\
&&&\vdots \\
0 & -a & 0 &\dots & 0
\end{array}\right|.$
So I try to say that it is $(-1)^{ n + (n-1) + \ldots n-(n-2)}(-a)^{n-1}$. So power of -1 should be $\frac{(n-1)(n+2)}{2} + n-1$. However answer given is $n(n-1)/2$. Where is wrong?
 [/INST] In fact, your answer is correct and agrees with the given answer. Here is the reason:$$\frac{(n-1)(n+2)}{2} + n-1=\frac{n(n-1)+2(n-1)}{2}+n-1=\frac{n(n-1)}{2}+2(n-1),$$
which implies that 
$$(-1)^{\frac{(n-1)(n+2)}{2} + n-1}=(-1)^{\frac{n(n-1)}{2}+2(n-1)}=(-1)^{\frac{n(n-1)}{2}}.$$
</s>