Skip to content

LaTeX Math

LaTeX Math

LaTeX math can be included in Jupyter notebook markdown cells. LaTeX math can also be included in parts of Matplotlib plots like axis labels and text fields.

Inline LaTeX math commands need to be enclosed by the dollar signs.

The angle is $2\pi$ radians

The markup above is rendered as:

The angle is 2\pi radians

A table of useful LaTeX commands and the associated output is below. Note curly braces { } are used to surround LaTeX math elements and a backslash \ is used before LaTeX commands.

LaTeX Command Output
2^{3} 2^{3}
H_{2} H_{2}
\frac{3}{4} \frac{3}{4}
\pi \pi
\Delta \Delta
\epsilon \epsilon
\sigma \sigma
2 \times 3 2 \times 3
\int_{a}^{b} x^2 dx \int_{a}^{b} x^2 dx
\sum \sum
\vec{F} \vec{F}
\hat{k} \hat{k}
\bar{x} \bar{x}
15 \% 15 \%