# 二元运算符 · 加减乘除之外

> 加减乘除只是开始。乘号该用 \times 还是 \cdot、集合的并交 \cup \cap、代数的直和张量积 \oplus \otimes、集合差 \setminus——这一章把常用的二元运算符按用途列全。

- 作者：David（道雾轩）
- 专栏：LaTeX 完全上手指南（https://daiw.org/manual/latex.md）
- 最后更新：2026-07-13
- 原文：https://daiw.org/manual/latex/binary-operators
- 转载与引用：请注明出处并附原文链接（https://daiw.org/about/copyright）

# 二元运算符 · 加减乘除之外

**二元运算符(binary operator)** 是「夹在两个东西中间」的符号：$a + b$ 的加号、$a \times b$ 的乘号、$A \cup B$ 的并集号。它们在 TeX 的分类里自成一类，LaTeX 会自动在它们两边留出合适的间距。加减号(`+` `-`)直接敲键盘，其余的看这一章。

## 最日常的一批

| 命令 | 效果 | 名称 / 用途 |
| --- | --- | --- |
| `\pm` | $\pm$ | 正负号 |
| `\mp` | $\mp$ | 负正号 |
| `\times` | $\times$ | 乘号（叉乘、笛卡尔积） |
| `\div` | $\div$ | 除号 |
| `\cdot` | $\cdot$ | 点乘（标量相乘） |
| `\ast` | $\ast$ | 星号（卷积） |
| `\star` | $\star$ | 五角星 |
| `\circ` | $\circ$ | 复合（函数复合 $f \circ g$） |
| `\bullet` | $\bullet$ | 实心点 |
| `\setminus` | $\setminus$ | 集合差 $A \setminus B$ |

<Callout type="info">
  **乘号用 `\times` 还是 `\cdot`？** 看语义：`\times` $\times$ 用于**叉乘、笛卡尔积、数字相乘**（$2 \times 3$、$A \times B$）；`\cdot` $\cdot$ 用于**代数里的标量相乘**（$a \cdot b$，或干脆省略写 $ab$）。别用字母 `x` 冒充乘号——那是变量。多数代数式里，相邻直接相乘（不写符号）最干净，要写就 `\cdot`。
</Callout>

## 集合运算

| 命令 | 效果 | 名称 |
| --- | --- | --- |
| `\cup` | $\cup$ | 并集 |
| `\cap` | $\cap$ | 交集 |
| `\uplus` | $\uplus$ | 多重并 |
| `\sqcup` | $\sqcup$ | 不交并 |
| `\sqcap` | $\sqcap$ | 方交 |
| `\vee` | $\vee$ | 逻辑或 / 上确界 |
| `\wedge` | $\wedge$ | 逻辑与 / 下确界 |
| `\setminus` | $\setminus$ | 差集 |
| `\amalg` | $\amalg$ | 余积 |

$A \cup B$、$A \cap B$、$A \setminus B$ 是集合运算三件套。逻辑里的「与 / 或」也复用 $\wedge$ / $\vee$（与集合的交并同形，靠上下文区分）。

## 代数与「圈里 / 框里」运算

抽象代数、张量、编码里，常见「符号外面套个圈或框」的运算：

| 命令 | 效果 | 命令 | 效果 |
| --- | --- | --- | --- |
| `\oplus` | $\oplus$ | `\ominus` | $\ominus$ |
| `\otimes` | $\otimes$ | `\oslash` | $\oslash$ |
| `\odot` | $\odot$ | `\circledcirc` | $\circledcirc$ |
| `\boxplus` | $\boxplus$ | `\boxtimes` | $\boxtimes$ |
| `\boxminus` | $\boxminus$ | `\boxdot` | $\boxdot$ |

$\oplus$ 直和 / 异或、$\otimes$ 张量积 / 克罗内克积、$\odot$ 逐元素乘（哈达玛积，深度学习里常见）——都是「基础运算 + 一个圈」的记号。

## 其它

| 命令 | 效果 | 命令 | 效果 |
| --- | --- | --- | --- |
| `\dagger` | $\dagger$ | `\ddagger` | $\ddagger$ |
| `\wr` | $\wr$ | `\diamond` | $\diamond$ |
| `\triangleleft` | $\triangleleft$ | `\triangleright` | $\triangleright$ |
| `\bigtriangleup` | $\bigtriangleup$ | `\bigtriangledown` | $\bigtriangledown$ |

$\dagger$ 常表示共轭转置($A^\dagger$)或对偶。

<Callout type="info">
  **这些符号的「大号求和版」**：很多二元运算符有对应的**巨算符**（见 [巨算符一章](https://daiw.org/manual/latex/big-operators)）——$\cup$ 对 $\bigcup$、$\oplus$ 对 $\bigoplus$、$\otimes$ 对 $\bigotimes$、$\vee$ 对 $\bigvee$。规律是「`\big` + 运算符名」。二元的用在两项之间，巨算符版用在「对一族求并 / 求和」。
</Callout>

## 小结与下一章

二元运算符按用途记最省力：日常算术（$\pm$ `\pm`、$\times$ `\times`、$\cdot$ `\cdot`）、集合（$\cup$ `\cup`、$\cap$ `\cap`、$\setminus$ `\setminus`）、代数圈框（$\oplus$ `\oplus`、$\otimes$ `\otimes`、$\odot$ `\odot`）。记住乘号按语义选 `\times` / `\cdot`，别用字母 x。

运算符把量「算」到一起，而**关系符**把量「比」起来：相等、大于小于、包含、约等于……下一章讲关系符，数量同样庞大、同样按用途归类。👉 [关系符：相等、大小与包含](https://daiw.org/manual/latex/relations)。

## 参考文献

- [1] Overleaf.「List of Greek letters and math symbols — Operators.」https://www.overleaf.com/learn/latex/List_of_Greek_letters_and_math_symbols —— 运算符符号表。
- [2] KaTeX.「Supported Functions — Binary Operators.」https://katex.org/docs/supported.html#binary-operators —— 本站可用二元运算符。
