Markdown Math / LaTeX
How to write math equations in markdown using LaTeX syntax with dollar sign delimiters. GitHub, Obsidian, and Jupyter support.
What is markdown math / latex?
Math expressions in markdown use LaTeX syntax wrapped in dollar sign delimiters. Inline math uses single dollar signs ($x^2$) and display math uses double dollar signs ($$). GitHub added native math rendering in 2022 using MathJax. Obsidian and Jupyter notebooks also support LaTeX math.
Syntax
Inline math
Single $ wraps inline math expressions within a sentence.
Display math (block)
Double $$ creates a centered equation block on its own line.
Common LaTeX
Common LaTeX symbols: Greek letters, summation, roots.
Platform support
| Platform | Supported | Notes |
|---|---|---|
| GitHub | Yes | Native MathJax rendering since 2022 |
| Obsidian | Yes | MathJax rendering built-in |
| Jupyter | Yes | First-class LaTeX support |
| GitLab | Yes | — |
| Discord | No | — |
| Notion | Partial | Inline math block available via /math command |
Common mistakes
Spaces inside $ delimiters: $ x^2 $
$x^2$
Spaces immediately inside the dollar signs may prevent the math from rendering on some parsers.
Tips for math / latex
If you write $100, some parsers try to interpret it as math. Write \$100 or use a code span `$100` to display dollar signs literally.
KaTeX (used by many renderers) supports a large subset of LaTeX. Their documentation at katex.org/docs/supported has a complete list of supported functions.
Frequently asked questions
Everything you need to know.
How do I write math equations in GitHub markdown?
Wrap LaTeX in single $ for inline: $E=mc^2$, or in $$ for a block equation. GitHub renders these with MathJax as of 2022.
Related elements
Code Block
Markdown supports two types of code formatting: inline code with single backticks (`) for short snippets, and fenced code blocks with triple backticks (```) for multi-line code with optional syntax highlighting.
Superscript
Superscript text appears above the normal line of text at a smaller size, commonly used for exponents (x²), ordinals (1st), and footnote numbers. Markdown has no standard superscript syntax — platforms use either caret (^) notation or raw HTML.
Subscript
Subscript text appears below the normal baseline at a smaller size, used for chemical formulas (H₂O), mathematical notation, and technical content. Like superscript, subscript has no standard markdown syntax and requires either extended markdown or raw HTML.
Try it in the editor
Paste your markdown and see math / latex rendered instantly with professional themes.