<s>[INST] Calculating general $n\times n$ determinant I'm given determinant $\begin{vmatrix}
1 & 2 &3 & \cdots & n -1 & n \\ 
2 & 3 &4 & \cdots & n  & 1 \\ 
3 & 4 &5 & \cdots & 1 & 2 \\ 
\vdots & \vdots & \vdots & \ddots & \vdots & \vdots \\
n & 1 & 2 & \cdots & n-2 & n-1
\end{vmatrix}$ and I have to calculate it's value only using Laplace formula and properties of antilinear $n$-forms.
First, I subtract $i-1$-th column from $i$-th column, which gives me
$\begin{vmatrix}
1 & 1 &1 & \cdots & 1 & 1 \\ 
2 & 1 &1 & \cdots & 1  & 1-n \\ 
3 & 1 &1 & \cdots & 1 - n & 1 \\ 
\vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\
n & 1-n & 1 & \cdots & 1 & 1
\end{vmatrix}$.
Then, subtracting $i-1$-th row from $i$-th row yields us
$\begin{vmatrix}
1 & 1 &1 & \cdots & 1 & 1 \\ 
1 & 0 &0 & \cdots & 0  & -n \\ 
1 & 0 &0 & \cdots & - n & 0 \\ 
\vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\
1 & -n & 0 & \cdots & 0 & 0
\end{vmatrix}$.
Again, subtracting $i-1$-th column from $i$-th column
$\begin{vmatrix}
1 & 1 &0 & \cdots & 0 & 0 \\ 
1 & 0 &0 & \cdots & 0  & -n \\ 
1 & 0 &0 & \cdots & - n & n \\ 
\vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\
1 & -n & n & \cdots & 0 & 0
\end{vmatrix}$.
Two last steps before using Laplace formula are adding $i-1$ to $i$-th row
$\begin{vmatrix}
1 & 1 &0 & \cdots & 0 & 0 \\ 
2 & 1 &0 & \cdots & 0  & -n \\ 
2 & 0 &0 & \cdots & - n & 0 \\ 
\vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\
2 & -n & 0 & \cdots & 0 & 0
\end{vmatrix}$
and using properties of antilinear $n$-form flipping determinant
$(-1)^\frac{n(n-1)}{2}\begin{vmatrix}
0 & 0 &0 & \cdots & 1 & 1 \\ 
-n & 0 &0 & \cdots & 1  & 2 \\ 
0 & -n &0 & \cdots & 0 & 2 \\ 
\vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\
0 & 0 & 0 & \cdots & -n & 2
\end{vmatrix}$.
Final step is using Laplace formula on 1st row :
$$(-1)^\frac{n(n-1)}{2}\begin{vmatrix}
0 & 0 &0 & \cdots & 1 & 1 \\ 
-n & 0 &0 & \cdots & 1  & 2 \\ 
0 & -n &0 & \cdots & 0 & 2 \\ 
\vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\
0 & 0 & 0 & \cdots & -n & 2
\end{vmatrix} = (-1)^\frac{n(n-1)}{2}((-n)^{n-1} - 2(-n)^{n-2}) = (-1)^{\frac{n(n-1)^2}{2}}(n^{n-1} + 2n^{n - 2}).$$
But my textbook states that result should be $(-1)^{\frac{n(n-1)}{2}}\cdot\frac{1}{2}(n^n + n^{n-1})$. What I am doing wrong in my calculations?
 [/INST] In your second step, when you subtract row $i-1$ from row $i$, there should be a diagonal of $n$'s under your diagonal of $-n$'s, because $1-(1-n)=n$. For example, the third entry in the last column of your third determinant should be $n$, not $0$.
</s>