LaTeX Math Formulas: A Cheat Sheet

Forketyfork
7 min readNov 25, 2021
Image by Darkmoon_Art from Pixabay

This article should serve as a very simple cheat sheet for everyone who needs to write LaTeX mathematical formulas in Jupyter Notebooks. It’s by no means complete, as the full description of LaTeX notation takes up hundreds of pages. But I’ve tried to gather the stuff I typically use. Hopefully, it will be useful for you too.

This guide should also be applicable for general LaTeX usage, not only in Jupyter Notebooks.

Writing LaTeX formulas in Jupyter Notebooks

First off, you need to switch the cell type to Markdown, then you’ll be able to write both Markdown text and embedded math formulas in the LaTeX format:

Inline formulas are delimited by $:

This is an inline formula: $\alpha=5$

Multiline formulas are delimited by $$:

This is a multiline formula: 
$$
\alpha=\begin{cases}
1, & \beta \ge 0 \\
2, & \beta < 0
\end{cases}
$$

Letters

You can display greek letters just by spelling them out after a backslash:

Greek letters: $\alpha,\beta,\gamma...$

--

--

Forketyfork
Forketyfork

Written by Forketyfork

Software developer @ JetBrains CodeCanvas. I write technical how-to articles and occasional rants on software development in general. Opinions are my own.

Responses (2)