<s>[INST] 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.
 [/INST] 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....
</s>