Markdown mathematical formula

2020-12-05 03:58:55

1. inline

$$f(x)=x$$


f ( x ) = x f(x)=x

2. The paragraph

$$s=\sum_1^n{ n_i}$$


s = ∑ 1 n n i s=\sum_1^n{n_i}

3. Superscript

$$x^2$$


x 2 x^2

4. Subscript

$$x_i$$


x i x_i

5. Brackets

The parentheses and square brackets can be input directly , for example ：
parentheses （1234）
square brackets [1234]

Curly braces

Braces already have a special meaning , Curly braces in a formula need to be expressed in code

$$\lbrace a+x \rbrace$$


{ a + x } \lbrace a+x \rbrace

$$f(x)=\begin{ cases} 1, & x>0\\ 0, & x=0\\ -1, & x<0 \end{ cases}$$


f ( x ) = { 1 , x > 0 0 , x = 0 − 1 , x < 0 f(x)=\begin{cases} 1, & x>0\\ 0, & x=0\\ -1, & x<0 \end{cases}

Angle brackets

$$\langle x \rangle$$


* x * \langle x \rangle

Round up

$$\lceil \frac{ x}{ 2} \rceil$$


⌈ x 2 ⌉ \lceil \frac{x}{2} \rceil

Round down

$$\lfloor x \rfloor$$


⌊ x ⌋ \lfloor x \rfloor
Be careful ： Scaling the original bracket does not , Such as

$$\lbrace \sum_{ i=0}^{ n}i^{ 2}=\frac{ 2a}{ x^2+1} \rbrace$$


{ ∑ i = 0 n i 2 = 2 a x 2 + 1 } \lbrace \sum_{i=0}^{n}i^{2}=\frac{2a}{x^2+1} \rbrace

When you need to scale brackets , You can join \left \right

$$\left\lbrace \sum_{ i=0}^{ n}i^{ 2}=\frac{ 2a}{ x^2+1} \right\rbrace$$


{ ∑ i = 0 n i 2 = 2 a x 2 + 1 } \left\lbrace \sum_{i=0}^{n}i^{2}=\frac{2a}{x^2+1} \right\rbrace

6. Summation and integration

\sum It means sum , The subscript represents the lower bound of summation , The superscript represents the upper limit of the sum Such as :

$$\sum_i^n$$


∑ i n \sum_i^n

\int Representation integral , alike , The subscript represents the lower limit of the integral , The superscript is the upper limit of the integral . Such as :

$$\int_{ 1}^{ \infty}$$


∫ 1 ∞ \int_{1}^{\infty}

There are also symbols like

$$\prod_{ 1}^{ n} \\ \bigcup_{ 1}^{ n} \\ \iint_{ 1}^{ n}$$


∏ 1 n ⋃ 1 n ∬ 1 n \prod_{1}^{n} \\ \bigcup_{1}^{n} \\ \iint_{1}^{n}

Fraction

$$\frac ab$$


a b \frac ab

$$\frac{ 1}{ 2}$$


1 2 \frac{1}{2}

It's fine too

$${ a+1 \over b+1}$$


a + 1 b + 1 {a+1 \over b+1}

$$\sqrt[x+1]{ x^2}$$


x 2 x + 1 \sqrt[x+1]{x^2}

8. typeface

The blackboard is bold : \mathbb

9. Special functions and symbols

Summation symbol

$$\sum_{ i=0}^{ n}$$


∑ i = 0 n \sum_{i=0}^{n}

Multiplicative symbol

$$\prod$$


∏ \prod

Limit sign

 $\lim_{ x\to +\infty}$


lim ⁡ x → + ∞ \lim_{x\to +\infty}

convergence

$$x_n\stackrel{ p}\longrightarrow0$$


x n * p 0 x_n\stackrel{p}\longrightarrow0

vector

$$\vec{ a}$$


a ⃗ \vec{a}
or

 $$\overrightarrow{ a}$$


a → \overrightarrow{a}

$$\hat y=a\hat x+b$$


y ^ = a x ^ + b \hat y=a\hat x+b
Transpose symbol

$$\mathtt{ X}'$$


X ′ \mathtt{X}'
Exclusive or

⨁ $\bigoplus$


⨁ \bigoplus

11. form

|   Header    |  Header   |
|  ----  | ----  |
|  Cell   |  Cell  |
|  Cell   |  Cell  |

Cell Cell
Cell Cell

We can set the alignment of the table ：
-: Set the right alignment of content and title bar .
:- Set the content and title bar to the left .
:-: Set the content to center with the title bar .

12. matrix

$$\begin{ matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{ matrix} \tag{ 1}$$


1 2 3 4 5 6 7 8 9 (1) \begin{matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{matrix} \tag{1}

$$\left\{ \begin{ matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{ matrix} \right\} \tag{ 2}$$


{ 1 2 3 4 5 6 7 8 9 } (2) \left\{ \begin{matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{matrix} \right\} \tag{2}

$$\left[ \begin{ matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{ matrix} \right] \tag{ 3}$$


[ 1 2 3 4 5 6 7 8 9 ] (3) \left[ \begin{matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{matrix} \right] \tag{3}

$$\left[ \begin{ matrix} 1 & 2 & \cdots & 4 \\ 7 & 6 & \cdots & 5 \\ \vdots & \vdots & \ddots & \vdots \\ 8 & 9 & \cdots & 0 \\ \end{ matrix} \right]$$


[ 1 2 ⋯ 4 7 6 ⋯ 5 ⋮ ⋮ ⋱ ⋮ 8 9 ⋯ 0 ] \left[ \begin{matrix} 1 & 2 & \cdots & 4 \\ 7 & 6 & \cdots & 5 \\ \vdots & \vdots & \ddots & \vdots \\ 8 & 9 & \cdots & 0 \\ \end{matrix} \right]

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


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

13. Formula alignment

\begin{ aligned} a &= b + c\\ &= d + e + f \end{ aligned}


a = b + c = d + e + f \begin{aligned} a &= b + c\\ &= d + e + f \end{aligned}

15. effect

Use the above tutorial , The results are as follows ：

f ( x ) = x f(x)=x

s = ∑ 1 n + 1 n j s=\sum_1^{n+1}{n_j}

x 2 x^2

x i x_i

{ a + x } \lbrace a+x \rbrace

* x * \langle x \rangle

⌈ x 2 ⌉ \lceil \frac{x}{2} \rceil

⌊ x ⌋ \lfloor x \rfloor

Γ ( z ) = ∫ 0 ∞ t z − 1 e − t d t   . \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.

y = ∫ 1 2 x y 2 e − l o g x d x   . y = \int_1^2 x^{y^2}e^{-log_x}dx\,.

y = ∫ 0 ∞ x y 2 e − l o g x d x   . y = \int_0^\infty x^{y^2}e^{-log_x}dx\,.

https://chowdera.com/2020/12/202012042254589393.html