Maths between dollars is inline: $\sum_{k=1}^n k = \frac{n(n+1)}{2}$.
Maths between slash-square-brackets is display: \[\sum_{k=1}^n k = \frac{n(n+1)}{2}\]
I needed to use double backward slashes around the display maths, because the Markdown parser seems to interpret a backslash as an escape character.