Skip to content
EasyLaTeXDocs

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 goalRead directly
Insert inline or standalone formulas in the body text and enter basic symbolsMathematical Environments and Symbols
Enter superscripts and subscripts, fractions, square roots, parentheses, matrices, or piecewise functionsSuperscripts and Subscripts, Fractions, Parentheses, and Matrices
Align, break, or group multiline formulasMultiline Formulas and Alignment
Number formulas and cite them in the body textFormula Numbering and Referencing
Format theorems, proofs, sets, and commonly used operatorsTheorems, Proofs, and Specialized Formulas

Minimal Setup

The following preamble is sufficient for most basic mathematics pages:

latex
\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 amsmath when 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.

Getting Started with Mathematics | EasyLaTeX | EasyLaTeX