## Basic Math Mode Commands

This page lists the main commands for producing basic symbols and operators in math mode.

NOTE: The default view of this page (with the .html file extension) is actually the Legacy Web Pages output! If you want to see MathML versions of this page, look at the Web Output Samples page for details.

### Entering and Leaving math Mode

SnuggleTeX supports the usual LaTeX commands for entering and leaving math mode:

• $...$
• $$...$$
• \begin{math}...\end{math}

all produce inline mathematics, whereas:

• $$...$$
• $...$
• \begin{displaymath}...\end{displaymath}

all produce "display" mathematics. The eqnarray and eqnarray* environments also enter math mode.

SnuggleTeX also supports the \ensuremath{...} command.

### Basic Mathematics

 Input Result Notes $-5.32$ -5.32 Simple number. (Currently SnuggleTeX only understands UK number formats but this will improve soon…) $x$ x An identifier $x+1 \over 3y$ Old style fractions $\frac{x+1}{3y}$ New style fractions $x^2$ x2 Simple superscript example $x^{2^{y-z}}$ x2y-z Complex superscript example $(x_1, x_2)$ (x1,x2) Subscript example. $x_1^2$ Mix of subscripts and superscripts $\sqrt{x}$ Square roots $\sqrt[n]{x}$ roots

### Greek Letters

As is normal here, note that commands are only required for upper case letters if there is no standard roman alphabet equivalent.

 Input Result Input Result $\alpha$ α $\beta$ β $\gamma$ γ $\Gamma$ Γ $\delta$ δ $\Delta$ Δ $\epsilon$ ϵ $\varepsilon$ ε $\zeta$ ζ $\eta$ η $\theta$ θ $\Theta$ Θ $\vartheta$ ϑ $\iota$ ι $\kappa$ κ $\lambda$ λ $\Lambda$ Λ $\mu$ μ $\nu$ ν $\xi$ ξ $\Xi$ Ξ $\pi$ π $\Pi$ Π $\varpi$ ϖ $\rho$ ρ $\varrho$ ϱ $\sigma$ σ $\Sigma$ Σ $\varsigma$ ς $\tau$ τ $\upsilon$ υ $\Upsilon$ Υ $\phi$ φ $\Phi$ Φ $\varphi$ ϕ $\chi$ χ $\psi$ ψ $\Psi$ Ψ $\omega$ ω $\Omega$ Ω

### Mathematical Functions

 Input Result $\arccos x$ arccosx $\arcsin x$ arcsinx $\arctan x$ arctanx $\arg x$ argx $\cos x$ cosx $\cosh x$ coshx $\cot x$ cotx $\coth x$ cothx $\csc x$ cscx $\deg x$ degx $\det x$ detx $\dim x$ dimx $\exp x$ expx $\gcd x$ gcdx $\hom x$ homx $\inf x$ infx $\ker x$ kerx $\lg x$ lgx $\lim x$ limx $\liminf x$ lim infx $\limsup x$ lim supx $\ln x$ lnx $\log x$ logx $\max x$ maxx $\min x$ minx $\Pr x$ Prx $\sec x$ secx $\sin x$ sinx $\sinh x$ sinhx $\sup x$ supx $\tan x$ tanx $\tanh x$ tanhx

### Ellipses

 Input Result $\cdots$ ⋯ $\vdots$ ⋮ $\ddots$ ⋱

### Spacing

Note that MathML-enabled browsers don’t support spacing particularly well. You can also use the \hspace command to enter specific amounts of spacing.

 Input Result $a\!b$ a b $a\,b$ a b $a\:b$ a b $a\;b$ a b $a\quad b$ a b $a\qquad b$ a b $a\hspace{3.0em}b$ a b

### Variable-sized symbols

Note that some of the more exotic operators may require extra fonts installed.

 Input Result Input (Displaymath) Result $\sum_a^b A_{\lambda}$ $$\sum_a^b A_{\lambda}$$ $\prod_a^b A_{\lambda}$ $$\prod_a^b A_{\lambda}$$ $\coprod_a^b A_{\lambda}$ $$\coprod_a^b A_{\lambda}$$ $\int_a^b A_{\lambda}$ $$\int_a^b A_{\lambda}$$ $\oint_a^b A_{\lambda}$ $$\oint_a^b A_{\lambda}$$ $\bigcap_a^b A_{\lambda}$ $$\bigcap_a^b A_{\lambda}$$ $\bigcup_a^b A_{\lambda}$ $$\bigcup_a^b A_{\lambda}$$ $\bigsqcup_a^b A_{\lambda}$ $$\bigsqcup_a^b A_{\lambda}$$ $\bigvee_a^b A_{\lambda}$ $$\bigvee_a^b A_{\lambda}$$ $\bigwedge_a^b A_{\lambda}$ $$\bigwedge_a^b A_{\lambda}$$ $\bigodot_a^b A_{\lambda}$ $$\bigodot_a^b A_{\lambda}$$ $\bigotimes_a^b A_{\lambda}$ $$\bigotimes_a^b A_{\lambda}$$ $\bigoplus_a^b A_{\lambda}$ $$\bigoplus_a^b A_{\lambda}$$ $\biguplus_a^b A_{\lambda}$ $$\biguplus_a^b A_{\lambda}$$

### Binary Operators

As with LaTeX, we support the \not command to negate certain operators. Only the ones listed in the table below are supported.

 Input Result Input (negated) Result $\pm$ ± $\mp$ ∓ $\times$ × $\div$ ÷ $\ast$ ∗ $\star$ ⋆ $\circ$ ∘ $\bullet$ • $\cdot$ ⋅ $\cap$ ∩ $\cup$ ∪ $\uplus$ ⊎ $\sqcap$ ⊓ $\sqcup$ ⊔ $\vee$ ∨ $\lor$ ∨ $\wedge$ ∧ $\land$ ∧ $\setminus$ ∖ $\wr$ ≀ $\diamond$ ⋄ $\bigtriangleup$ △ $\bigtriangledown$ ▽ $\triangleleft$ ⊲ $\triangleright$ ⊳ $\oplus$ ⊕ $\ominus$ ⊖ $\otimes$ ⊗ $\oslash$ ⊘ $\odot$ ⊙ $\bigcirc$ ○ $\dagger$ † $\ddagger$ ‡ $\amalg$ ⨿ $\leq$ ≤ $\not \leq$ ≰ $\le$ ≤ $\not \le$ ≰ $\prec$ ≺ $\not \prec$ ⊀ $\preceq$ ≼ $\ll$ ≪ $\subset$ ⊂ $\not \subset$ ⊄ $\subseteq$ ⊆ $\not \subseteq$ ⊈ $\sqsubset$ ⊏ $\sqsubseteq$ ⊑ $\not \sqsubseteq$ ⋢ $\in$ ∈ $\not \in$ ∉ $\vdash$ ⊢ $\not \vdash$ ⊬ $\geq$ ≥ $\not \geq$ ≱ $\ge$ ≥ $\not \ge$ ≱ $\succ$ ≻ $\not \succ$ ⊁ $\succeq$ ≽ $\gg$ ≫ $\supset$ ⊃ $\not \supset$ ⊅ $\supseteq$ ⊇ $\not \supseteq$ ⊉ $\sqsupset$ ⊐ $\sqsupseteq$ ⊒ $\not \sqsupseteq$ ⋣ $\ni$ ∋ $\not \ni$ ∌ $\dashv$ ⊣ $\equiv$ ≡ $\not \equiv$ ≢ $\sim$ ∼ $\not \sim$ ≁ $\simeq$ ≃ $\not \simeq$ ≄ $\asymp$ ≍ $\approx$ ≈ $\not \approx$ ≉ $\cong$ ≅ $\not \cong$ ≆ $\neq$ ≠ $\doteq$ ≐ $\notin$ ∉ $\models$ ⊨ $\perp$ ⊥ $\mid$ ∣ $\not \mid$ ∤ $\parallel$ ∥ $\bowtie$ ⋈ $\smile$ ⌣ $\frown$ ⌢ $\propto$ ∝

SnuggleTeX also supports \stackrel to make stacked operators:

 Input Result $1 \stackrel{2}{+} y$

### Arrows

 Input Result $\leftarrow$ ← $\Leftarrow$ ⇐ $\rightarrow$ → $\Rightarrow$ ⇒ $\leftrightarrow$ ↔ $\Leftrightarrow$ ⇔ $\mapsto$ ↦ $\hookleftarrow$ ↩ $\leftharpoonup$ ↼ $\leftharpoondown$ ↽ $\rightleftharpoons$ ⇌ $\longleftarrow$ ← $\Longleftarrow$ ⇐ $\longrightarrow$ → $\Longrightarrow$ ⇒ $\longleftrightarrow$ ↔ $\Longleftrightarrow$ ⇔ $\longmapsto$ ↦ $\hookrightarrow$ ↪ $\rightharpoonup$ ⇀ $\rightharpoondown$ ⇁ $\uparrow$ ↑ $\Uparrow$ ⇑ $\downarrow$ ↓ $\Downarrow$ ⇓ $\updownarrow$ ↕ $\Updownarrow$ ⇕ $\nearrow$ ↗ $\searrow$ ↘ $\swarrow$ ↙ $\nwarrow$ ↖

### Miscellaneous Maths Symbols

 Input Result $\aleph$ ℵ $\imath$ ı $\jmath$ j $\ell$ ℓ $\wp$ ℘ $\Re$ ℜ $\Im$ ℑ $\mho$ ℧ $\prime$ ′ $\emptyset$ ∅ $\nabla$ ∇ $\surd$ √ $\top$ ⊤ $\bot$ ⊥ $\angle$ ∠ $\forall$ ∀ $\exists$ ∃ $\neg$ ¬ $\lnot$ ¬ $\flat$ ♭ $\natural$ ♮ $\sharp$ ♯ $\backslash$ \ $\partial$ ∂ $\infty$ ∞ $\triangle$ ▵ $\clubsuit$ ♣ $\diamondsuit$ ♢ $\heartsuit$ ♡ $\spadesuit$ ♠ $\hbar$ ℏ $\aa$ å $\AA$ Å $\|$ ∥

### Mathematical Accents

Some of these do not work particularly well in some cases, so it is wise to check the results on all of the browsers that you need to support!

 Input (narrow) Result Input (wide) Result $\hat{x}$ $\hat{x-y}$ $\bar{x}$ $\bar{x-y}$ $\vec{x}$ $\vec{x-y}$ $\dot{x}$ $\dot{x-y}$ $\ddot{x}$ $\ddot{x-y}$ $\tilde{x}$ $\tilde{x-y}$ $\widehat{x}$ $\widehat{x-y}$ $\widetilde{x}$ $\widetilde{x-y}$ $\overline{x}$ $\overline{x-y}$ $\overbrace{x}$ $\overbrace{x-y}$ $\underbrace{x}$ $\underbrace{x-y}$ $\overrightarrow{x}$ $\overrightarrow{x-y}$ $\overleftarrow{x}$ $\overleftarrow{x-y}$ $\underline{x}$ $\underline{x-y}$

### Stretchy Parentheses

 Input (narrow) Result Input (wide) Result $\left( x \right)$ (x) $\left( \frac{1}{1+\frac{1}{1+x}} \right)$ $\left[ x \right]$ [x] $\left[ \frac{1}{1+\frac{1}{1+x}} \right]$ $\left\{ x \right\}$ {x} $\left\{ \frac{1}{1+\frac{1}{1+x}} \right\}$ $\left\vert x \right\vert$ |x| $\left\vert \frac{1}{1+\frac{1}{1+x}} \right\vert$ $\left\Vert x \right\Vert$ ∥x∥ $\left\Vert \frac{1}{1+\frac{1}{1+x}} \right\Vert$ $\left< x \right>$ 〈x〉 $\left< \frac{1}{1+\frac{1}{1+x}} \right>$ $\left. x \right)$ x) $\left. \frac{1}{1+\frac{1}{1+x}} \right)$ $\left[ x \right.$ [x $\left[ \frac{1}{1+\frac{1}{1+x}} \right.$

### Math Fonts

These LaTeX commands apply a particular mathematical style to their arguments. Note that some styles are not supported well by some browsers.

 Input Result $\mathrm{xyz} + xyz$ $\mathsf{xyz} + xyz$ $\mathit{xyz} + xyz$ $\mathbf{xyz} + xyz$ $\mathtt{xyz} + xyz$

### Text inside Maths

SnuggleTeX supports the traditional \mbox command to enter LR mode from within math mode. It also supports \textrm and friends.

 Input Result $1\mbox{ if$x=3$}$ 1 if x=3 $1\textrm{ if$x=3$}$ $1\textsf{ if$x=3$}$ $1\textit{ if$x=3$}$ $1\textsl{ if$x=3$}$ 1 if x=3 $1\textsc{ if$x=3$}$ 1 if x=3 $1\textbf{ if$x=3$}$ $1\texttt{ if$x=3$}$ $1\emph{ if$x=3$}$

### Mathematical Structures

 Input Result Notes \begin{eqnarray*} x & = & y \\ & = & z \end{eqnarray*} This is a standard LaTeX eqnarray*. SnuggleTeX also supports eqnarray, though labelling is not supported so it behaves exactly like eqnarray*. $\left( \begin{array}{cc} 1 & 2 \\ 3 & 4 \end{array} \right)$ This uses the array environment combined with stretchy brackets to make a matrix. $\begin{matrix} 1 & 2 \\ 3 & 4 \end{matrix}$ SnuggleTeX supports the convenient AMS-LaTeX matrix environment… $\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$ …and pmatrix… $\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$ …and bmatrix… $\begin{Bmatrix} 1 & 2 \\ 3 & 4 \end{Bmatrix}$ …and Bmatrix… $\begin{vmatrix} 1 & 2 \\ 3 & 4 \end{vmatrix}$ …and vmatrix… $\begin{Vmatrix} 1 & 2 \\ 3 & 4 \end{Vmatrix}$ …and Vmatrix. $A=\begin{cases} 1 & 2 \\ 3 & 4 \end{cases}$ Another useful AMS-LaTeX environment environment.

### Variant Characters

This is one area of MathML which cause practical issues in browsers, usually due to a lack of fonts. By default, SnuggleTeX adds mathvariant attributes to the MathML whenever variant fonts like "script" (a.k.a. "calligraphic"), "fraktur" and "double-struck" are used, leaving the browser to use an appropriate font. By default, Firefox doesn’t do anything here so, like similar conversion tools, SnuggleTeX can also try to remap certain "safe" characters to other symbols that users are likely to have installed. The output below demonstrates this.

 Input Result $\mathcal{abcdefghijklmnopqrstuvwxyz}$ abcdℯfℊhijklmnℴpqrstuvwxyz $\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ AℬCDℰℱGℋℐJKℒℳNOPQℛSTUVWXYZ $\mathsc{abcdefghijklmnopqrstuvwxyz}$ abcdℯfℊhijklmnℴpqrstuvwxyz $\mathsc{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ AℬCDℰℱGℋℐJKℒℳNOPQℛSTUVWXYZ $\mathbb{abcdefghijklmnopqrstuvwxyz}$ abcdefghijklmnopqrstuvwxyz $\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ ABℂDEFGℍIJKLMℕOℙℚℝSTUVWXYℤ $\mathfrak{abcdefghijklmnopqrstuvwxyz}$ abcdℯfℊhijklmnℴpqrstuvwxyz $\mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ ABℭDEFGℌℑJKLMNOPQℛSTUVWXYℨ