# 单射、满射与双射

**单射、满射与双射**是函数可以具有的三种性质，由函数的输出如何覆盖其陪域来定义。如果没有任何两个输入共享同一个输出，则函数是单射的（一对一）；如果陪域的每个元素都是某个输出，则函数是满射的（映上）；如果两者同时成立，使得陪域的每个元素恰好是定义域中一个元素的像，则函数是双射的。<sup>[1](https://discrete.openmathbooks.org/preview/sec_intro-functions.html)</sup>这些性质是比较集合大小的标准工具，包括无限集，也是组合数学中双射证明的基础。<sup>[2](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Transition_to_Higher_Mathematics_%28Dumas_and_McCarthy%29/01%3A_New_Page/1.04%3A_New_Page)</sup>

| 关键事实 | 细节 |
|---|---|
| 单射 | 陪域的每个元素至多是定义域中一个元素的像；等价地，\( f(x) = f(x') \) 蕴含 \( x = x' \)<sup>[1](https://discrete.openmathbooks.org/preview/sec_intro-functions.html)</sup><sup> • </sup><sup>[3](https://www.whitman.edu/Documents/Academics/Mathematics/crytser.pdf)</sup> |
| 满射 | 陪域的每个元素至少是定义域中一个元素的像；值域等于陪域<sup>[1](https://discrete.openmathbooks.org/preview/sec_intro-functions.html)</sup> |
| 双射 | 既是单射又是满射的函数；陪域的每个元素恰好是定义域中一个元素的像<sup>[1](https://discrete.openmathbooks.org/preview/sec_intro-functions.html)</sup> |
| 陪域依赖性 | 函数是否为满射取决于所声明的陪域；函数总是满射到其值域上<sup>[2](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Transition_to_Higher_Mathematics_%28Dumas_and_McCarthy%29/01%3A_New_Page/1.04%3A_New_Page)</sup> |
| 置换 | 从集合到自身的双射，\( f: X \mapsto X \)<sup>[2](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Transition_to_Higher_Mathematics_%28Dumas_and_McCarthy%29/01%3A_New_Page/1.04%3A_New_Page)</sup> |
| 基数 | 两个集合基数相同，当且仅当它们之间存在双射<sup>[4](https://opentext.uleth.ca/Combinatorics/ch_bjections.html)</sup> |
| 组合用途 | 双射给出恒等式的组合证明，例如通过补集映射证明 \( \binom{n}{k} = \binom{n}{n-k} \)<sup>[5](https://enumeration.ca/toolbox/bijections/)</sup> |

## 定义

设 \( f: X \to Y \) 是一个以 \( X \) 为定义域、\( Y \) 为陪域的函数。\( f \) 的值域是所有输出的集合，是陪域的一个子集。<sup>[1](https://discrete.openmathbooks.org/preview/sec_intro-functions.html)</sup>三种性质于是用陪域来表述：<sup>[1](https://discrete.openmathbooks.org/preview/sec_intro-functions.html)</sup>

- **单射。** 陪域的每个元素至多是定义域中一个元素的像。等价地，\( f(x) = f(x') \) 蕴含 \( x = x' \)：不同的输入给出不同的输出。<sup>[3](https://www.whitman.edu/Documents/Academics/Mathematics/crytser.pdf)</sup>
- **满射。** 陪域的每个元素至少是定义域中一个元素的像，因此陪域中没有任何元素被遗漏，值域等于陪域。<sup>[1](https://discrete.openmathbooks.org/preview/sec_intro-functions.html)</sup>
- **双射。** 两个条件同时成立，因此陪域的每个元素恰好是定义域中一个元素的像。<sup>[1](https://discrete.openmathbooks.org/preview/sec_intro-functions.html)</sup>

两种性质都由陪域中元素的情况决定：一个元素可能作为像被重复，也可能被完全遗漏。单射函数没有重复但可能遗漏元素；满射函数不遗漏任何元素但可能有重复；双射函数两者皆无。<sup>[1](https://discrete.openmathbooks.org/preview/sec_intro-functions.html)</sup>

这两个条件并非对立。一个函数可以是满射而非单射、单射而非满射、两者皆是，或两者皆非。<sup>[1](https://discrete.openmathbooks.org/preview/sec_intro-functions.html)</sup>例如，\( f: \mathbb{Z} \to \mathbb{Z} \) 且 \( f(n) = 3n \) 是单射，因为只有 \( n/3 \) 映到三的倍数，而非三的倍数根本不被命中；但它不是满射，因为大多数整数不是三的倍数。<sup>[1](https://discrete.openmathbooks.org/preview/sec_intro-functions.html)</sup>一个从 \( \{1,2,3\} \) 到 \( \{a,b,c\} \) 的函数 \( g \)，把 2 和 3 都映到 \( a \)，既不是单射（两个输入共享一个输出）也不是满射（元素 \( b \) 从未被命中）。<sup>[1](https://discrete.openmathbooks.org/preview/sec_intro-functions.html)</sup>

## 陪域的作用

函数是否为满射取决于陪域的选择。函数总是满射到其值域上。人们可能会问，为什么不干脆把陪域定义为值域，这样每个函数都是满射了；一个原因是，兴趣往往在于关联两个选定的集合，而非它们之间的某个特定函数。<sup>[2](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Transition_to_Higher_Mathematics_%28Dumas_and_McCarthy%29/01%3A_New_Page/1.04%3A_New_Page)</sup>同样的敏感性也适用于单射：从整数到整数的 \( f(n) = 3n \) 是单射，只有当陪域限制为三的倍数时它才成为双射。<sup>[1](https://discrete.openmathbooks.org/preview/sec_intro-functions.html)</sup>

## 双射与基数

如果两个集合之间存在双射，则它们具有相同的基数。<sup>[4](https://opentext.uleth.ca/Combinatorics/ch_bjections.html)</sup>这个定义同样适用于有限集和无限集，是比较无限集大小的基础，这一应用已导致数学基础中的深刻结果。<sup>[2](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Transition_to_Higher_Mathematics_%28Dumas_and_McCarthy%29/01%3A_New_Page/1.04%3A_New_Page)</sup>一个单射 \( f: X \to Y \) 表明 \( X \) 不大于 \( Y \)，因为 \( f \) 是从 \( X \) 到其像（\( Y \) 的子集）上的双射；一个满射 \( f: X \to Y \) 则在相应意义上表明 \( Y \) 不大于 \( X \)。

对于有限集，从集合到自身的单射函数自动是满射，从集合到自身的满射函数自动是单射，这是鸽笼原理的推论。对于无限集，两个蕴含都失效。映射 \( f(n) = n + 1 \) 是从自然数到排除零的自然数的双射，而正整数与其平方之间的对应是 \( \mathbb{N} \) 与其真子集之间的双射。<sup>[3](https://www.whitman.edu/Documents/Academics/Mathematics/crytser.pdf)</sup><sup> • </sup><sup>[6](https://mathshistory.st-andrews.ac.uk//HistTopics/Functions/)</sup>集合能与自身的真子集匹配，这一可能性正是无限基数的定义性行为。

从集合到自身的双射 \( f: X \mapsto X \) 称为 \( X \) 的一个置换。例如，\( f(x) = x + 1 \) 是整数的一个置换，\( f(x) = -x \) 是 \( \{0, 1, -1\} \) 的一个置换。<sup>[2](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Transition_to_Higher_Mathematics_%28Dumas_and_McCarthy%29/01%3A_New_Page/1.04%3A_New_Page)</sup>

## 双射在结构上的重要性

函数将集合彼此关联。单射可以在一个集合中“解释”另一个集合：如果它保留了定义域的关键信息，那么通过重新命名其元素，定义域实际上可以被视为陪域的一个子集。一个保留关键结构特征的双射让数学家可以把定义域和陪域视为实质上相同的集合。哪些特征重要取决于领域：在代数中是结构的运算，在几何中是形状。<sup>[2](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Transition_to_Higher_Mathematics_%28Dumas_and_McCarthy%29/01%3A_New_Page/1.04%3A_New_Page)</sup>这就是整个数学中同构背后的机制，其中把一个对象的结构携带到另一个对象的双射使两个表面上不同的对象可以互换。

## 组合数学中的双射证明

在组合数学中，两个集合之间的双射证明它们具有相同数量的元素，从而给出计数恒等式的组合证明。标准方法是找到集合 \( A \) 和 \( B \)，其大小是恒等式的两边，然后展示它们之间的一个双射；第二种方法用两种不同方式计数同一个集合。<sup>[5](https://enumeration.ca/toolbox/bijections/)</sup>这样的证明通过赋予等式两边意义而非符号操作来表明相等。<sup>[5](https://enumeration.ca/toolbox/bijections/)</sup>

一个经典例子证明 \( \binom{n}{k} = \binom{n}{n-k} \)。设 \( A \) 为 \( [n] = \{1, \dots, n\} \) 的所有 \( k \) 元子集组成的集合，\( B \) 为其所有 \( (n-k) \) 元子集组成的集合。补集映射 \( f(S) = [n] \setminus S \) 把 \( A \) 送到 \( B \)，应用两次回到原集合，所以 \( f \) 是一个以自身为逆的双射；因此两个计数相等。<sup>[5](https://enumeration.ca/toolbox/bijections/)</sup>类似地，\( 2^n = \sum_{k=0}^{n} \binom{n}{k} \) 来自按大小把 \( [n] \) 的所有子集分成不相交的类。<sup>[5](https://enumeration.ca/toolbox/bijections/)</sup>

这一技术远远超出初等恒等式。专门研究双射组合学的大学课程涵盖分拆、合成、置换、避免模式的置换、格路、标准杨表、交错符号矩阵的双射，以及五边形数定理、关于树数的凯莱公式、钩长公式等结果的双射证明。<sup>[7](https://math.dartmouth.edu/~m108s26/)</sup>组合数学中一些最难的证明涉及双射。<sup>[8](https://mathweb.ucsd.edu/~jverstra/bijections.pdf)</sup>同样的论证风格也出现在计算复杂性中，其中通过把一个问题与已知属于某一类（如 NP）的问题相关联，来证明它属于该类。<sup>[4](https://opentext.uleth.ca/Combinatorics/ch_bjections.html)</sup>

## 历史背景

单射和满射的词汇是现代的，但底层现象在被命名之前几个世纪就已被注意到。1638 年，伽利略（Galileo）研究了两个同心圆，其中大圆的直径是小圆的两倍：从圆心出发的每条射线恰好与两个圆各交于一点，给出它们点之间的双射，尽管一个周长是另一个的两倍。他还给出了每个正整数与其平方的经典配对——现在会被描述为 \( \mathbb{N} \) 与其真子集之间的双射。<sup>[6](https://mathshistory.st-andrews.ac.uk//HistTopics/Functions/)</sup>这些观察表明，几何对象的点数与其长度度量可以分离，且无限集的行为与有限集不同，这两个事实正是后来发展出单射-满射-双射词汇来精确表述的。

## References

1. [Functions, Discrete Mathematics (Levin et al., OpenMathBooks)](https://discrete.openmathbooks.org/preview/sec_intro-functions.html)
2. [1.4: Injections, Surjections, Bijections, Dumas & McCarthy, Transition to Higher Mathematics, Mathematics LibreTexts](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Transition_to_Higher_Mathematics_%28Dumas_and_McCarthy%29/01%3A_New_Page/1.04%3A_New_Page)
3. [Some Set Theory, Whitman College](https://www.whitman.edu/Documents/Academics/Mathematics/crytser.pdf)
4. [Bijections and Combinatorial Proofs, An Introduction to Combinatorics, University of Lethbridge](https://opentext.uleth.ca/Combinatorics/ch_bjections.html)
5. [Bijections, An Invitation to Enumeration](https://enumeration.ca/toolbox/bijections/)
6. [Function concept, MacTutor History of Mathematics, University of St Andrews](https://mathshistory.st-andrews.ac.uk//HistTopics/Functions/)
7. [Math 108: Bijective Combinatorics, Spring 2026, Dartmouth College](https://math.dartmouth.edu/~m108s26/)
8. [Note on Combinatorial Proofs, UC San Diego](https://mathweb.ucsd.edu/~jverstra/bijections.pdf)

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

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学 › General discrete mathematics and discrete structures › Combinatorics › Algebraic and analytic combinatorics › Bijective methods and combinatorial identities

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/bijection-injection-and-surjection

English original: https://www.edgepedia.org/bijection-injection-and-surjection
