Github is a popular platform for developers and technical writers to store and share their work.
It provides a simple and easy-to-use markup language called Github Flavored Markdown (GFM) that allows you to format and present your content in a professional and readable manner.
However, one limitation of GFM is that it does not support the display of mathematical equations.
In this tutorial, we will discuss how to show math equations in Github Markdown.
MathJax
MathJax is a JavaScript library that allows you to display mathematical equations in web pages.
It supports a wide range of mathematical notation and can be used with Github Flavored Markdown.
To use MathJax in your Github Markdown documents, you need to include the following code in the head of your HTML file:
<script type="text/javascript" async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script>
Once you have included this code, you can use LaTeX syntax to write mathematical equations in your Github Markdown file.
For example, the following code will display the equation for the Pythagorean theorem:
$$ c^2 = a^2 + b^2 $$
You can also use MathJax to display inline equations, which are equations that are integrated into the text.
To do this, you need to enclose the equation in dollar signs, like this:
This is an example of an inline equation: $e^{i\pi} + 1 = 0$
Using Images
Another way to show math equations in Github Markdown is to use images.
You can create an image of the equation using a tool such as LaTeX or MathType and then include it in your Github Markdown file.
To include an image in your Github Markdown file, you need to use the following syntax:

For example, if you have an image of the equation for the Pythagorean theorem saved as a PNG file, you can include it in your Github Markdown file like this:

This method has the advantage of being supported by all browsers and devices and does not require JavaScript.
However, it can be time-consuming to create images of all the equations you need to display and can result in larger file sizes.
Conclusion
In conclusion, there are two ways to show math equations in Github Markdown: using MathJax and using images.
MathJax is a JavaScript library that allows you to display mathematical equations in web pages and can be used with Github Flavored Markdown.
The other option is to use images, which is supported by all browsers and devices but can be time-consuming to create and result in larger file sizes.
Whichever method you choose, you can now easily include mathematical equations in your Github Markdown files.