$$\rho = 1 - \frac{6 \sum d_i^2}{n(n^2 - 1)}$$
$\rho$ = Spearman's rank correlation coefficient
$d_i$ = difference between the two ranks of each observation
$n$ = number of observations
Given the Spearman's rank correlation above, it's clear to see the maximum is 1 as the smallest $d_i$ will be zero. I am trying to figure out why it is -1 by having two ranks in exactly reversed order.
I attach my calculation below, where the red rectangle represents the specific case of four rows, and I ordered two ranks in exactly reverse order.
The purple rectangle is the actual calculation, and it indeed results in -1.
I try to generalize in the green rectangle, but how does that formula result in 2?