Getting Started with Mathematics
This set of pages covers the most common mathematical input, structures, numbering, and theorem environments in English LaTeX documents. Each page provides a complete minimal example; when you have a specific need, you can go directly to the corresponding topic without reading them in order.
Default EasyLaTeX compiler: pdfLaTeX + article. Except for “Mathematical Environments and Symbols,” other pages usually require amsmath.
Where to Start
| Your goal | Read directly |
|---|---|
| Insert inline or standalone formulas in the body text and enter basic symbols | Mathematical Environments and Symbols |
| Enter superscripts and subscripts, fractions, square roots, parentheses, matrices, or piecewise functions | Superscripts and Subscripts, Fractions, Parentheses, and Matrices |
| Align, break, or group multiline formulas | Multiline Formulas and Alignment |
| Number formulas and cite them in the body text | Formula Numbering and Referencing |
| Format theorems, proofs, sets, and commonly used operators | Theorems, Proofs, and Specialized Formulas |
Minimal Setup
The following preamble is sufficient for most basic mathematics pages:
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\begin{document}
Inline math: \(E = mc^2\), and display math:
\[
E = mc^2.
\]
\end{document}
Common Principles
-
Use
\(...\)for inline formulas and\[...\]for standalone formulas; -
Load
amsmathwhen numbering, alignment, matrices, or piecewise functions are needed; -
Enter mathematical variables in math mode; do not use ordinary text to imitate superscripts, subscripts, or fraction bars;
-
When a formula is very long, prioritize adjusting its structure or adding line breaks instead of reducing the font size of the entire page;
-
When an error occurs, first check the recently added braces, environment names,
&alignment points, and\\line-break commands.