GitHub Markdown Math Expression Support

GitHub has added support for writing and formatting mathematical expressions in markdown. A mathematical expression is a required feature if the project is related to data science, mathematician, and projects which depend on mathematical formulas.

GitHub now supports math expression rendering in markdown natively. So it will work everywhere on GitHub, like .md files, in GitHub issues, PR descriptions, Comments, etc.

MathJax is the library that is being used by GitHub for the rendering of math formulas. MathJax is a very popular library for showing math formulas. Starting in 2009, this MathJax is managed and maintained by the American Mathematical Society (AMS).


You can check the full documentation for adding formula to markdown, provided by GitHub here:

Basic Rules

  • Inline expression starts and ends with a ‘$‘ sign.
  • Block expression starts and ends with a ‘$$‘ sign.
  • Other expressions provided by MathJax will be used whenever required. (Like \sqrt or \sum etc.)


Input (for inline): $a^2 + b^3+ c = 0$


Input (for inline): $\sqrt{a – b}+(c – d)^2$


Input (for block): $$ x = {-a \pm \sqrt{b^2-c} \over 2a} $$


Input (for block): $$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$


Input: $\sqrt{\$4}$


For the full list of symbols/expressions check:

Check the documentation provided by GitHub, here:

Check the documentation provided by MathJax, check:

Leave a Comment

The reCAPTCHA verification period has expired. Please reload the page.