I have encountered two forms for calculating the two-sample Mann-Whitney U test statistic, which are:
$$U_1 = R_1 - \frac{n_1(n_1 + 1)}{2}$$
and
$$U_1 = n_1n_2 + \frac{n_1(n_1+1)}{2} - R_1$$
where $n_1$ is the sample size of group 1, $n_2$ is the sample size of group 2, and $R_1$ is the sum of ranks for group 1.
Why are there two forms for the U test statistic? Is this the case where the first equation is actually the Wilcoxon $W$ statistic, which I understand to be functionally equivalent to $U$ (although not numerically equivalent)? I am a biochemist by training, so I apologize for any incorrect statements or assumptions in my question.