学习记录之数学表达式(2)

四、向量与矩阵

4.1 向量

  • 一个 m m m维向量是 m m m维空间中的一个点;
  • 向量与集合的记法是相同的,都可以用\mathbf,\bm或者\boldsymbol表示;
  • x ∈ R m x \in \mathbb{R}^{m} xRm,源码为:x\in\mathbb{R}^{m};
  • 向量可以记为: x = ( x 1 , x 2 , … , x m ) x=(x_1,x_2,\dots,x_m) x=(x1,x2,,xm)(源码为x=(x_1,x_2,\dots,x_m))或者 x = [ x 1 , x 2 , … , x m ] x=[x_1,x_2,\dots,x_m] x=[x1,x2,,xm](源码为x=[x_1,x_2,\dots,x_m]),特别注意不可以使用花括号,因为它表示无序的集合;
  • 列向量 x T = ( x 1 , x 2 , …   x m ) T = [ x 1 ; x 2 ; …   ; x m ] x^{\mathrm{T}}=(x_1,x_2,\dots\,x_m)^{\mathrm{T}}=[x_1;x_2;\dots;x_m] xT=(x1,x2,xm)T=[x1;x2;;xm](源码为x{\mathrm{T}}=(x_1,x_2,\dots,x_m){\mathrm{T}}=[x_1;x_2;\dots;x_m]),特别注意这里使用了分号;
  • 向量的内积 a ⋅ b = a b T = ∑ i = 1 n a i b i \mathbf{a}\cdot\mathbf{b}=\mathbf{a}\mathbf{b}^{\mathrm{T}}=\sum_{i=1}^na_i b_i ab=abT=i=1naibi,源码为:\mathbf{a} \cdot \mathbf{b}=\mathbf{a} \mathbf{b}{\mathrm{T}}=\sum_{i=1}na_i b_i;
  • 加权和 x w T = ∑ i = 1 n x i w i \mathbf{x}\mathbf{w}^{\mathrm{T}}=\sum_{i=1}^n\mathbf{x}_i \mathbf{w}_i xwT=i=1nxiwi,源码为:\mathbf{x} \mathbf{w}{\mathrm{T}}=\sum_{i=1}n \mathbf{x}_i \mathbf{w}_i,这在机器学习中广泛使用。其中, x i \mathbf{x}_i xi为对象的属性值(如体温), w i \mathbf{w}_i wi表示该属性的权重;

4.2 矩阵

  • 一个 n n n m m m列的句子可以表示为 X ∈ R n × m \mathbf{X}\in\mathbb{R}^{n \times m} XRn×m,源码为\mathbf{X} \in \mathbb{R}^{n \times m},也就是说,这是 n × m n\times m n×m空间中的一个点;
  • 纯矩阵的方式应该表示为 X = [ x i j ] n × m \mathbf{X}=[\mathbf{x}_{ij}]_{n \times m} X=[xij]n×m,源码为\mathbf{X}=[\mathbf{x}{ij}]{n \times m},在未来可以体会到,表达为矩阵有一些优势;
  • 机器学习通常希望 X \mathbf{X} X表示包括 n n n个实例,每个实例使用 m m m个属性描述的数据集,即 X = { x i } i = 1 n = { x 1 , x 2 , … , x n } \mathbf{X} = \{\mathbf{x}_i\}_{i=1}^n=\{\mathbf{x}_1,\mathbf{x}_2,\dots,\mathbf{x}_n\} X={xi}i=1n={x1,x2,,xn}(源码为\mathbf{X} = {\mathbf{x}i}{i=1}^n={\mathbf{x}_1,\mathbf{x}2,\dots,\mathbf{x}n}),其中 x i = [ x i 1 , x i 2 , … , x i m ] \mathbf{x}_i=[\mathbf{x}_{i1},\mathbf{x}_{i2},\dots,\mathbf{x}_{im}] xi=[xi1,xi2,,xim](源码为\mathbf{x}i=[\mathbf{x}{i1},\mathbf{x}{i2},\dots,\mathbf{x}{im}]);
  • 更多讨论见:机器学习的数学基础 5: 数据集的混合表示法
  • 矩阵乘法:给定 m × k m \times k m×k的矩阵 A \mathbf{A} A k × n k \times n k×n的矩阵 B \mathbf{B} B,则 C = A × B \mathbf{C}=\mathbf{A} \times \mathbf{B} C=A×B是一个 m × n m \times n m×n的矩阵;矩阵乘法是第一次用到三重循环的地方,代码参见:日撸 Java 三百行(01-10天,基本语法)第8天内容;

4.3 作业

  • 出数据,完成 3 × 2 3 \times 2 3×2 2 × 4 2 \times 4 2×4的乘法
    [ 1 4 0 1 2 3 ] × [ 2 3 1 0 0 4 2 1 ] = [ 2 19 9 4 0 4 2 1 2 18 8 3 ] \left[ \begin{matrix} 1&4\\ 0&1 \\ 2&3 \end{matrix} \right] \times \left[ \begin{matrix} 2&3&1&0\\ 0&4&2&1 \end{matrix} \right] = \left[ \begin{matrix} 2&19&9&4\\ 0&4&2&1 \\ 2&18&8&3 \end{matrix} \right] 102413 ×[20341201]= 20219418928413
    源码为:
$$
\left[\begin{matrix}1&4\\ 0&1 \\ 2&3 \end{matrix} \right]
\times
\left[ \begin{matrix} 2&3&1&0\\ 0&4&2&1 \end{matrix} \right]
=
\left[ \begin{matrix} 2&19&9&4\\ 0&4&2&1 \\ 2&18&8&3\end{matrix}\right]
$$

五、二元关系

  定义 A \mathbf{A} A B \mathbf{B} B,任何 R ⊆ A × B \mathbf{R} \subseteq \mathbf{A} \times \mathbf{B} RA×B都称为二元关系,源码为\mathbf{R} \subseteq \mathbf{A} \times \mathbf{B}。

5.1 常见的二元关系

  • 如果 A = B = N \mathbf{A} = \mathbf{B} = \mathbb{N} A=B=N(源码为\mathbf{A} = \mathbf{B} = \mathbb{N}),即它们都为整数集合,则 R = = { ( 0 , 0 ) , ( 1 , 1 ) , ( 2 , 2 ) , …   } \mathbf{R}^{=} = \{(0,0),(1,1),(2,2),\dots\} R=={(0,0),(1,1),(2,2),}(源码为\mathbf{R}^{=} = {(0,0),(1,1),(2,2),\dots});
  • 如果 A = B = R \mathbf{A} = \mathbf{B} = \mathbb{R} A=B=R(源码为\mathbf{A} = \mathbf{B} = \mathbb{R}),则 R < = { ( x , y ) ∈ R 2 ∣ x < y } \mathbf{R}^{<}=\{(x,y) \in \mathbb{R}^{2} \vert x<y\} R<={(x,y)R2x<y}(源码为\mathbf{R}^{<}={(x,y) \in \mathbb{R}^{2} \vert x<y}),在二维平面上,它表示 y = x y=x y=x左上方向的区域;
  • 稍微复杂一点的关系: ⊆ \subseteq (源码为\subseteq)
    U = { 1 , 2 } \mathbf{U}=\{1,2\} U={1,2},
    A = 2 U = { ∅ , { 1 } , { 2 } , { 1 , 2 } } \mathcal{A}=2^{\mathbf{U}}=\{\emptyset,\{1\},\{2\},\{1,2\}\} A=2U={,{1},{2},{1,2}},源码为:\mathcal{A}=2^{\mathbf{U}}={\emptyset,{1},{2},{1,2}};
    R ⊆ = { ( ∅ , ∅ ) , ( ∅ , { 1 } ) , ( ∅ , { 2 } ) , ( ∅ , { 1 , 2 } ) , ( { 1 } , { 1 } ) , ( { 1 } , { 1 , 2 } ) , ( { 2 } , { 2 } ) , ( { 2 } , { 1 , 2 } ) , ( { 1 , 2 } , { 1 , 2 } ) } \mathbf{R}^{\subseteq}=\{(\emptyset,\emptyset),(\emptyset,\{1\}),(\emptyset,\{2\}),(\emptyset,\{1,2\}),(\{1\},\{1\}),(\{1\},\{1,2\}),(\{2\},\{2\}),(\{2\},\{1,2\}),(\{1,2\},\{1,2\})\} R={(,),(,{1}),(,{2}),(,{1,2}),({1},{1}),({1},{1,2}),({2},{2}),({2},{1,2}),({1,2},{1,2})}

5.2 二元关系的性质

  对于 A \mathbf{A} A上的关系,即 R ⊆ A × A \mathbf{R} \subseteq \mathbf{A} \times \mathbf{A} RA×A(源码为\mathbf{R} \subseteq \mathbf{A} \times \mathbf{A})

  • 自反性:如果 ∀ x ∈ A \forall x \in \mathbf{A} xA(源码为\forall x \in \mathbf{A}),均有 ( x , x ) ∈ R (x,x) \in \mathbf{R} (x,x)R(源码为(x,x) \in \mathbf{R}),则称 R \mathbf{R} R具有自反性;
  • 对称性:如果 ∀ ( x , y ) ∈ R \forall (x,y) \in \mathbf{R} (x,y)R(源码为\forall (x,y) \in \mathbf{R}),均有 ( y , x ) ∈ R (y,x) \in \mathbf{R} (y,x)R(源码为(y,x) \in \mathbf{R}),则称 R \mathbf{R} R具有对称性;
  • 传递性:如果 ∀ ( x , y ) , ( y , x ) ∈ R \forall (x,y),(y,x) \in \mathbf{R} (x,y),(y,x)R(源码为\forall (x,y),(y,x) \in \mathbf{R}),均有 ( x , z ) ∈ R (x,z) \in \mathbf{R} (x,z)R(源码为(x,z) \in \mathbf{R}),则称 R \mathbf{R} R具有传递性;

5.3 等价关系与划分

  如果一个关系同时满足自反性、对称性、传递性,则称其为一个等价关系。
  例如:自然数“模3同余”就是一个等价关系(若a与b除以3的余数相同,那么a与b的关系就是模3同余关系)。
   R = { ( a , b ) ∈ N × N ∣ a m o d    3 = b m o d    3 } \mathbf{R}=\{(a,b) \in \mathbb{N} \times \mathbb{N} \vert a \mod 3 = b \mod 3\} R={(a,b)N×Namod3=bmod3},源码为:\mathbf{R}={(a,b) \in \mathbb{N} \times \mathbb{N} \vert a \mod 3 = b \mod 3};
   R = { ( 0 , 3 ) , ( 0 , 6 ) , ( 0 , 9 ) , … , ( 1 , 4 ) , ( 1 , 7 ) , … , ( 3 , 6 ) , …   } \mathbf{R}=\{(0,3),(0,6),(0,9),\dots,(1,4),(1,7),\dots,(3,6),\dots\} R={(0,3),(0,6),(0,9),,(1,4),(1,7),,(3,6),}

  • 等价关系导致了对元集合的一个划分 (partition),如:
    P = { { 0 , 3 , 6 , …   } , { 1 , 4 , 7 , …   } , { 2 , 5 , 8 , …   } } \mathcal{P}=\{\{0,3,6,\dots\},\{1,4,7,\dots\},\{2,5,8,\dots\}\} P={{0,3,6,},{1,4,7,},{2,5,8,}},源码为:\mathcal{P}={{0,3,6,\dots},{1,4,7,\dots},{2,5,8,\dots}};
    集簇(set family)使用mathcal;
  • 等价关系是一些数据挖掘方法(如粗糙集)的基础。例如:数据按照颜色、形状等符号型属性描述,则这些属性及其组会就获得了对象集的划分,于是抽象出一些规则:
    如果是红色的圆球,那么是塑料制品(正域);
    如果是绿色的长方块,那么是木制品(负域);
    如果是红色的长方块,那么既可能是塑料制品,也可能是木制品(边界域);

5.4 二元关系的应用

  在推荐系统中,用户集合与项目集合产生二元关系,可以是购买关系或浏览关系。该关系可以用一个 n × m n \times m n×m的 binary 矩阵描述,其中 n n n m m m 分别是用户数和项目数。协同过滤算法根据该矩阵确定向哪些用户推荐哪些项目。参见:推荐系统: 问题、算法与研究思路

5.5 二元关系的运算

  给定 A = { a , b , c , d } \mathbf{A}=\{a,b,c,d\} A={a,b,c,d}上的关系 R 1 = { ( a , b ) , ( a , c ) } \mathbf{R}_1=\{(a,b),(a,c)\} R1={(a,b),(a,c)} R 2 = { ( a , b ) , ( c , d ) , ( b , d ) } \mathbf{R}_2=\{(a,b),(c,d),(b,d)\} R2={(a,b),(c,d),(b,d)},则 R 2 ∘ R 1 = { ( a , d ) } \mathbf{R}_2 \circ \mathbf{R}_1=\{(a,d)\} R2R1={(a,d)},即:
   R 2 ∘ R 1 = { ( x , y ) ∣ ∃   ( x , z ) ∈ R 1  and  ( z , y ) ∈ R 2 } \mathbf{R}_2 \circ \mathbf{R}_1=\{(x,y) \vert \exists \ (x,z) \in \mathbf{R}_1 \textrm{ and } (z,y) \in \mathbf{R}_2 \} R2R1={(x,y)∣∃ (x,z)R1 and (z,y)R2},源码为:\mathbf{R}_2 \circ \mathbf{R}_1={(x,y) \vert \exists \ (x,z) \in \mathbf{R}_1 \textrm{ and } (z,y) \in \mathbf{R}_2 };
  给定 A = { a , b , c , d } \mathbf{A}=\{a,b,c,d\} A={a,b,c,d}上的关系 R \mathbf{R} R

  • 正闭包: R + = ⋃ i = 1 ∣ A ∣ R i \mathbf{R}^+=\bigcup_{i=1}^{\vert \mathbf{A} \vert} \mathbf{R}^i R+=i=1ARi,源码为:\mathbf{R}^{+} = \bigcup_{i=1}^{\vert \mathbf{A} \vert} \mathbf{R}^i;
  • 克林闭包: R ∗ = R + ∪ R 0 \mathbf{R}^{*} = \mathbf{R}^+ \cup \mathbf{R}^0 R=R+R0(源码为\mathbf{R}^{*} =\mathbf{R}^+ \cup \mathbf{R}^0),其中 R 0 = { ( x , x ) ∣ x ∈ A } \mathbf{R}^0 = \{(x,x) \vert x \in \mathbf{A}\} R0={(x,x)xA}
    注意:这里不是 R 1 ∘ R 2 \mathbf{R}_1 \circ \mathbf{R}_2 R1R2,与函数 g ( f ( x ) ) g(f(x)) g(f(x))的道理相同,先运算的放在后面。

5.6 作业

  • A = { 1 , 2 , 5 , 8 , 9 } \mathbf{A}=\{1,2,5,8,9\} A={1,2,5,8,9},写出 A \mathbf{A} A上的“模2同余”关系及相应的划分:

  答:由题可知:
   R = { ( x , y ) ∈ A × A ∣ x m o d    2 = y m o d    2 } \mathbf{R}=\{(x,y) \in \mathbf{A} \times \mathbf{A} \vert x \mod 2 = y \mod 2\} R={(x,y)A×Axmod2=ymod2}(源码为\mathbf{R}={(x,y) \in \mathbf{A} \times \mathbf{A} \vert x \mod 2 = y \mod 2})
   R = { ( 1 , 5 ) , ( 1 , 9 ) , ( 5 , 9 ) , ( 2 , 8 ) } \mathbf{R}=\{(1,5),(1,9),(5,9),(2,8)\} R={(1,5),(1,9),(5,9),(2,8)}
  划分如下: P = { { 1 , 5 , 9 } , { 2 , 8 } } \mathcal{P}=\{\{1,5,9\},\{2,8\}\} P={{1,5,9},{2,8}}

  • A = { 1 , 2 , 5 , 8 , 9 } \mathbf{A}=\{1,2,5,8,9\} A={1,2,5,8,9},给定两个关系 R 1 \mathbf{R}_1 R1 R 2 \mathbf{R}_2 R2 ,并计算 R 2 ∘ R 1 , R 1 + , R 1 ∗ \mathbf{R}_2\circ \mathbf{R}_1,\mathbf{R}_1^+,\mathbf{R}_1^* R2R1,R1+,R1(源码为 \mathbf{R}_2 \circ \mathbf{R}_1,\mathbf{R}_1^{+} ,\mathbf{R}_1^{*});

  答:假设: R 1 = { ( 1 , 2 ) , ( 5 , 8 ) } , R 2 = { ( 2 , 9 ) , ( 5 , 9 ) , ( 1 , 8 ) } \mathbf{R}_1=\{(1,2),(5,8)\},\mathbf{R}_2=\{(2,9),(5,9),(1,8)\} R1={(1,2),(5,8)},R2={(2,9),(5,9),(1,8)}
  由于: R 1 ∘ R 2 = { ( x , y ) ∣ ∃ ( x , z ) ∈ R 2  and  ( z , y ) ∈ R 1 } \mathbf{R}_1 \circ \mathbf{R}_2=\{(x,y) \vert \exists (x,z) \in \mathbf{R}_2 \textrm{ and } (z,y) \in \mathbf{R}_1 \} R1R2={(x,y)∣∃(x,z)R2 and (z,y)R1}(源码为\mathbf{R}_1 \circ \mathbf{R}_2={(x,y) \vert \exists (x,z) \in \mathbf{R}_2 \textrm{ and } (z,y) \in \mathbf{R}1 })
   R + = ⋃ i = 1 ∣ A ∣ R i \mathbf{R}^{+} = \bigcup_{i=1}^{\vert \mathbf{A} \vert} \mathbf{R}^i R+=i=1ARi(源码为\mathbf{R}^{+} = \bigcup
{i=1}^{\vert \mathbf{A} \vert} \mathbf{R}^i)
   R ∗ = R + ∪ R 0 \mathbf{R}^{*} =\mathbf{R}^+ \cup \mathbf{R}^0 R=R+R0,其中 R 0 = { ( x , x ) ∣ x ∈ A ) } \mathbf{R}^{0} = \{(\mathbf{x},\mathbf{x}) \vert \mathbf{x} \in \mathbf{A})\} R0={(x,x)xA)}(源码为\mathbf{R}^{*} =\mathbf{R}^+ \cup \mathbf{R}^0)
  因此: R 2 ∘ R 1 = { ( 1 , 9 ) } \mathbf{R}_2 \circ \mathbf{R}_1=\{(1,9)\} R2R1={(1,9)}
   R 1 + = ⋃ i = 1 ∣ A ∣ R 1 i = ⋃ i = 1 5 R 1 i = R 1 ∪ R 1 ∘ R 1 ∪ R 1 ∘ R 1 ∘ R 1 ∪ R 1 ∘ R 1 ∘ R 1 ∘ R 1 ∪ R 1 ∘ R 1 ∘ R 1 ∘ R 1 ∘ R 1 = R 1 = { ( 1 , 2 ) , ( 5 , 8 ) } ∪ ∅ ∪ ∅ ∪ ∅ ∪ ∅ = { ( 1 , 2 ) , ( 5 , 8 ) } \begin{aligned} \mathbf{R}^{+}_{1} &= \bigcup_{i=1}^{\vert \mathbf{A} \vert} \mathbf{R}^{i}_{1} = \bigcup_{i=1}^{5} \mathbf{R}^{i}_{1} \\ &= \mathbf{R}_{1} \cup \mathbf{R}_{1} \circ \mathbf{R}_{1} \cup \mathbf{R}_{1} \circ \mathbf{R}_{1} \circ \mathbf{R}_{1} \cup \mathbf{R}_{1} \circ \mathbf{R}_{1} \circ \mathbf{R}_{1} \circ \mathbf{R}_{1} \cup \mathbf{R}_{1} \circ \mathbf{R}_{1} \circ \mathbf{R}_{1} \circ \mathbf{R}_{1} \circ \mathbf{R}_{1} \\ &= \mathbf{R}_1=\{(1,2),(5,8)\} \cup \emptyset \cup \emptyset \cup \emptyset \cup \emptyset \\ &= \{(1,2),(5,8)\} \end{aligned} R1+=i=1AR1i=i=15R1i=R1R1R1R1R1R1R1R1R1R1R1R1R1R1R1=R1={(1,2),(5,8)}={(1,2),(5,8)}
R 0 = { ( x , x ) ∣ x ∈ A ) } = { ( 1 , 1 ) , ( 2 , 2 ) , ( 5 , 5 ) , ( 8 , 8 ) , ( 9 , 9 ) } \mathbf{R}^{0} = \{(\mathbf{x},\mathbf{x}) \vert \mathbf{x} \in \mathbf{A})\} = \{(1,1),(2,2),(5,5),(8,8),(9,9)\} R0={(x,x)xA)}={(1,1),(2,2),(5,5),(8,8),(9,9)}
R ∗ = R + ∪ R 0 = { ( 1 , 2 ) , ( 5 , 8 ) , ( 1 , 1 ) , ( 2 , 2 ) , ( 5 , 5 ) , ( 8 , 8 ) , ( 9 , 9 ) } \mathbf{R}^{*} =\mathbf{R}^+ \cup \mathbf{R}^0 = \{(1,2),(5,8),(1,1),(2,2),(5,5),(8,8),(9,9)\} R=R+R0={(1,2),(5,8),(1,1),(2,2),(5,5),(8,8),(9,9)}

  • 查阅粗糙集上下近似的定义并大致描述;

  在粗糙集理论中,对象可能属于多个不同的概念或类别,并且有时候我们并不能确定其准确的分类。为了处理这种不确定性,粗糙集理论引入了上下近似的概念。
  上近似是包含给定集合X元素的最小可定义集。 换句话说,上近似涵盖了所有可能属于某个概念或类别的对象,这包括了那些我们确定属于该概念的对象,也包括了那些我们不太确定但可能属于的对象。因此,上近似为我们提供了一个较大的范围,其中可能包含了所有与给定概念相关的对象。
  下近似是包含于X的最大可定义集。 这意味着下近似仅包括那些我们确定无疑地属于某个概念或类别的对象。与上近似相比,下近似的范围更窄,它只包含了那些我们确信符合给定概念的对象。
  通过上近似和下近似的定义,我们可以更好地理解粗糙集理论如何处理不确定性和模糊性。上近似提供了可能属于某个概念的对象集合的上界,而下近似则提供了下界。这两个近似集合共同描述了对象与给定概念之间的关系,从而帮助我们在不完全确定的情况下进行推理和决策。

  假设我们有一个关于水果的数据库,其中包含各种水果的颜色、形状和味道的信息。现在,我们想要根据这些信息来判断哪些水果属于“甜水果”的类别。
  首先,我们定义“甜水果”的概念,并尝试根据数据库中的信息来划分哪些水果属于这个类别。然而,由于水果的味道可能受到多种因素的影响,如成熟度、品种等,我们并不能完全确定每个水果是否属于“甜水果”类别。
  在这种情况下,我们可以使用粗糙集理论的上下近似来处理这种不确定性。下近似将包含那些我们确定属于“甜水果”类别的水果。这些水果在数据库中具有明确的、一致的甜味特征,我们可以毫无疑问地将它们归类为“甜水果”。上近似则包含所有可能属于“甜水果”类别的水果。除了那些确定属于甜水果的水果外,上近似还包括那些我们不太确定但可能具有甜味特征的水果。这些水果可能在数据库中的味道描述有些模糊或存在争议,但根据我们的知识,它们有可能属于“甜水果”类别。
  通过比较下近似和上近似,我们可以得到关于“甜水果”类别的不确定性区域。这个区域包括了那些我们不确定是否属于“甜水果”类别的水果,这些水果的归类可能需要更多的信息或进一步的分析。

补充

公式对齐

  • align环境可以用来对齐公式,使用&符号来标记对齐的位置,如下实例:
$$\begin{aligned}
\mathbf{R}^{+}_{1}
&= \bigcup_{i=1}^{\vert \mathbf{A} \vert} \mathbf{R}^{i}_{1} = \bigcup_{i=1}^{5} \mathbf{R}^{i}_{1} \\
&= \mathbf{R}_{1} \cup  \mathbf{R}_{1} \circ  \mathbf{R}_{1} \cup  \mathbf{R}_{1} \circ  \mathbf{R}_{1} \circ  \mathbf{R}_{1} \cup  \mathbf{R}_{1} \circ  \mathbf{R}_{1} \circ  \mathbf{R}_{1} \circ  \mathbf{R}_{1} \cup  \mathbf{R}_{1} \circ  \mathbf{R}_{1} \circ  \mathbf{R}_{1} \circ  \mathbf{R}_{1} \circ  \mathbf{R}_{1} \\
&= \mathbf{R}_1=\{(1,2),(5,8)\} \cup \emptyset \cup \emptyset  \cup \emptyset \cup \emptyset \\
&=  \{(1,2),(5,8)\}
\end{aligned}$$

  生成结果如下所示:
R 1 + = ⋃ i = 1 ∣ A ∣ R 1 i = ⋃ i = 1 5 R 1 i = R 1 ∪ R 1 ∘ R 1 ∪ R 1 ∘ R 1 ∘ R 1 ∪ R 1 ∘ R 1 ∘ R 1 ∘ R 1 ∪ R 1 ∘ R 1 ∘ R 1 ∘ R 1 ∘ R 1 = R 1 = { ( 1 , 2 ) , ( 5 , 8 ) } ∪ ∅ ∪ ∅ ∪ ∅ ∪ ∅ = { ( 1 , 2 ) , ( 5 , 8 ) } \begin{aligned} \mathbf{R}^{+}_{1} &= \bigcup_{i=1}^{\vert \mathbf{A} \vert} \mathbf{R}^{i}_{1} = \bigcup_{i=1}^{5} \mathbf{R}^{i}_{1} \\ &= \mathbf{R}_{1} \cup \mathbf{R}_{1} \circ \mathbf{R}_{1} \cup \mathbf{R}_{1} \circ \mathbf{R}_{1} \circ \mathbf{R}_{1} \cup \mathbf{R}_{1} \circ \mathbf{R}_{1} \circ \mathbf{R}_{1} \circ \mathbf{R}_{1} \cup \mathbf{R}_{1} \circ \mathbf{R}_{1} \circ \mathbf{R}_{1} \circ \mathbf{R}_{1} \circ \mathbf{R}_{1} \\ &= \mathbf{R}_1=\{(1,2),(5,8)\} \cup \emptyset \cup \emptyset \cup \emptyset \cup \emptyset \\ &= \{(1,2),(5,8)\} \end{aligned} R1+=i=1AR1i=i=15R1i=R1R1R1R1R1R1R1R1R1R1R1R1R1R1R1=R1={(1,2),(5,8)}={(1,2),(5,8)}

  • 使用\tag{1} 对公式进行标号:
$$f(x) = 2x + 5 \tag{1}$$

  生成结果如下所示:
f ( x ) = 2 x + 5 (1) f(x) = 2x + 5 \tag{1} f(x)=2x+5(1)

数学结构

结构源码结构源码
a b c x y z \frac{abc}{xyz} xyzabc\frac{abc}{xyz} f ′ f' ff’
a b c ‾ \overline{abc} abc\overline{abc} a b c ‾ \underline{abc} abc\underline{abc}
a b c → \overrightarrow{abc} abc \overrightarrow{abc} a b c ← \overleftarrow{abc} abc \overleftarrow{abc}
a b c \sqrt{abc} abc \sqrt{abc} a b c n \sqrt[n]{abc} nabc \sqrt[n]{abc}
a b c ^ \widehat{abc} abc \widehat{abc} a b c ~ \widetilde{abc} abc \widetilde{abc}
a b c ⏞ \overbrace{abc} abc \overbrace{abc} a b c ⏟ \underbrace{abc} abc\underbrace{abc}

定界符

符号源码符号源码
∣ \vert \vert ∥ \Vert \Vert
{ \{ {\ { } \} }\ }
⌊ \lfloor \lfloor ⌋ \rfloor \lfloor
⌈ \lceil \lceil ⌉ \rceil \rceil
⇑ \Uparrow \Uparrow ⇓ \Downarrow \Downarrow
↑ \uparrow \uparrow ↓ \downarrow \downarrow
⟨ \langle \langle ⟩ \rangle \rangle
⌞ \llcorner \llcorner ⌟ \lrcorner \lrcorner
/ / // \ \backslash \\backslash
  • 9
    点赞
  • 30
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值