Skip to Main Content

LaTeX document preparation system

A Short Guide to Math and Equations

LaTeX provides powerful tools for creating mathematical content, from simple expressions to complex equations. There are different ways of working with math in LaTeX:

  • Inline Math: To include mathematical expressions within a line of text, use the dollar signs $...$
  • Display MathFor equations that need to be displayed on their own line, use double dollar signs $$...$$ or the \[...\] notation

  • Equation Environment: For numbered equations, use the equation environment.
  • Aligning Equations: For multiple equations or aligning equations, use the align environment from the amsmath package.
  • Fractions, Exponents, and Subscripts:
    • Fractions: \frac{numerator}{denominator}
    • Exponents: a^b 
    • Subscripts: a_b

When we compile, here is how this code looks like (notice that LaTeX automatically assigns numbers to our equations within equation environment):

 

Greek Letters and Symbols

LaTeX supports many Greek letters and mathematical symbols. For example:

  • Greek letters: \alpha, \beta, \gamma, \Delta, \Omega
  • Other symbols: \sum, \int, \prod, \sqrt, \leq, \geq

Which creates the following output:

 

Additional Tips

  • Spacing: Use \, for a small space, \: for a medium space, and \; for a large space in your equations.
  • Text in Math Mode: To include text within an equation, use the \text{} command from the amsmath package.
  • Common Functions: LaTeX automatically formats common functions such as \sin, \cos, \log, etc.

Example:

This code produces the following: