Markdown 公式数学常用符号

2022-04-11  本文已影响0人  臻甄

样式

行内模式式使用 $...$,在文本之间插入公式;显示模式$$...$$,在单独的一行使用。

上标、下标

上标: ^,下标:_
示例: C_n^2C_n^2
前置上下标{}_1^2\!X_3^4{}_1^2\!C_3^4

分组

把相同等级的表达式放到一起。
符号: {}
e^{10}显示为e^{10},而e^10则为e^10

字体样式

字体大小

希腊字母

算数运算

集合

逻辑运算

括号

空格

求和、积分、微分

分式、根号、函数

箭头符号

几何和向量

上、下划线和上、下括号

特殊字符

阵列

语法: $$\begin{array}…\end{array}$$r右对齐,l左对齐,c居中,|垂直线,\hline横线,\\换行,元素之间以&间隔。

$$
  \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}
$$

\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}

矩阵

语法: $$\begin{matrix}…\end{matrix}$$,每行以\\结尾,元素之间以&间隔。

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

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

pmatrix ()
bmatrix [ ]
Bmatrix { }
vmatrix | |
Vmatrix ‖ ‖

$$
\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}
$$

\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}

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

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

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

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

在行内插入矩阵:如\big( \begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \big)的语法

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

等式对齐

语法: \begin{align}…\end{align},每行以\\结尾,元素之间以&间隔。

$$
  \begin{align}
    \sqrt{37} & = \sqrt{\frac{73^2-1}{12^2}} \\
     & = \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}
$$

\begin{align} \sqrt{37} & = \sqrt{\frac{73^2-1}{12^2}} \\ & = \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}

分段函数

语法: \begin{cases}…\end{cases},每行以\\结尾,元素之间以&间隔。

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

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

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

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

编号
语法:\tag

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

y=x^2 \tag{1.5a}

参考

https://www.cnblogs.com/ywsun/p/14271547.html

上一篇 下一篇

猜你喜欢

热点阅读