MathJax: LaTeX in Markdown

NOTE: Not sure of the best way to organize the relationship between MathJax and LaTeX. For now, I'm separating MathJax and LaTeX into separate notes. In the future it might be best to make MathJaX a sub-section of LaTeX.

Introduction

MathJax to Wikipedia:

MathJax is a cross-browser JavaScript library that displays mathematical notation in web browsers, using MathML, LaTeX and ASCIIMathML markup.

So essentially it takes a subset of the LaTeX syntax, namely the parts related to mathematical expressions, and renders it in the browser or on documents in the server, just like LaTeX does.

Blocks

MathJax or LaTeX blocks are enclosed using curly braces {}. They are essentially function parameters where each brace is a parameter.

The \frac function is an example of a function that takes two parameters, first is the numerator and the second is the denominator. This is a necessary syntax because sometimes it's hard to serially express mathemtical expressions in a single line, like with large fractions.

This can also apply to simple operators like the superscript operator ^. For example, raising a symbol by a negative power creates a problem of interpretation.

e^-i\pi + 1 = 0

The above expression makes it hard to interpret the actual expression which is Euler's identity. This is because the - is interpreted as a subtraction operator, so to fix this we need to enclose the exponential parts in braces {}.

e^{ -i\pi } + 1 = 0

Which results in this expression:

eiπ+1=0

Arithmetic Operators

Greek Letters

Miscellaneous

Cheat Sheet

There's a fantastic cheat sheet post about MathJax syntax.

TODO: Add a summary of the cheat sheet here.

References

Web Links

Note Links