The value of the determinant 
Calculate the value of determinant:
  $$D = \begin{vmatrix}
    0 & 1 & 2 & ... & 2020 \\ 
    1 & 0 & 1 & ... & 2019 \\ 
    2 & 1 & 0 & ... & 2018 \\ 
    ... & ... & ... & ... & ... \\
    ... & ... & ... & ... & ... \\
    2019 & 2018 & 2017 & ... & 1 \\
    2020 & 2019 & 2018 & ... & 0 \\
  \end{vmatrix}$$

I tried to change $L_k$ with $L_{n-k}$ and i got a circular determinant but i don't know to solve it.
 A: Let's do this for a $5 \times 5$ matrix and hopefully it would make sense how to generalize this. The key idea is that when you apply operations of Gaussian Elimination to the matrix, 


*

*flipping rows multiplies the result by

*rescaling a row by $k$ rescales the determinant by $k$ as well

*adding multiples of rows to other rows does not change the determinant.


So,
$$
\begin{split}
D &= \begin{vmatrix}
0 & 1 & 2 & 3 \\ 
1 & 0 & 1 & 2 \\ 
2 & 1 & 0 & 1 \\ 
3 & 2 & 1 & 0 \\
\end{vmatrix}
= \begin{vmatrix}
-1 & 1 & 2 & 3 \\ 
 1 & 0 & 1 & 2 \\ 
 1 & 1 & 0 & 1 \\ 
 1 & 2 & 1 & 0 \\
\end{vmatrix}
= \begin{vmatrix}
-1 & -1 & 2 & 3 \\ 
 1 & -1 & 1 & 2 \\ 
 1 &  1 & 0 & 1 \\ 
 1 &  1 & 1 & 0
\end{vmatrix}
= \begin{vmatrix}
-1 & -1 & -1 & 3 \\ 
 1 & -1 & -1 & 2 \\ 
 1 &  1 & -1 & 1 \\ 
 1 &  1 &  1 & 0
\end{vmatrix} \\
& = \begin{vmatrix}
-1 & -1 & -1 & 3 \\ 
 0 & -2 & -2 & 5 \\ 
 0 &  0 & -2 & 4 \\ 
 0 &  0 &  0 & 3
\end{vmatrix}
= (-1) \cdot (-2) \cdot (-2) \cdot 3 = 12.
\end{split}
$$
We subtract column 2 from column 1, and then column 3 from column 2, and then column 4 from column 3. The second row starts by subtracting the first row from every other row to get a diagonal matrix....
A: Sorry, I can't help you. I'm just giving an answer to tell you that I put the matrix on matlab and tried it for different dimensions $N$. Considering:
$$D = \begin{vmatrix}
    0 & 1 & 2 & ... & N\\ 
    1 & 0 & 1 & ... & N-1\\ 
    2 & 1 & 0 & ... & N-2\\ 
    ... & ... & ... & ... & ... \\
    ... & ... & ... & ... & ... \\
    N-1& N-2& N-3& ... & 1 \\
    N& N-1& N-2& ... & 0 \\
  \end{vmatrix}$$
The results are huge numbers.


*

*$N = 20 \qquad \det D = 1.0486e+07$

*$N = 200 \qquad \det D = 1.6069e+62$

*$N = 2020 \qquad \det D = Inf$
In any case the trace resulted in 0 obviously. Hope it will help you, somehow...
It follows the matlab script I used, so you can try and see yourself, that one is very easy.

N = 2020;

A = zeros(N,N);

for i = 0:N
    for j = 0:i
        A(i+1,j+1) = abs(j-i);
        A(j+1,i+1) = abs(j-i);
    end
end

N
Trace = trace(A)
Determinant = det(A)

