octree
ToolsTemplatesSymbols
Get Started
octree

Free LaTeX tools and templates for everyone.

Menu

  • Learn
  • About
  • Templates
  • Tools
  • Symbols

Learn

  • Learn LaTeX
  • Learn TikZ
  • Learn PGFPlots
  • View all tutorials →

Tools

  • Image to LaTeX
  • Excel to LaTeX
  • TikZ Generator
  • Image to TikZ
  • LaTeX Preview
  • Markdown to LaTeX
  • Citation Generator
  • AI LaTeX Generator
  • View all tools →

Templates

  • Research Paper
  • PhD Thesis
  • Beamer Presentation
  • Academic CV
  • Cover Letter
  • Lab Report
  • NeurIPS 2026
  • ICML 2026
  • View all 71 templates →

Symbols

  • Greek Letters
  • Math Operators
  • Arrows
  • Relations
  • Set Theory
  • Calculus
  • Logic
  • Linear Algebra
  • Browse all 37 categories →

Open Source

  • Octree Editor
  • Tools & Templates
  • Marketing & Blogs
  • View all repositories →

Socials

  • Instagram
  • LinkedIn
  • TikTok
  • X
  • Reddit
  • Discord

© 2026 Octree. All rights reserved.

Back to Symbols

Functions & Mapping

Function notation, maps, composition, and domain/codomain.

Function symbols in LaTeX

A function is declared with the arrow \to (an alias of \rightarrow) between its domain and codomain, f: A \to B, and its rule with \mapsto, as in x \mapsto x^2. Composition is f \circ g, the inverse is f^{-1}, and restriction to a subset is f|_A. Injections and surjections get their own arrows, \hookrightarrow and \twoheadrightarrow (the latter from amssymb), and a bijection is often \leftrightarrow or \xrightarrow{\sim}.

Standard functions such as \sin, \cos, \log, \ln, \exp, \lim, \max, \min and \ker are built in and typeset upright with correct spacing. Anything else (image, domain, support, sign) should be wrapped in amsmath’s \operatorname{Im} or declared once with \DeclareMathOperator{\dom}{dom}; plain Im(f) would be set as the product of two italic variables. Piecewise definitions use the amsmath cases environment: f(x) = \begin{cases} a & x > 0 \\ b & x \leq 0 \end{cases}.

Load \usepackage{amsmath} for \operatorname, \DeclareMathOperator, cases and \xrightarrow, and amssymb for \twoheadrightarrow. Our guide to math functions in LaTeX covers operators, limits and function spacing in more depth.

Loading...