Mathematics in LaTeX

One of the main reasons LaTeX is so popular is its ability to typeset high-quality mathematical expressions. From simple equations to complex theorems, LaTeX provides powerful tools for presenting math professionally.

Inline vs Display Math

You can insert math in two ways: inline (within text) or display mode (separate on its own line). Inline math is enclosed in $...$, while display math is written using \[...\] for better visibility.

Common Symbols

LaTeX includes built-in commands for Greek letters, fractions, and square roots. These are essential for writing formulas clearly.

Exponents and Subscripts

Superscripts (exponents) are written using the caret ^, and subscripts use the underscore _. Curly braces { } group multiple characters together.

Equations

LaTeX can format single equations with numbering using the equation environment. For multiple equations, the align and multline environments from amsmath are very useful.

Matrices and Cases

Matrices can be created with different brackets (bmatrix for square, pmatrix for round). The cases environment is useful for piecewise functions.

Theorems and Proofs

Using the amsthm package, you can define theorem-like environments such as Theorem, Lemma, or Proof. This is very useful in academic writing.