You can mark up inline math with $...$ or display with
\\[...\\] Some tex constructs, notably {{ or {%, get picked up
by the templating language and so for simple cases it is enough just
to use the above but in general you need to also surround with
{% raw %}…{% endraw %}
to protect the TeX markup from the Jekyll templating.
inline $\frac{a}{b}$ and $\frac$ inline BAD
inline $\frac{a}{b}$ and $\frac{{a}}{{b}}$ inline
display BAD \[\frac{a}{b} + \frac\] display
display
\[\frac{a}{b} + \frac{{a}}{{b}}\]
display
display
$$\frac{a}{b} + \frac{{a}}{{b}}$$
display
inline inline
display display