This is LaTeX code:
[latex]
\frac{r\left(r-1\right)}{2}
[/latex]