TeX commands table (cheatsheet)
Common TeX (and TeX based systems such as LaTeX, KaTeX, MathJax etc.) commands grouped in one place. Quick TeX cheatsheet/crib helpful while writing any scientific text containing math formulas like mathematical or physical publications.

# Accents

 $\TeX$ code Result preview a' $a'$ \grave{a} $\grave{a}$ \overleftarrow{AB} $\overleftarrow{AB}$ \overrightarrow{AB} $\overrightarrow{AB}$ a'' $a''$ \hat{\theta} $\hat{\theta}$ \underleftarrow{AB} $\underleftarrow{AB}$ \underrightarrow{AB} $\underrightarrow{AB}$ a^{\prime} $a^{\prime}$ \widehat{ac} $\widehat{ac}$ \overleftrightarrow{AB} $\overleftrightarrow{AB}$ \overbrace{AB} $\overbrace{AB}$ \acute{a} $\acute{a}$ \mathring{g} $\mathring{g}$ \underleftrightarrow{AB} $\underleftrightarrow{AB}$ \underbrace{AB} $\underbrace{AB}$ \bar{y} $\bar{y}$ \tilde{a} $\tilde{a}$ \overgroup{AB} $\overgroup{AB}$ \overlinesegment{AB} $\overlinesegment{AB}$ \breve{a} $\breve{a}$ \widetilde{ac} $\widetilde{ac}$ \undergroup{AB} $\undergroup{AB}$ \underlinesegment{AB} $\underlinesegment{AB}$ \check{a} $\check{a}$ \vec{F} $\vec{F}$ \overleftharpoon{ac} $\overleftharpoon{ac}$ \overrightharpoon{ac} $\overrightharpoon{ac}$ \dot{a} $\dot{a}$ \overline{AB} $\overline{AB}$ \Overrightarrow{AB} $\Overrightarrow{AB}$ \utilde{AB} $\utilde{AB}$ \ddot{a} $\ddot{a}$ \underline{AB} $\underline{AB}$

# Delimeters

 $\TeX$ code Result preview (x) $(x)$ \lgroup x \rgroup $\lgroup x \rgroup$ \lceil x \rceil $\lceil x \rceil$ \uparrow $\uparrow$ [x] $[x]$ \lbrack x \rbrack $\lbrack x \rbrack$ \lfloor x \rfloor $\lfloor x \rfloor$ \downarrow $\downarrow$ \{x\} $\{x\}$ \lbrace x \rbrace $\lbrace x \rbrace$ \lmoustache x \rmoustache $\lmoustache x \rmoustache$ \updownarrow $\updownarrow$ $$ \langle x \rangle $\langle x \rangle$ \lt x \gt $\lt x \gt$ \Uparrow $\Uparrow$ | $|$ \vert $\vert$ \ulcorner x \urcorner $\ulcorner x \urcorner$ \Downarrow $\Downarrow$ \| $\|$ \Vert $\Vert$ \llcorner x \lrcorner $\llcorner x \lrcorner$ \Updownarrow $\Updownarrow$ \lvert x \rvert $\lvert x \rvert$ \lVert x \rVert $\lVert x \rVert$ \backslash $\backslash$

# Environments (matrixes, equations, etc.)

 $\TeX$ code Result preview \begin{matrix} a & b \\ c & d \end{matrix} $\begin{matrix} a & b \\ c & d \end{matrix}$ \begin{array}{c|c} a & b \\ c & d \end{array} $\begin{array}{c|c} a & b \\ c & d \end{array}$ \begin{aligned} a&=b+c \\ d+e&=f \end{aligned} \begin{aligned} a&=b+c \\ d+e&=f \end{aligned} \begin{pmatrix} a & b \\ c & d \end{pmatrix} $\begin{pmatrix} a & b \\ c & d \end{pmatrix}$ \begin{bmatrix} a & b \\ c & d \end{bmatrix} $\begin{bmatrix} a & b \\ c & d \end{bmatrix}$ \begin{alignedat}{2} 10&x+ &3&y = 2 \\ 3&x+&13&y = 4 \end{alignedat} \begin{alignedat}{2} 10&x+ &3&y = 2 \\ 3&x+&13&y = 4 \end{alignedat} \begin{vmatrix} a & b \\ c & d \end{vmatrix} $\begin{vmatrix} a & b \\ c & d \end{vmatrix}$ \begin{Vmatrix} a & b \\ c & d \end{Vmatrix} $\begin{Vmatrix} a & b \\ c & d \end{Vmatrix}$ \begin{gathered} a=b \\ e=b+c \end{gathered} $\begin{gathered} a=b \\ e=b+c \end{gathered}$ \begin{Bmatrix} a & b \\ c & d \end{Bmatrix} $\begin{Bmatrix} a & b \\ c & d \end{Bmatrix}$ x = \begin{cases} a &\text{if } b \\ c &\text{if } d \end{cases} $x = \begin{cases} a &\text{if } b \\ c &\text{if } d \end{cases}$

# Annotation

 $\TeX$ code Result preview \cancel{5} $\cancel{5}$ \bcancel{5} $\bcancel{5}$ \xcancel{ABC} $\xcancel{ABC}$ \sout{abc} $\sout{abc}$ \not = $\not =$ \overbrace{a+b+c}^{\text{note}} $\overbrace{a+b+c}^{\text{note}}$ \underbrace{a+b+c}_{\text{note}} $\underbrace{a+b+c}_{\text{note}}$ \boxed{\pi=\frac c d} $\boxed{\pi=\frac c d}$

# Overlap

 $\TeX$ code Result preview {=}\mathllap{/\,} ${=}\mathllap{/\,}$ \left(x^{\smash{2}}\right) $\left(x^{\smash{2}}\right)$ \mathrlap{\,/}{=} $\mathrlap{\,/}{=}$ \sqrt{\smash[b]{y}} $\sqrt{\smash[b]{y}}$ \sum_{\mathclap{1\le i\le j\le n}} x_{ij} $\sum_{\mathclap{1\le i\le j\le n}} x_{ij}$

# Vertical layout

 $\TeX$ code Result preview x_n $x_n$ \stackrel{!}{=} $\stackrel{!}{=}$ a \atop b $a \atop b$ e^x $e^x$ \overset{!}{=} $\overset{!}{=}$ a\raisebox{0.25em}{b}c $a\raisebox{0.25em}{b}c$ _u^o $_u^o$ \underset{!}{=} $\underset{!}{=}$

# Logic and set theory

 $\TeX$ code Result preview \forall $\forall$ \complement $\complement$ \therefore $\therefore$ \neg $\neg$ \lnot $\lnot$ \exists $\exists$ \subset $\subset$ \because $\because$ \emptyset $\emptyset$ \varnothing $\varnothing$ \nexists $\nexists$ \supset $\supset$ \mapsto $\mapsto$ \in $\in$ \mid $\mid$ \to $\to$ \implies $\implies$ \notin $\notin$ \land $\land$ \gets $\gets$ \impliedby $\impliedby$ \ni $\ni$ \lor $\lor$ \leftrightarrow $\leftrightarrow$ \iff $\iff$ \notni $\notni$

# Big operators

 $\TeX$ code Result preview \sum $\sum$ \prod $\prod$ \bigvee $\bigvee$ \bigotimes $\bigotimes$ \int $\int$ \coprod $\coprod$ \bigwedge $\bigwedge$ \bigoplus $\bigoplus$ \iint $\iint$ \intop $\intop$ \bigcap $\bigcap$ \bigodot $\bigodot$ \iiint $\iiint$ \smallint $\smallint$ \bigcup $\bigcup$ \biguplus $\biguplus$ \oint $\oint$ \bigsqcup $\bigsqcup$

# Binary operators

 $\TeX$ code Result preview + $+$ \cdot $\cdot$ \gtrdot $\gtrdot$ x \pmod a $x \pmod a$ - $-$ \cdotp $\cdotp$ \intercal $\intercal$ \land $\land$ / $/$ \centerdot $\centerdot$ \centerdot $\centerdot$ \rhd $\rhd$ * $*$ \circ $\circ$ \leftthreetimes $\leftthreetimes$ \rightthreetimes $\rightthreetimes$ \amalg $\amalg$ \circledast $\circledast$ \ldotp $\ldotp$ \rtimes $\rtimes$ \And $\And$ \circledcirc $\circledcirc$ \lor $\lor$ \setminus $\setminus$ \ast $\ast$ \circleddash $\circleddash$ \lessdot $\lessdot$ \smallsetminus $\smallsetminus$ \barwedge $\barwedge$ \Cup $\Cup$ \lhd $\lhd$ \sqcap $\sqcap$ \bigcirc $\bigcirc$ \cup $\cup$ \ltimes $\ltimes$ \sqcup $\sqcup$ \bmod $\bmod$ \curlyvee $\curlyvee$ x \pod a $x \pod a$ \times $\times$ \boxdot $\boxdot$ \curlywedge $\curlywedge$ \mp $\mp$ \unlhd $\unlhd$ \boxminus $\boxminus$ \div $\div$ \odot $\odot$ \unrhd $\unrhd$ \boxplus $\boxplus$ \divideontimes $\divideontimes$ \ominus $\ominus$ \uplus $\uplus$ \boxtimes $\boxtimes$ \dotplus $\dotplus$ \oplus $\oplus$ \vee $\vee$ \bullet $\bullet$ \doublebarwedge $\doublebarwedge$ \otimes $\otimes$ \veebar $\veebar$ \Cap $\Cap$ \doublecap $\doublecap$ \oslash $\oslash$ \wedge $\wedge$ \cap $\cap$ \doublecup $\doublecup$ \pm $\pm$ \wr $\wr$

# Binomial coefficients

 $\TeX$ code Result preview \binom{n}{k} $\binom{n}{k}$ \dbinom{n}{k} $\dbinom{n}{k}$ \left\langle n \atop k \right\rangle $\left\langle n \atop k \right\rangle$ {n}\choose{k} ${n}\choose{k}$ \tbinom{n}{k} $\tbinom{n}{k}$

# Fractions

 $\TeX$ code Result preview \frac{a}{b} $\frac{a}{b}$ \dfrac{a}{b} $\dfrac{a}{b}$ {a}/{b} ${a}/{b}$ {a}\over{b} ${a}\over{b}$ \tfrac{a}{b} $\tfrac{a}{b}$

# Math operators

 $\TeX$ code Result preview \operatorname{asin} x $\operatorname{asin} x$ \arcsin $\arcsin$ \cotg $\cotg$ \ln $\ln$ \det $\det$ \arccos $\arccos$ \coth $\coth$ \log $\log$ \gcd $\gcd$ \arctan $\arctan$ \csc $\csc$ \sec $\sec$ \inf $\inf$ \arctg $\arctg$ \ctg $\ctg$ \sin $\sin$ \lim $\lim$ \arcctg $\arcctg$ \cth $\cth$ \sinh $\sinh$ \liminf $\liminf$ \arg $\arg$ \deg $\deg$ \sh $\sh$ \limsup $\limsup$ \ch $\ch$ \dim $\dim$ \tan $\tan$ \max $\max$ \cos $\cos$ \exp $\exp$ \tanh $\tanh$ \min $\min$ \cosec $\cosec$ \hom $\hom$ \tg $\tg$ \Pr $\Pr$ \cosh $\cosh$ \ker $\ker$ \th $\th$ \sup $\sup$ \cot $\cot$ \lg $\lg$

# Sqrt and power

 $\TeX$ code Result preview \sqrt{x} $\sqrt{x}$ \sqrt[3]{x} $\sqrt[3]{x}$ a^x $a^x$

# Relations

 $\TeX$ code Result preview \stackrel{!}{=} $\stackrel{!}{=}$ = $=$ < $<$ > $>$ : $:$ \curlyeqsucc $\curlyeqsucc$ \gtrapprox $\gtrapprox$ \perp $\perp$ \succapprox $\succapprox$ \dashv $\dashv$ \gtreqless $\gtreqless$ \pitchfork $\pitchfork$ \succcurlyeq $\succcurlyeq$ \dblcolon $\dblcolon$ \dblcolon $\dblcolon$ \gtreqqless $\gtreqqless$ \prec $\prec$ \succeq $\succeq$ \doteq $\doteq$ \gtrless $\gtrless$ \precapprox $\precapprox$ \succsim $\succsim$ \approx $\approx$ \Doteq $\Doteq$ \gtrsim $\gtrsim$ \preccurlyeq $\preccurlyeq$ \Supset $\Supset$ \approxeq $\approxeq$ \doteqdot $\doteqdot$ \in $\in$ \preceq $\preceq$ \supset $\supset$ \asymp $\asymp$ \eqcirc $\eqcirc$ \Join $\Join$ \precsim $\precsim$ \supseteq $\supseteq$ \backepsilon $\backepsilon$ \eqcolon $\eqcolon$ \le $\le$ \propto $\propto$ \supseteqq $\supseteqq$ \backsim $\backsim$ \Eqcolon $\Eqcolon$ \leq $\leq$ \risingdotseq $\risingdotseq$ \thickapprox $\thickapprox$ \backsimeq $\backsimeq$ \eqqcolon $\eqqcolon$ \leqq $\leqq$ \shortmid $\shortmid$ \thicksim $\thicksim$ \between $\between$ \Eqqcolon $\Eqqcolon$ \leqslant $\leqslant$ \shortparallel $\shortparallel$ \trianglelefteq $\trianglelefteq$ \bowtie $\bowtie$ \eqsim $\eqsim$ \lessapprox $\lessapprox$ \sim $\sim$ \triangleq $\triangleq$ \bumpeq $\bumpeq$ \eqslantgtr $\eqslantgtr$ \lesseqgtr $\lesseqgtr$ \simeq $\simeq$ \trianglerighteq $\trianglerighteq$ \Bumpeq $\Bumpeq$ \eqslantless $\eqslantless$ \lesseqqgtr $\lesseqqgtr$ \smallfrown $\smallfrown$ \varpropto $\varpropto$ \circeq $\circeq$ \equiv $\equiv$ \lessgtr $\lessgtr$ \smallsmile $\smallsmile$ \vartriangle $\vartriangle$ \colonapprox $\colonapprox$ \fallingdotseq $\fallingdotseq$ \lesssim $\lesssim$ \smile $\smile$ \vartriangleleft $\vartriangleleft$ \Colonapprox $\Colonapprox$ \frown $\frown$ \ll $\ll$ \sqsubset $\sqsubset$ \vartriangleright $\vartriangleright$ \coloneq $\coloneq$ \ge $\ge$ \lll $\lll$ \sqsubseteq $\sqsubseteq$ \vcentcolon $\vcentcolon$ \Coloneq $\Coloneq$ \geq $\geq$ \llless $\llless$ \sqsupset $\sqsupset$ \vdash $\vdash$ \coloneqq $\coloneqq$ \geqq $\geqq$ \lt $\lt$ \sqsupseteq $\sqsupseteq$ \vDash $\vDash$ \Coloneqq $\Coloneqq$ \geqslant $\geqslant$ \mid $\mid$ \Subset $\Subset$ \Vdash $\Vdash$ \colonsim $\colonsim$ \gg $\gg$ \models $\models$ \subset $\subset$ \Vvdash $\Vvdash$ \Colonsim $\Colonsim$ \ggg $\ggg$ \multimap $\multimap$ \subseteq $\subseteq$ \cong $\cong$ \gggtr $\gggtr$ \owns $\owns$ \subseteqq $\subseteqq$ \curlyeqprec $\curlyeqprec$ \gt $\gt$ \parallel $\parallel$ \succ $\succ$

# Negated relations

 $\TeX$ code Result preview \not = $\not =$ \gnapprox $\gnapprox$ \ngeqslant $\ngeqslant$ \nsubseteq $\nsubseteq$ \precneqq $\precneqq$ \gneq $\gneq$ \ngtr $\ngtr$ \nsubseteqq $\nsubseteqq$ \precnsim $\precnsim$ \gneqq $\gneqq$ \nleq $\nleq$ \nsucc $\nsucc$ \subsetneq $\subsetneq$ \gnsim $\gnsim$ \nleqq $\nleqq$ \nsucceq $\nsucceq$ \subsetneqq $\subsetneqq$ \gvertneqq $\gvertneqq$ \nleqslant $\nleqslant$ \nsupseteq $\nsupseteq$ \succnapprox $\succnapprox$ \lnapprox $\lnapprox$ \nless $\nless$ \nsupseteqq $\nsupseteqq$ \succneqq $\succneqq$ \lneq $\lneq$ \nmid $\nmid$ \ntriangleleft $\ntriangleleft$ \succnsim $\succnsim$ \lneqq $\lneqq$ \notin $\notin$ \ntrianglelefteq $\ntrianglelefteq$ \supsetneq $\supsetneq$ \lnsim $\lnsim$ \notni $\notni$ \notni $\notni$ \ntriangleright $\ntriangleright$ \lvertneqq $\lvertneqq$ \nparallel $\nparallel$ \ntrianglerighteq $\ntrianglerighteq$ \varsubsetneq $\varsubsetneq$ \ncong $\ncong$ \nprec $\nprec$ \nvdash $\nvdash$ \varsubsetneqq $\varsubsetneqq$ \ne $\ne$ \npreceq $\npreceq$ \nvDash $\nvDash$ \varsupsetneq $\varsupsetneq$ \neq $\neq$ \nshortmid $\nshortmid$ \nVDash $\nVDash$ \varsupsetneqq $\varsupsetneqq$ \ngeq $\ngeq$ \nshortparallel $\nshortparallel$ \nVdash $\nVdash$ \supsetneqq $\supsetneqq$ \ngeqq $\ngeqq$ \nsim $\nsim$ \precnapprox $\precnapprox$

# Arrows

 $\TeX$ code Result preview \circlearrowleft $\circlearrowleft$ \Leftarrow $\Leftarrow$ \looparrowright $\looparrowright$ \rightrightarrows $\rightrightarrows$ \circlearrowright $\circlearrowright$ \leftarrowtail $\leftarrowtail$ \Lsh $\Lsh$ \rightsquigarrow $\rightsquigarrow$ \curvearrowleft $\curvearrowleft$ \leftharpoondown $\leftharpoondown$ \mapsto $\mapsto$ \Rrightarrow $\Rrightarrow$ \curvearrowright $\curvearrowright$ \leftharpoonup $\leftharpoonup$ \nearrow $\nearrow$ \Rsh $\Rsh$ \dashleftarrow $\dashleftarrow$ \leftleftarrows $\leftleftarrows$ \nleftarrow $\nleftarrow$ \searrow $\searrow$ \dashrightarrow $\dashrightarrow$ \leftrightarrow $\leftrightarrow$ \nLeftarrow $\nLeftarrow$ \swarrow $\swarrow$ \downarrow $\downarrow$ \Leftrightarrow $\Leftrightarrow$ \nleftrightarrow $\nleftrightarrow$ \to $\to$ \Downarrow $\Downarrow$ \leftrightarrows $\leftrightarrows$ \nLeftrightarrow $\nLeftrightarrow$ \twoheadleftarrow $\twoheadleftarrow$ \downdownarrows $\downdownarrows$ \leftrightharpoons $\leftrightharpoons$ \nrightarrow $\nrightarrow$ \twoheadrightarrow $\twoheadrightarrow$ \downharpoonleft $\downharpoonleft$ \leftrightsquigarrow $\leftrightsquigarrow$ \nRightarrow $\nRightarrow$ \uparrow $\uparrow$ \downharpoonright $\downharpoonright$ \Lleftarrow $\Lleftarrow$ \nwarrow $\nwarrow$ \Uparrow $\Uparrow$ \gets $\gets$ \longleftarrow $\longleftarrow$ \restriction $\restriction$ \updownarrow $\updownarrow$ \hookleftarrow $\hookleftarrow$ \Longleftarrow $\Longleftarrow$ \rightarrow $\rightarrow$ \Updownarrow $\Updownarrow$ \hookrightarrow $\hookrightarrow$ \longleftrightarrow $\longleftrightarrow$ \Rightarrow $\Rightarrow$ \upharpoonleft $\upharpoonleft$ \iff $\iff$ \Longleftrightarrow $\Longleftrightarrow$ \rightarrowtail $\rightarrowtail$ \upharpoonright $\upharpoonright$ \impliedby $\impliedby$ \longmapsto $\longmapsto$ \rightharpoondown $\rightharpoondown$ \upuparrows $\upuparrows$ \implies $\implies$ \longrightarrow $\longrightarrow$ \rightharpoonup $\rightharpoonup$ \leadsto $\leadsto$ \Longrightarrow $\Longrightarrow$ \rightleftarrows $\rightleftarrows$ \leftarrow $\leftarrow$ \looparrowleft $\looparrowleft$ \rightleftharpoons $\rightleftharpoons$

# Extensible arrows

 $\TeX$ code Result preview \xrightarrow{over} $\xrightarrow{over}$ \xRightarrow{abc} $\xRightarrow{abc}$ \xrightharpoonup{abc} $\xrightharpoonup{abc}$ \xrightarrow[under]{over} $\xrightarrow[under]{over}$ \xmapsto{abc} $\xmapsto{abc}$ \xrightharpoondown{abc} $\xrightharpoondown{abc}$ \xleftarrow{abc} $\xleftarrow{abc}$ \xLeftarrow{abc} $\xLeftarrow{abc}$ \xleftharpoonup{abc} $\xleftharpoonup{abc}$ \xleftrightarrow{abc} $\xleftrightarrow{abc}$ \xLeftrightarrow{abc} $\xLeftrightarrow{abc}$ \xleftharpoondown{abc} $\xleftharpoondown{abc}$ \xhookleftarrow{abc} $\xhookleftarrow{abc}$ \xhookrightarrow{abc} $\xhookrightarrow{abc}$ \xrightleftharpoons{abc} $\xrightleftharpoons{abc}$ \xtwoheadrightarrow{abc} $\xtwoheadrightarrow{abc}$ \xlongequal{abc} $\xlongequal{abc}$ \xleftrightharpoons{abc} $\xleftrightharpoons{abc}$ \xtwoheadleftarrow{abc} $\xtwoheadleftarrow{abc}$ \xtofrom{abc} $\xtofrom{abc}$

# Symbols and punctuation

 $\TeX$ code Result preview \Box $\Box$ \dots $\dots$ \checkmark $\checkmark$ \square $\square$ \cdots $\cdots$ \dag $\dag$ \# $\#$ \blacksquare $\blacksquare$ \ddots $\ddots$ \dagger $\dagger$ \& $\&$ \triangle $\triangle$ \ldots $\ldots$ \_ $\_$ \triangledown $\triangledown$ \vdots $\vdots$ \ddag $\ddag$ \triangleleft $\triangleleft$ \mathellipsis $\mathellipsis$ \ddagger $\ddagger$ \triangleright $\triangleright$ \bigtriangledown $\bigtriangledown$ \flat $\flat$ \\$ $\$ \bigtriangleup $\bigtriangleup$ \natural $\natural$ \blacktriangle $\blacktriangle$ \sharp $\sharp$ \pounds $\pounds$ ' $'$  $$ \blacktriangledown $\blacktriangledown$ \circledR $\circledR$ \blacktriangleleft $\blacktriangleleft$ \circledS $\circledS$ \yen $\yen$ \text{\lq} $\text{\lq}$ \blacktriangleright $\blacktriangleright$ \clubsuit $\clubsuit$ \surd $\surd$ \diamond $\diamond$ \diamondsuit $\diamondsuit$ \degree $\degree$ \text{\rq} $\text{\rq}$ \Diamond $\Diamond$ \heartsuit $\heartsuit$ \diagdown $\diagdown$ \lozenge $\lozenge$ \spadesuit $\spadesuit$ \diagup $\diagup$ \blacklozenge $\blacklozenge$ \angle $\angle$ \mho $\mho$ \star $\star$ \measuredangle $\measuredangle$ \maltese $\maltese$ \colon $\colon$ \bigstar $\bigstar$ \sphericalangle $\sphericalangle$ \text{\P} $\text{\P}$ \backprime $\backprime$ \top $\top$ \text{\S} $\text{\S}$ \prime $\prime$ \bot $\bot$ \nabla $\nabla$ \infty $\infty$

# Some facts

• $\TeX$ is a computer typesetting system.
• Unlike most popular systems (such as MS Word or Open Writer), $\TeX$ doesn't implement the WYSYWIG idea ("what you see is what you get"). This means that in order to see how the final document looks like, we first need to perform compilation process.
• When we want to create a $\TeX$ document we need to write a source code in special language. This fact is often regarded as a significant disadvantage in relation to systems based on the WYSYWIG idea. On the other hand, $\TeX$ followers say, that it gives more reproducible results, because the compilation process of once written source code is more predictable than visual systems.
• $\TeX$ is often used to create sciencific texts, which contain complex math formulas in the field of physics, mathematics or technical sciences.
• The creator of the $\TeX$ is Donald E. Knuth, an American mathematician and computer scientist. Legend says, that the main motivation was the fact that Knuth was not satisfied with the contemporary appearance of his publication.