Underleaf Logo
Underleaf
Blog
Log InTry Free

Learn LaTeX

Getting Started

  • What is LaTeX?
  • LaTeX for Beginners

LaTeX Math Mode Basics

LaTeX's math mode is a powerful feature for typesetting mathematical expressions. This guide covers the fundamentals of using math mode, including both inline and display mathematics.

Types of Math Mode

LaTeX provides two main types of math mode:

  1. Inline Math Mode

    For mathematical expressions that are part of a text paragraph. Delimited by either $...$ or \(...\):

  2. Display Math Mode

    For standalone equations. Delimited by $$...$$, \[...\], or the equation environment:

Basic Mathematical Notation

TypeLaTeX CodeResult
Fractions\frac{a}{b}
Exponentsx^2
Subscriptsx_i
Square Root\sqrt{x}

Equation Environments

LaTeX provides several environments for displaying equations:

  1. equation Environment

    For numbered equations:

  2. equation* Environment

    For unnumbered equations:

  3. align Environment

    For multiple aligned equations:

Common Math Operators

LaTeX provides predefined commands for common mathematical operators:

OperatorLaTeX CodeResult
Sum\sum_{i=1}^n
Product\prod_{i=1}^n
Integral\int_{a}^b
Limit\lim_{x \to \infty}

Best Practices

  • Use \(...\) instead of $...$ for better error detection
  • Use display math mode for complex equations that might be hard to read inline
  • Use the amsmath package for advanced mathematical typesetting
  • Always use proper spacing commands (\,, \;, \quad) for better readability
  • Use the align environment for equations that need alignment

Common Mistakes to Avoid

  • Don't use math mode for units - use the siunitx package instead
  • Avoid using eqnarray environment (it's obsolete) - use align instead
  • Don't forget to load required packages (amsmath, amssymb) in the preamble
  • Avoid mixing text and math mode unnecessarily

Try it free

Skip the syntax — let AI write it.

Snap a photo of an equation, a table, or full handwritten notes and Underleaf turns it into clean, compilable LaTeX in seconds. 10 free credits every month, no credit card required.

Convert your page
Handwritten notes converted into a typeset LaTeX document

LaTeX Math Mode Basics

LaTeX's math mode is a powerful feature for typesetting mathematical expressions. This guide covers the fundamentals of using math mode, including both inline and display mathematics.

Types of Math Mode

LaTeX provides two main types of math mode:

  1. Inline Math Mode

    For mathematical expressions that are part of a text paragraph. Delimited by either $...$ or \(...\):

  2. Display Math Mode

    For standalone equations. Delimited by $$...$$, \[...\], or the equation environment:

Basic Mathematical Notation

TypeLaTeX CodeResult
Fractions\frac{a}{b}
Exponentsx^2
Subscriptsx_i
Square Root\sqrt{x}

Equation Environments

LaTeX provides several environments for displaying equations:

  1. equation Environment

    For numbered equations:

  2. equation* Environment

    For unnumbered equations:

  3. align Environment

    For multiple aligned equations:

Common Math Operators

LaTeX provides predefined commands for common mathematical operators:

OperatorLaTeX CodeResult
Sum\sum_{i=1}^n
Product\prod_{i=1}^n
Integral\int_{a}^b
Limit\lim_{x \to \infty}

Best Practices

  • Use \(...\) instead of $...$ for better error detection
  • Use display math mode for complex equations that might be hard to read inline
  • Use the amsmath package for advanced mathematical typesetting
  • Always use proper spacing commands (\,, \;, \quad) for better readability
  • Use the align environment for equations that need alignment

Common Mistakes to Avoid

  • Don't use math mode for units - use the siunitx package instead
  • Avoid using eqnarray environment (it's obsolete) - use align instead
  • Don't forget to load required packages (amsmath, amssymb) in the preamble
  • Avoid mixing text and math mode unnecessarily
Underleaf Logo
Underleaf

Practical tools for academic writing, document conversion, and research workflows.

Go to appContact us

Company

PricingBlogTutorialsConference TemplatesConference Deadlines

Free Tools

Image to LaTeXExcel to LaTeXArXiv to LaTeXTikZ GeneratorLaTeX Table GeneratorCitation GeneratorThesis GeneratorChrome ExtensionAll Tools

Ask AI about Underleaf

Ask ChatGPTAsk ClaudeAsk Perplexity

© 2026 Underleaf. All rights reserved.