LaTeX插入数学公式

参考
http://www.mohu.org/info/symbols/symbols.htm
https://jingyan.baidu.com/article/4b52d702df537efc5c774bc9.html
https://blog.csdn.net/baidu_38060633/article/details/79183905
http://www.cnblogs.com/Sinte-Beuve/p/6160905.html

  • 行间公式 (inline):用$...$将公式括起来。

  • 块间公式 (displayed),用$$...$$将公式括起来是无编号的形式块间元素默认是居中显示的。

$$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$ x = b ± b 2 4 a c 2 a x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

  • 上下标。

_{...}表示下标,^{...}表示上标。

它默认只作用于之后的一个字符,如果想对连续的几个字符起作用,请将这些字符用花括号{}括起来, 也就是下面分组的概念。

  • 希腊字母

在这里插入图片描述

\alpha, \beta, ... \omega α \alpha , β \beta , ω \omega
\Gamma, \Delta, ... \Omega: Γ \Gamma , Δ \Delta , Ω \Omega

  • 运算符
    \pm \times \div \cdot \cap \cup \geq \leq \neq \approx \equiv
    ± × ÷ \pm \times \div \cdot \cap \cup \geq \leq \neq \approx \equiv
    求和:\sum_1^n: 1 n \sum_1^n

求积 $\prod$ : \prod
一重积分 $\int$ \int_a^b f(x)dx a b f ( x ) d x \int_a^b f(x)dx
二重积分 $\iint$ \iint_{\Omega}f(x,y)dxdy Ω f ( x , y ) d x d y \iint_{\Omega}f(x,y)dxdy
三重积分 $\iiint$ \iiint_{\Omega}f(x,y,z)dxdydz] Ω f ( x , y , z ) d x d y d z ] \iiint_{\Omega}f(x,y,z)dxdydz ]
曲线积分 $\oint$
微分算子 $\mathrm{d}x{d}y$ : d x d y \mathrm{d}x{d}y
极限:lim_{x \to \infty}: limx→∞ l i m x lim_{x \to \infty}
\prod:∏,\int:∫,,,\bigcup:⋃,\bigcap:⋂
矩阵 : \begin{matrix}…\end{matrix}

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

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

$$X=\left(
        \begin{matrix}
            x_{11} & x_{12} & \cdots & x_{1d}\\
            x_{21} & x_{22} & \cdots & x_{2d}\\
            \vdots & \vdots & \ddots & \vdots\\
            x_{m1} & x_{m2} & \cdots & x_{md}\\
        \end{matrix}
    \right)
    =\left(
         \begin{matrix}
                x_1^T \\
                x_2^T \\
                \vdots\\
                x_m^T \\
            \end{matrix}
    \right)
$$


X = ( x 11 x 12 x 1 d x 21 x 22 x 2 d x m 1 x m 2 x m d ) = ( x 1 T x 2 T x m T ) X=\left( \begin{matrix} x_{11} & x_{12} & \cdots & x_{1d}\\ x_{21} & x_{22} & \cdots & x_{2d}\\ \vdots & \vdots & \ddots & \vdots\\ x_{m1} & x_{m2} & \cdots & x_{md}\\ \end{matrix} \right) =\left( \begin{matrix} x_1^T \\ x_2^T \\ \vdots\\ x_m^T \\ \end{matrix} \right)

  • 方程组
$$
\left\{ 
    \begin{array}{c}
        a_1x+b_1y+c_1z=d_1 \\ 
        a_2x+b_2y+c_2z=d_2 \\ 
        a_3x+b_3y+c_3z=d_3
    \end{array}
\right. 
$$

{ a 1 x + b 1 y + c 1 z = d 1 a 2 x + b 2 y + c 2 z = d 2 a 3 x + b 3 y + c 3 z = d 3 \left\{ \begin{array}{c} a_1x+b_1y+c_1z=d_1 \\ a_2x+b_2y+c_2z=d_2 \\ a_3x+b_3y+c_3z=d_3 \end{array} \right.

  • 行列式
$$
X=\left|
    \begin{matrix}
        x_{11} & x_{12} & \cdots & x_{1d}\\
        x_{21} & x_{22} & \cdots & x_{2d}\\
        \vdots & \vdots & \ddots & \vdots\\
        x_{m1} & x_{m2} & \cdots & x_{md}\\
    \end{matrix}
\right|
$$

X = x 11 x 12 x 1 d x 21 x 22 x 2 d x m 1 x m 2 x m d X=\left| \begin{matrix} x_{11} & x_{12} & \cdots & x_{1d}\\ x_{21} & x_{22} & \cdots & x_{2d}\\ \vdots & \vdots & \ddots & \vdots\\ x_{m1} & x_{m2} & \cdots & x_{md}\\ \end{matrix} \right|

  • 方程式
$$J(\theta)=\frac1{2m}\sum_{i=0}(y^i-h_\theta(x^i))^2$$
$$E=mc^2$$

J ( θ ) = 1 2 m i = 0 ( y i h θ ( x i ) ) 2 J(\theta)=\frac1{2m}\sum_{i=0}(y^i-h_\theta(x^i))^2
E = m c 2 E=mc^2

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

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

猜你喜欢

转载自blog.csdn.net/weixin_44510615/article/details/88911347