# 恒等（数学）

在数学中，恒等（identity）指两个相关概念之一：一是代数结构中的某个元素，当它与任何其他元素结合时都不改变后者（即单位元，也称中性元）；二是一个对其变量的一切取值都成立的方程。两种含义表达的是同一个底层观念——某种不改变任何东西的东西：任何数加上0都保持不变，任何数乘以1都保持不变，而命题 \(a + 0 = a\) 无论 \(a\) 取何值都为真。

| 关键事实 | 详情 |
|---|---|
| 单位元 | 二元结构 \((X, \star)\) 中的元素 \(e\)，对所有 \(x \in X\) 满足 \(e \star x = x\) 且 \(x \star e = x\)<sup>[1](https://www.math.ucla.edu/~sharifi/notes/algebra-ch02.html)</sup> |
| 唯一性 | 若 \(e\) 与 \(e'\) 都满足双侧单位元等式，则 \(e = e \star e' = e'\)；双侧单位元只要存在，就是唯一的<sup>[2](https://itamar.web.illinois.edu/Teaching/417_FW26/Notes/node-What-is-abstract-algebra-anyway.html)</sup> |
| 单侧单位元 | 左单位元满足 \(e \star x = x\)，右单位元满足 \(x \star e = x\)；一个结构可以有好几个左单位元而没有任何右单位元<sup>[1](https://www.math.ucla.edu/~sharifi/notes/algebra-ch02.html)</sup> |
| 结构中的地位 | 带有单位元的半群是幺半群；每个元素都有逆元的幺半群是群<sup>[2](https://itamar.web.illinois.edu/Teaching/417_FW26/Notes/node-What-is-abstract-algebra-anyway.html)</sup> |
| 恒等式 | 对其变量的一切取值都成立的方程，如 \(a + 0 = a\) 或 \(a \cdot 1 = a\)；相比之下，\(x + 3 = 7\) 仅在 \(x = 4\) 时成立<sup>[3](https://mathbyfirstprinciples.org/intro-to-algebra/language-of-algebra/from-arithmetic-to-algebra/)</sup> |
| 标准例子 | 加法中的0、乘法中的1、并集运算中的空集、交集运算中的全集、复合运算中的恒等函数、串接运算中的空串<sup>[4](https://www.maths.tcd.ie/~stalker/2023-2024/11602/notes/9.3-identity-elements-monoids.html)</sup><sup> • </sup><sup>[5](https://zoo.cs.yale.edu/classes/cs201/spring_2025/lectures/Strings.html)</sup> |

## 单位元

设集合 \(X\) 上带有一个二元运算 \(\star\)，即把 \(X\) 中任意两个元素组合成第三个元素的规则。若对每个 \(x\) 都有 \(e \star x = x\)，则元素 \(e \in X\) 称为左单位元；若对每个 \(x\) 都有 \(x \star e = x\)，则称为右单位元。同时满足两者的元素就是该结构的单位元<sup>[1](https://www.math.ucla.edu/~sharifi/notes/algebra-ch02.html)</sup>。双侧条件很重要：在整数减法下，0是右单位元，因为 \(x - 0 = x\)；但不存在左单位元，因为 \(0 - x\) 只有在 \(x = 0\) 时才等于 \(x\)<sup>[1](https://www.math.ucla.edu/~sharifi/notes/algebra-ch02.html)</sup>。

**唯一性。** 双侧单位元不可能不唯一。若 \(e\) 与 \(e'\) 都满足两个等式，则 \(e = e \star e' = e'\)：第一个等号把 \(e'\) 用作右单位元，第二个等号把 \(e\) 用作左单位元<sup>[2](https://itamar.web.illinois.edu/Teaching/417_FW26/Notes/node-What-is-abstract-algebra-anyway.html)</sup>。同样的单行论证表明：若一个结构有左单位元 \(e\) 和右单位元 \(f\)，则 \(e = f\)，且该元素就是完整的单位元<sup>[1](https://www.math.ucla.edu/~sharifi/notes/algebra-ch02.html)</sup>。然而，仅有单侧单位元时未必唯一：在二元集合 \(\{a, b\}\) 上，若运算由“每个乘积都返回其右操作数”的乘法表给出，则 \(a\) 和 \(b\) 都是左单位元，而根本不存在右单位元<sup>[1](https://www.math.ucla.edu/~sharifi/notes/algebra-ch02.html)</sup>。半群甚至可以有无限多个右单位元；在左零半群中，每个元素都满足 \(ab = a\)，因而每个元素都是右单位元<sup>[6](https://webpages.charlotte.edu/~ghetyei/courses/old/F21.3163/monoids_optional.pdf)</sup>。

**在结构层级中的位置。** 单位元的存在划出了若干标准代数结构之间的界线。带有满足结合律的二元运算的集合是半群；带有单位元的半群是幺半群；若幺半群中每个元素 \(x\) 都有逆元 \(y\) 满足 \(x \star y = e = y \star x\)，则它是群<sup>[2](https://itamar.web.illinois.edu/Teaching/417_FW26/Notes/node-What-is-abstract-algebra-anyway.html)</sup>。通常给出的现代群定义把封闭性、结合律、对所有 \(x\) 满足 \(ex = xe = x\) 的单位元 \(e\)、以及逆元列为公理<sup>[7](https://mathshistory.st-andrews.ac.uk/HistTopics/Abstract_groups/)</sup>。由于单位元唯一，人们可以说群或幺半群的*那个*单位元；它通常记作 \(e\)，运算写成乘法时记作1，写成加法时记作0<sup>[8](https://math.umd.edu/~pbrosnan/notes/ugalg/sect0011.html)</sup>。

## 例子与非例子

单位元取决于运算，而不只取决于集合本身。在同样的底层集合上，无论元素是整数、有理数、实数、复数、向量、矩阵还是函数，0都是加法的单位元，1都是乘法的单位元；在函数复合下，单位元是函数 \(f(x) = x\)；在幂集上的并集运算下，单位元是空集；在交集运算下，单位元是全集<sup>[1](https://www.math.ucla.edu/~sharifi/notes/algebra-ch02.html)</sup>。在计算机科学中，空串是串接运算的单位元，这使字母表上所有字符串构成的集合成为幺半群<sup>[5](https://zoo.cs.yale.edu/classes/cs201/spring_2025/lectures/Strings.html)</sup>。

有些结合运算根本没有单位元。自然数上的最小值运算就没有，因为要对所有 \(x\) 都有 \(\min(i, x) = x\)，就要求 \(i\) 不小于每个自然数<sup>[4](https://www.maths.tcd.ie/~stalker/2023-2024/11602/notes/9.3-identity-elements-monoids.html)</sup>。偶数上的乘法既无左单位元也无右单位元，因为没有偶数满足 \(2n \cdot e = 2n\)<sup>[1](https://www.math.ucla.edu/~sharifi/notes/algebra-ch02.html)</sup>。正整数在加法下构成半群但不是幺半群，因为所需的单位元0不在该集合中<sup>[9](https://cs.yale.edu/homes/aspnes/pinewiki/AlgebraicStructures.html)</sup>。

没有单位元的半群总可以通过添加一个新元素并规定它为中性元而变成幺半群，这一构造从任何半群都能产生一个幺半群<sup>[9](https://cs.yale.edu/homes/aspnes/pinewiki/AlgebraicStructures.html)</sup>。

## 作为方程的恒等式

在初等代数中，恒等一词还有第二个更古老的含义：对其变量的一切取值都成立的方程。方程 \(x + 3 = 7\) 恰好对一个值 \(x = 4\) 成立，称为条件方程；\(a + 0 = a\) 对 \(a\) 的一切取值都成立，是恒等式；\(x + 1 = x\) 对任何值都不成立<sup>[3](https://mathbyfirstprinciples.org/intro-to-algebra/language-of-algebra/from-arithmetic-to-algebra/)</sup><sup> • </sup><sup>[10](https://math.oit.edu/~paulr/Texts/notes_M112.pdf)</sup>。恒等式必须对所有代入值都成立；一个反例就足以推翻一个自称的恒等式，而无论多少个有限的验证例子都不足以证明它；证明需要从本身普遍成立的定律出发推导出该命题<sup>[11](https://www.cimt.org.uk/projects/mepres/allgcse/unitpbk.pdf)</sup><sup> • </sup><sup>[3](https://mathbyfirstprinciples.org/intro-to-algebra/language-of-algebra/from-arithmetic-to-algebra/)</sup>。

交换律 \(x + y = y + x\) 和结合律 \(x + (y + z) = (x + y) + z\) 就是这种意义上的恒等式：对其变量的一切适用取值都成立的方程<sup>[12](https://plato.stanford.edu/entries/algebra/)</sup>。两个表达式等价，恰好当它们是某个恒等式的两边、对每个输入都一致；\(2(x + 3)\) 与 \(2x + 6\) 等价，因为分配律对每个数都成立<sup>[3](https://mathbyfirstprinciples.org/intro-to-algebra/language-of-algebra/from-arithmetic-to-algebra/)</sup>。

这个词的两种含义直接相通。算术中的单位元定律，如 \(a + 0 = a\) 和 \(a \cdot 1 = a\)，作为方程是恒等式，同时它们又断言0和1分别是加法和乘法的单位元<sup>[3](https://mathbyfirstprinciples.org/intro-to-algebra/language-of-algebra/from-arithmetic-to-algebra/)</sup>。

## 特定结构的恒等

线性代数提供了两个熟悉的实例。对每个向量空间 \(V\)，都有恒等变换 \(I_V\)，对所有 \(\mathbf{x}\) 满足 \(I_V \mathbf{x} = \mathbf{x}\)；\(\mathbb{F}^n\) 上恒等变换的矩阵是 \(n \times n\) 单位矩阵，主对角线为1，其余为0；对任何线性变换 \(A\)，乘积 \(AI\) 与 \(IA\) 都等于 \(A\)<sup>[13](https://www.math.brown.edu/streil/papers/LADW/HTML_2026_04-30/Ch1.html)</sup>。

范畴论把单位元推广为恒等态射。范畴为每个对象 \(x\) 指定一个态射 \(\mathrm{id}_x \in \mathcal{C}(x, x)\)，使得对每个态射 \(f\) 都有 \(\mathrm{id}_y \circ f = f \circ \mathrm{id}_x = f\)，且这个恒等态射是唯一的<sup>[14](https://www.math.uni-hamburg.de/en/personen/dyckerhoff/higher/notes.pdf)</sup><sup> • </sup><sup>[15](https://www.sciencedirect.com/topics/mathematics/identity-morphism)</sup>。幺半群在这里重现为只有一个对象的范畴，其恒等态射就是该幺半群的单位元<sup>[14](https://www.math.uni-hamburg.de/en/personen/dyckerhoff/higher/notes.pdf)</sup>。

## 历史注记

恒等一词是以方程含义进入代数的。在17和18世纪，代数被理解为对代数符号进行计算的科学，即对由字母组成的公式作“恒等”变换，以区别于用具体数字计算的算术<sup>[16](https://encyclopediaofmath.org/index.php?title=Algebra%282%29)</sup>。抽象的、公理化的处理出现得更晚：整个19世纪，群的抽象定义仍属旁支，置换群占据主导；以单位元为公理之一的现代四公理定义，在20世纪之交前后才定型<sup>[7](https://mathshistory.st-andrews.ac.uk/HistTopics/Abstract_groups/)</sup><sup> • </sup><sup>[16](https://encyclopediaofmath.org/index.php?title=Algebra%282%29)</sup>。在现代结构观点下，抽象代数固定一组方程，研究那些使这些方程恒成立的结构；取整数在加法、减法、乘法以及常数0和1下成立的那些恒等式，恰好得到带单位的交换环<sup>[12](https://plato.stanford.edu/entries/algebra/)</sup>。

## References

1. [Romyar Sharifi, Abstract Algebra, Chapter 2: Group theory, UCLA](https://www.math.ucla.edu/~sharifi/notes/algebra-ch02.html)
2. [MATH 417: Introduction to abstract algebra, University of Illinois](https://itamar.web.illinois.edu/Teaching/417_FW26/Notes/node-What-is-abstract-algebra-anyway.html)
3. [From Arithmetic to Algebra, Math by First Principles](https://mathbyfirstprinciples.org/intro-to-algebra/language-of-algebra/from-arithmetic-to-algebra/)
4. [Identity elements, monoids, Trinity College Dublin lecture notes](https://www.maths.tcd.ie/~stalker/2023-2024/11602/notes/9.3-identity-elements-monoids.html)
5. [Strings, Yale CS 201 lecture notes](https://zoo.cs.yale.edu/classes/cs201/spring_2025/lectures/Strings.html)
6. [Semigroups, monoids, groups and rings, UNC Charlotte course notes](https://webpages.charlotte.edu/~ghetyei/courses/old/F21.3163/monoids_optional.pdf)
7. [Abstract groups, MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk/HistTopics/Abstract_groups/)
8. [UMD 403: Undergraduate Algebra, Monoids and Groups](https://math.umd.edu/~pbrosnan/notes/ugalg/sect0011.html)
9. [Algebraic Structures, Yale University (James Aspnes)](https://cs.yale.edu/homes/aspnes/pinewiki/AlgebraicStructures.html)
10. [An equation, M112 notes, Oregon Institute of Technology](https://math.oit.edu/~paulr/Texts/notes_M112.pdf)
11. [MEP Pupil Text, Additional Material, CIMT](https://www.cimt.org.uk/projects/mepres/allgcse/unitpbk.pdf)
12. [Algebra, Stanford Encyclopedia of Philosophy](https://plato.stanford.edu/entries/algebra/)
13. [Linear Algebra Done Wrong, Chapter 1, Sergei Treil, Brown University](https://www.math.brown.edu/streil/papers/LADW/HTML_2026_04-30/Ch1.html)
14. [Category Theory lecture notes, University of Hamburg](https://www.math.uni-hamburg.de/en/personen/dyckerhoff/higher/notes.pdf)
15. [Identity Morphism, ScienceDirect Topics overview](https://www.sciencedirect.com/topics/mathematics/identity-morphism)
16. [Algebra(2), Encyclopedia of Mathematics](https://encyclopediaofmath.org/index.php?title=Algebra%282%29)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Arithmetic and number systems › Elementary and formal arithmetic › Properties and laws of arithmetic

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/identity-mathematics

English original: https://www.edgepedia.org/identity-mathematics
