To see how any formulas was written in any question or answer, including this one, right-click on the expression it and choose "Show Math As > TeX Commands". For inline formulas, enclose the formula in $...$. For displayed formulas, use $$...$$. These render differently: $\sum_{i=0}^n i^2 = \...