Fading Coder

One Final Commit for the Last Sprint

Home > Tech > Content

Common Mathematical Symbols and Formatting in Markdown

Tech 1

Formula Placement

Inline formulas use $...$, while display mode uses $$...$$ for separate lines.

Superscripts and Subscripts

Superscript is denoted by ^, subscript by _. Example: C_n^2 renders as (C_n^2). Preceding sub/superscripts like {}_1^2\!X_3^4 render as ({}_1^2!X_3^4).

Grouping Expressions

Enclose expressions with {} to group them. For instance, e^{10} becomes (e^{10}), whereas e^10 renders as (e^10).

Font Styles

Display Command Style
(ABCabc) $ABCabc$ Regular
(\text{ABCabc}) \text{ABCabc} Text mode (can contain $)
(\mathbf{ABCabc}) \mathbf{ABCabc} Bold
(\boldsymbol{\alpha}) \boldsymbol{\alpha} Bold (other symbols)
(\mathit{ABCabc}) \mathit{ABCabc} Italic
(\pmb{ABCabc}) \pmb{ABCabc} Bold italic
(\mathbb{ABCabc}) \mathbb{ABCabc} or \Bbb{ABCabc} Blackboard bold
(\mathtt{ABCabc}) \mathtt{ABCabc} Typewriter
(\mathrm{ABCabc}) \mathrm{ABCabc} Roman
(\mathsf{ABCabc}) \mathsf{ABCabc} Sans serif
(\mathcal{ABCabc}) \mathcal{ABCabc} Calligraphic
(\mathscr{ABCabc}) \mathscr{ABCabc} Script
(\mathfrak{ABCabc}) \mathfrak{ABCabc} Fraktur

Font Sizes

Display Command
(ABCabc) ABCabc
(\tiny ABCabc) \tiny ABCabc
(\small ABCabc) \small ABCabc
(\normalsize ABCabc) \normalsize ABCabc
(\large ABCabc) \large ABCabc
(\Large ABCabc) \Large ABCabc
(\huge ABCabc) \huge ABCabc
(\Huge ABCabc) \Huge ABCabc

Grouping controls font size, e.g., ABC {\tiny ABC} {\large ABC} renders as (ABC {\tiny ABC} {\large ABC}).

Greek Letters

Lowercase Command Uppercase Command
(\alpha) \alpha (\Alpha) \Alpha
(\beta) \beta (\Beta) \Beta
(\gamma) \gamma (\Gamma) \Gamma
(\delta) \delta (\Delta) \Delta
(\epsilon) \epsilon (\Epsilon) \Epsilon
(\zeta) \zeta (\Zeta) \Zeta
(\eta) \eta (\Eta) \Eta
(\theta) \theta (\Theta) \Theta
(\iota) \iota (\Iota) \Iota
(\kappa) \kappa (\Kappa) \Kappa
(\lambda) \lambda (\Lambda) \Lambda
(\mu) \mu (\Mu) \Mu
(\nu) \nu (\Nu) \Nu
(\xi) \xi (\Xi) \Xi
(\pi) \pi (\Pi) \Pi
(\rho) \rho (\Rho) \Rho
(\sigma) \sigma (\Sigma) \Sigma
(\tau) \tau (\Tau) \Tau
(\upsilon) \upsilon (\Upsilon) \Upsilon
(\phi) \phi (\Phi) \Phi
(\chi) \chi (\Chi) \Chi
(\psi) \psi (\Psi) \Psi
(\omega) \omega (\Omega) \Omega
(\omicron) \omicron (\Omicron) \Omicron

Italic Greek letters are prefixed with var, e.g., \varDelta renders as (\varDelta).

Arithmetic Operations

Display Command
(\times) \times
(\div) \div
(\cdot) \cdot
(\lt) <
(\gt) >
(\ll) \ll
(\gg) \gg
(\lll) \lll
(\pm) \pm
(\le) \le or \leq
(\ge) \ge or \geq
(\mp) \mp
(\leqq) \leqq
(\geqq) \geqq
(\neq) \neq
(\leqslant) \leqslant
(\geqslant) \geqslant
(\approx) \approx

Set Theory

Display Command
(\compliment) \complement
(\in) \in
(\notin) \notin
(\subset) \subset
(\subseteq) \subseteq
(\subsetneq) \subsetneq
(\cap) \cap
(\cup) \cup
(\varnothing) \varnothing
(\emptyset) \emptyset

Logical Operators

Display Command
(\land) \land or \wedge
(\lor) \lor or \vee
(\lnot) \lnot or \neg
(\forall) \forall
(\exists) \exists
(\top) \top
(\vdash) \vdash
(\vDash) \vDash
(\bot) \bot

Parentheses

Parenthesis Command
((x)) (x)
({ x }) \{ x \} or \lbrace x \rbrace
([x]) [x]
(\vert x\vert) \vert x \vert
(\Vert x \Vert) \Vert x \Vert
(\langle x \rangle) \langle x \rangle
(\lceil x \rceil) \lceil x \rceil
(\lfloor x \rfloor) \lfloor x \rfloor
(\left(\frac xy \right)) \left( \frac xy \right)
(\left. \frac 12 \right}) \left. \frac 12 \right\}
(\left{ \frac xy \middle y \neq 0 \right}) \left\{ \frac xy \middle y \neq 0 \right\}
(\Bigg(\bigg(\Big(\big((x) \big)\Big)\bigg)\Bigg)) \Bigg(\bigg(\Big(\big((x) \big)\Big)\bigg)\Bigg)
(\dbinom nr) \dbinom nr
(\binom nr) \binom nr or {n \choose r}

Spacing

Display Command
(a b) a b
(a \qquad b) a \qquad b
(a \quad b) a \quad b
(a\ b) a\ b
(a;b) a\;b
(a,b) a\,b
(a!b) a\!b

Summation, Integrals, and Derivatives

Display Command
(\sum_1^n) \sum_1^n
(\sum_{i=0}^\infty x^2) \sum_{i=0}^\infty x^2
(\int) \int
(\iint) \iint
(\iiint) \iiint
(\idotsint) \idotsint
(\oint) \oint
(\prod) \prod
(\coprod) \coprod
(\bigcap) \bigcap
(\bigcup) \bigcup
(\bigvee) \bigvee
(\bigwedge) \bigwedge
(\infty) \infty
(\nabla) \nabla
(\partial x) \partial x
(\mathrm{d}x) \mathrm{d}x
(\dot x) \dot x
(\ddot y) \ddot y

Fractions, Roots, and Functions

Display Command Description
(\frac 12) \frac 12
(\dfrac 12) \dfrac 12 Force display style
(\tfrac 12) \tfrac 12 Force text style
(\cfrac 12) \cfrac 12 For continued fractions
(\frac {x^2}{1+x}) \frac {x^2}{1+x}
({x^2 \over 1+x}) {x^2 \over 1+x} For complex fractions
(\sqrt{x^3}) \sqrt{x^3}
(\sqrt[3]{\frac xy}) \sqrt[3]{\frac xy}
(\sin x) \sin x Most functions use \ + function name
(\operatorname{arcsec}x) \operatorname{arcsec}x For custom functions
(\lim_{x \to 0}) \lim_{x \to 0}
(\varinjlim) \varinjlim
(\varprojlim) \varprojlim
(\varliminf) \varliminf
(\varlimsup) \varlimsup

Arrow Symbols

Display Command
(\Rightarrow) \Rightarrow
(\Leftarrow) \Leftarrow
(a \rightarrow b) a \rightarrow b
(a \leftarrow b) a \leftarrow b
(a \to b) a \to b
(a \gets b) a \gets b
(a \Longrightarrow b) a \Longrightarrow b
(a \Longleftarrow b) a \Longleftarrow b
(a \implies b) a \implies b
(a \impliedby b) a \impliedby b
(\longrightarrow) \longrightarrow
(\longleftarrow) \longleftarrow
(\Leftrightarrow) \Leftrightarrow
(\leftrightarrow) \leftrightarrow
(\Longleftrightarrow) \Longleftrightarrow or \iff
(\longleftrightarrow) \longleftrightarrow
(\xrightarrow[y>0]{x+y}) \xrightarrow[y>0]{x+y}
(\xleftarrow{x+y}) \xleftarrow{x+y}
(\longmapsto) \longmapsto
(\mapsto) \mapsto
(\hookleftarrow) \hookleftarrow
(\hookrightarrow) \hookrightarrow
(\searrow) \searrow
(\nearrow) \nearrow
(\nwarrow) \nwarrow
(\swarrow) \swarrow
(\downarrow) \downarrow
(\uparrow) \uparrow
(\upuparrows) \upuparrows
(\updownarrow) \updownarrow
(\Uparrow) \Uparrow
(\downdownarrows) \downdownarrows
(\Updownarrow) \Updownarrow
(\Downarrow) \Downarrow
(\rightharpoonup) \rightharpoonup
(\leftharpoonup) \leftharpoonup
(\rightharpoondown) \rightharpoondown
(\leftharpoondown) \leftharpoondown
(\upharpoonleft) \upharpoonleft
(\downharpoonleft) \downharpoonleft
(\upharpoonright) \upharpoonright
(\downharpoonright) \downharpoonright
(\rightleftharpoons) \rightleftharpoons
(\leftrightharpoons) \leftrightharpoons
(\rightrightarrows) \rightrightarrows
(\leftleftarrows) \leftleftarrows
(\Rrightarrow) \Rrightarrow
(\Lleftarrow) \Lleftarrow
(\rightleftarrows) \rightleftarrows
(\leftrightarrows) \leftrightarrows
(\nrightarrow) \nrightarrow
(\nleftarrow) \nleftarrow
(\nLeftarrow) \nLeftarrow
(\nRightarrow) \nRightarrow
(\nleftrightarrow) \nleftrightarrow
(\curvearrowleft) \curvearrowleft
(\circlearrowleft) \circlearrowleft
(\curvearrowright) \curvearrowright
(\circlearrowright) \circlearrowright
(\looparrowleft) \looparrowleft
(\rightarrowtail) \rightarrowtail
(\looparrowright) \looparrowright
(\leftarrowtail) \leftarrowtail
(\Lsh) \Lsh
(\twoheadleftarrow) \twoheadleftarrow
(\Rsh) \Rsh
(\twoheadrightarrow) \twoheadrightarrow
(\rightsquigarrow) \rightsquigarrow
(\leftrightsquigarrow) \leftrightsquigarrow

Geometry and Vectors

Display Command
(\triangle) \triangle
(\Diamond) \Diamond
(\Box) \Box
(\odot) \odot
(\angle ABC) \angle ABC
(30^\circ) 30^\circ
(\perp) \perp
(\sim) \sim
(\cong) \cong
(\hat{a}) \hat{a}
(\vec{a}) \vec{a}
(\overrightarrow{AB}) \overrightarrow{AB}
(\overleftarrow{AB}) \overleftarrow{AB}
(\overleftrightarrow{AB}) \overleftrightarrow{AB}
(\widehat{e f g}) \widehat{e f g}

Diacritical Marks

Display Command
(\bar a) \bar a
(\acute{a}) \acute{a}
(\check{a}) \check{a}
(\grave{a}) \grave{a}
(\breve{a}) \breve{a}
(\dot{a}) \dot{a}
(\ddot{a}) \ddot{a}
(\dddot{a}) \dddot{a}
(\hat a) \hat{a}
(\tilde{a}) \tilde{a}

Overlines, Underlines, and Braces

Display Command
(\overline{h i j}) \overline{h i j}
(\underline{h i j}) \underline{h i j}
(\underbrace{a+b+\cdots+z}_{10}) \underbrace{a+b+\cdots+z}_{10}
(\overbrace{a+b+\cdots+z}^{10}) \overbrace{a+b+\cdots+z}^{10}

Special Characters

Symbol Display Symbol Display Symbol Display
(\eth) \eth (\S) \S (\P) \P
(%) \% (\dagger) \dagger (\ddagger) \ddagger
(\star) \star (\ast) \ast or * (\circ) \circ
(\bullet) \bullet (\ldots) \ldots (\cdots) \cdots
(\vdots) \vdots (\ddots) \ddots (\smile) \smile
(\frown) \frown (\wr) \wr (\oplus) \oplus
(\bigoplus) \bigoplus (\otimes) \otimes (\bigotimes) \bigotimes
(\bigodot) \bigodot (\boxtimes) \boxtimes (\boxplus) \boxplus
(\triangleleft) \triangleleft (\triangleright) \triangleright (\bot) \bot
(\top) \top (\vdash) \vdash (\Vdash) \Vdash
(\vDash) \vDash (\models) \models (\infty) \infty
(\imath) \imath (\hbar) \hbar (\ell) \ell
(\mho) \mho (\Finv) \Finv (\Re) \Re
(\Im) \Im (\wp) \wp (\diamondsuit) \diamondsuit
(\heartsuit) \heartsuit (\clubsuit) \clubsuit (\spadesuit) \spadesuit
(\Game) \Game (\flat) \flat (\natural) \natural
(\sharp) \sharp (\because) \because (\therefore) \therefore

Arrays

Syntax: $$\begin{array}…\end{array}$$, where r aligns right, l left, c center, | vertical line, \hline horizontal line, \\ for new line, and & separates elements.

Example:

$$
  \begin{array}{c|lcr}
    n & \text{Left} & \text{Center} & \text{Right} \\\hline
    1 & 0.24 & 1 & 125 \\
    2 & -1 & 189 & -8 \\
    3 & -20 & 2000 & 1+10i
  \end{array}
$$

Matrices

Syntax: $$\begin{matrix}…\end{matrix}$$, each row ends with \\, and elements separated by &.

Example:

$$
  \begin{matrix}
    1 & x & x^2 \\
    1 & y & y^2 \\
    1 & z & z^2 \\
  \end{matrix}
$$

Add parentheses:

  • pmatrix (())
  • bmatrix ([\ ])
  • Bmatrix ({\ })
  • vmatrix (\vert\ \vert)
  • Vmatrix (\Vert\ \Vert)

Add ellipses:

\begin{pmatrix}
  1 & a_1^2 & a_1^2 & \cdots & a_1^2 \\
  1 & a_2^2 & a_2^2 & \cdots & a_2^2 \\
  \vdots & \vdots & \vdots & \ddots & \vdots \\
  1 & a_n^2 & a_n^2 & \cdots & a_n^2 \\
\end{pmatrix}

Horizontal augmented matrix:

$$
  \left[
    \begin{array}{cc|c}
      1&2&3\\
      4&5&6
    \end{array}
  \right]
$$

Vertical augmented matrix:

$$
  \begin{pmatrix}
    a & b\\
    c & d\\
    \hline
    1 & 0\\
    0 & 1
  \end{pmatrix}
$$

Inline matrices:

(\big( \begin{smallmatrix} a & b \ c & d \end{smallmatrix} \big)) using $\big( \begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \big)$

Equation Alignment

Syntax: \begin{align}…\end{align}, rows end with \\, elements separated by &.

Example:

$$
  \begin{align}
    \sqrt{37} & = \sqrt{\frac{73^2-1}{12^2}} \\\n     & = \sqrt{\frac{73^2}{12^2}\cdot\frac{73^2-1}{73^2}} \\
     & = \sqrt{\frac{73^2}{12^2}}\sqrt{\frac{73^2-1}{73^2}} \\
     & = \frac{73}{12}\sqrt{1 - \frac{1}{73^2}} \\
     & \approx \frac{73}{12}\left(1 - \frac{1}{2\cdot73^2}\right)
  \end{align}
$$

Piecewise Functions

Syntax: \begin{cases}…\end{cases}, rows end with \\, elements separated by &.

Example:

$$
  f(n) =
    \begin{cases}
      n/2,  & \text{if $n$ is even} \\\n      3n+1, & \text{if $n$ is odd}
    \end{cases}
$$

Alternative form:

$$
  \left.
    \begin{array}{l}
    \text{if $n$ is even:}&n/2\\
    \text{if $n$ is odd:}&3n+1
    \end{array}
  \right\}
  =f(n)
$$

Equation Numbering

Syntax: \tag.

Example:

$$
  y=x^2        \tag{1.5a}
$$
Tags: Markdown

Related Articles

Understanding Strong and Weak References in Java

Strong References Strong reference are the most prevalent type of object referencing in Java. When an object has a strong reference pointing to it, the garbage collector will not reclaim its memory. F...

Comprehensive Guide to SSTI Explained with Payload Bypass Techniques

Introduction Server-Side Template Injection (SSTI) is a vulnerability in web applications where user input is improper handled within the template engine and executed on the server. This exploit can r...

Implement Image Upload Functionality for Django Integrated TinyMCE Editor

Django’s Admin panel is highly user-friendly, and pairing it with TinyMCE, an effective rich text editor, simplifies content management significantly. Combining the two is particular useful for bloggi...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.