Site Tools


latex-syntax

Table of Contents

LaTeX syntax

For addition, you use the + symbol e.g. a + b = c:

For subtraction, you use the - symbol e.g. a - b = c

For multiplication, you just write ab or put a dot in between with \cdot (meaning: “centered dot”) like a \cdot b.
Using a * b doesn't look natural in most cases (but it might make sense sometimes!)

For fractions, you use \frac{a}{b} or {a \over b}.
You can use a / b if you don't want to make a fraction .

For modulo, you can use a \% b if it's. The percent symbol is comment % ... comment ....
Usually in mathematics, you write modulo as “congruence modulo N” which you do like a = b \pmod{N}

For exponentiation, you use e^{ ... } e.g. e^{i\phi} = \cos(\phi) + i\sin(\phi).
When it's a single variable in the exponent, omitting braces is fine e.g. e^\phi or e^{\phi} are both fine.

For logarithm, you use \ln.

For integrals, you use \int, \iint, \iiint, \oint, \oiint, \oiiint.

latex-syntax.md · Last modified: