Determinant and inverse matrix calculation of a special matrix Is there any smart way of calculating the determinant of this kind matrix?
\begin{pmatrix}
1 & 2 & 3 & \cdots &  n \\
2 & 1 & 2 & \cdots & n-1 \\ 
3 & 2 & 1 & \cdots & n-2 \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
n & n-1 & n-2 & \cdots & 1 \end{pmatrix}
I encountered this in a problem for the case $n=4$. I need to find the inverse matrix.
I doubt the idea of this problem is to calculate all the cofactors and then the inverse matrix in the usual way.
I see the pattern here and some recursive relations... but I am not sure if this helps for calculating the determinant of the existing matrix.

If it’s the determinant you are looking for, then what if you subtract column $j+1$ from column $j$ to get the matrix
$$\begin{pmatrix}
-1 & -1 & -1& \cdots &  n \\
1& -1 & -1& \cdots & n-1 \\ 
1& 1& -1 & \cdots & n-2 \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
1& 1& 1& \cdots & 1 \end{pmatrix}_{n\times n}$$
Then you could add the bottom row to the top row to get $[0,0,...,n+1]$ then the determinant will be
$$(-1)^{n+1}(n+1)\begin{vmatrix}
1& -1 & -1& \cdots & -1\\ 
1& 1& -1 & \cdots & -1\\
\vdots & \vdots & \vdots & \ddots & \vdots \\
1& 1& 1& \cdots & 1 \end{vmatrix}_{(n-1)\times(n-1)}$$
From which you can always add the bottom row to the top to get $[2,0,...,0]$, so you end up getting
$(-1)^{n+1}(n+1)2^{n-2}$?
It looks like for the $n \times n$ matrix $A$ given, the inverse has the general form
$$B=
\begin{pmatrix}
\frac{-n}{2(n+1)}& \frac{1}{2} & 0 & 0 &\cdots & 0 & \frac{1}{2(n+1)} \\
\frac{1}{2} & -1 & \frac{1}{2} & 0 & \cdots & 0& 0 \\ 
0 & \frac{1}{2} & -1 & \frac{1}{2} & \cdots & 0&0 \\
0 & 0 & \frac{1}{2} & -1 & \cdots & 0&0\\
\vdots & \vdots & \vdots & \vdots & \ddots & \vdots &\vdots\\
0 & 0 & 0 & 0 & \cdots &-1&\frac{1}{2}\\
\frac{1}{2(n+1)} & 0 & 0 & 0& \cdots &\frac{1}{2}& \frac{-n}{2(n+1)} \end{pmatrix}
$$
I don't really have proof of how I got this except plugging in the matrix to an inverse matrix calculator for various values of $n$ and noticing a pattern. But one can certainly check that it is indeed the inverse, multiplying on the left and getting $B\cdot A=I$ ensures it is the inverse.
To check this, when multiplying this matrix on the left, it’s not hard to check for the rows of the form $[0,...,\frac{1}{2},-1,\frac{1}{2},...,0]$ because either we have three consecutive integers $n,n+1,n+2$ or $n,n-1,n-2$ $$\frac{n}{2}-(n+1)+\frac{n+2}{2}=0$$ $$\frac{n}{2}-(n-1)+\frac{n-2}{2}=0$$ or $$2\cdot\frac{1}{2}+(-1)\cdot 1+ 2\cdot \frac{1}{2}=1$$ which always is a diagonal entry. Then considering the top row:
$$\frac{-n}{2(n+1)} + 2\cdot \frac{1}{2} + \frac{n}{2(n+1)}=1$$
$$(i+1)\cdot\frac{-n}{2(n+1)}+ i\cdot \frac{1}{2} + (n-i)\cdot  \frac{1}{2(n+1)}=0$$ for $i=1,2,...,n-1$.
The bottom row acts similarly. Thus we indeed get $I$. This probably yields to a nice method to find the inverse through $[A|I] \rightsquigarrow [I|B]$.
Hope this helps!
