Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Markdown Math Formulas

Markdown Math Formulas

LaTeX Math Formulas Basics

In Markdown, math formulas are expressed via LaTeX syntax. LaTeX is a powerful typesetting system, especially suited for documents containing complex math formulas.

Basic syntax structure

Common LaTeX commands

\alpha, \beta, \gamma  % 希腊字母

\sum, \prod, \int      % 求和、乘积、积分

\frac{分子}{分母}      % 分数

\sqrt{表达式}          % 平方根

\sqrt[n]{表达式}       % n次根

Inline and block-level formulas

Inline formula

Inline formulas use a single dollar sign $ to enclose, and the formula is embedded in the text, for example: the variable $x = 5$ and the function $f(x) = x^2 + 2x + 1$ in the text.

文本中的变量 $x = 5$ 和函数 $f(x) = x^2 + 2x + 1$。

Block-level formulas

Block-level formulas use double dollar signs $$ to enclose, and the formula appears on its own line, centered:

E = mc^2

\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}

$$E = mc^2$$



$$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$$

Multi-line formulas

Use align The environment creates multi-line aligned formulas:

\begin{align}
f(x) &= ax^2 + bx + c \
f'(x) &= 2ax + b \
f''(x) &= 2a
\end{align}

$$

    \begin{align}

    f(x) &= ax^2 + bx + c \\

    f'(x)  &= 2ax + b \\

    f''(x)  &= 2a

    \end{align}

    $$


Common mathematical symbols

Basic arithmetic symbols

Comparison symbols

Set symbols

Greek Letters

Common Greek letters and their LaTeX notation:

Lowercase Uppercase LaTeX Lowercase Uppercase LaTeX
α Α \alpha ν Ν \nu
β Β \beta ο Ο o
γ Γ \gamma π Π \pi
δ Δ \delta ρ Ρ \rho
ε Ε \epsilon σ Σ \sigma
θ Θ \theta τ Τ \tau
λ Λ \lambda φ Φ \phi
μ Μ \mu ω Ω \omega

Special functions and symbols

Matrix representation

Use matrix Environment:

\begin{pmatrix}
a & b \
c & d
\end{pmatrix}

$$

    \begin{pmatrix}

    a & b \\

    c & d

    \end{pmatrix}

    $$

Matrices with different bracket types: