Functions and operators

f:Rn→Rmf: \mathbb{R}^n \to \mathbb{R}^m Arrow (maps to)

Maps to (f: X → Y), tends to (x → 0), or implies (⇒).

In ML papers

f:Rn→Rmf: \mathbb{R}^n \to \mathbb{R}^m says ff takes nn-dimensional inputs to mm-dimensional outputs: a type signature for a layer. x↦2xx \mapsto 2x names a function by what it does to one input. Under a limit, h→0h \to 0 means "hh approaches 0". A double arrow, ⇒\Rightarrow, means "implies".

How to type it

LaTeXShows
\to→\to
\rightarrow→\rightarrow
\mapsto for x ↦ f(x)↦\mapsto

A worked example

f:R3→R2,x↦Wx,W∈R2×3f: \mathbb{R}^3 \to \mathbb{R}^2, \quad \mathbf{x} \mapsto W\mathbf{x}, \quad W \in \mathbb{R}^{2 \times 3}

A linear layer from 3 features to 2.

Related

W∈Rd×kW \in \mathbb{R}^{d \times k}Real numbers (ℝ) and shapeslim⁡h→0\lim_{h \to 0}Limitθ←θ−η∇θL\theta \leftarrow \theta - \eta \nabla_\theta \mathcal{L}Assignment arrowf∘gf \circ gComposition (circle)

Decode this example →