# 符号函数

符号函数（sign function），亦称 signum 函数，记作 \( \operatorname{sgn} x \) 或 \( \operatorname{sign} x \)，是实变量的函数：当 \( x \) 为正时取值 1，当 \( x \) 为零时取值 0，当 \( x \) 为负时取值 −1<sup>[1](https://encyclopediaofmath.org/wiki/Signum)</sup>。它提取实数的符号而舍弃其大小，并可自然地推广到复数，表示非零复值的方向<sup>[1](https://encyclopediaofmath.org/wiki/Signum)</sup>。

| 关键事实 | 详情 |
|---|---|
| 定义 | \( \operatorname{sgn} x = 1 \)（若 \( x>0 \)），\( 0 \)（若 \( x=0 \)），\( -1 \)（若 \( x<0 \)）<sup>[1](https://encyclopediaofmath.org/wiki/Signum)</sup> |
| 闭式表达 | 对 \( x \neq 0 \)，\( \operatorname{sgn} x = x/\|x\| \)<sup>[2](https://mathworld.wolfram.com/Sign.html)</sup> |
| 与阶跃函数的关系 | \( \operatorname{sgn}(x) = 2H(x) - 1 \)，其中 \( H \) 为赫维赛德阶跃函数<sup>[2](https://mathworld.wolfram.com/Sign.html)</sup> |
| 连续性 | 在 \( x=0 \) 处为跳跃间断；在每个 \( x \neq 0 \) 处连续<sup>[3](https://people.ohio.edu/just/M4302S21/Lectures/ACL32np.pdf)</sup> |
| 复推广 | 对 \( z \neq 0 \)，\( \operatorname{sgn} z = z/\|z\| \)，且 \( \operatorname{sgn} 0 = 0 \)<sup>[1](https://encyclopediaofmath.org/wiki/Signum)</sup> |
| 历史记号 | 用符号 \( [a] \) 表示 \( a \) 的符号，由利奥波德·克罗内克于 1878 年 2 月 14 日引入<sup>[4](https://math.hawaii.edu/~tom/history/functions.html)</sup> |
| 控制用途 | 砰砰控制、继电器控制及滑模控制器的切换元件<sup>[5](https://www.mdpi.com/2227-7390/12/20/3246)</sup> |

## 定义与基本形式

分段定义给每个实数指定三个值之一<sup>[1](https://encyclopediaofmath.org/wiki/Signum)</sup>：

\[
\operatorname{sgn} x = \begin{cases} \phantom{-}1 & \text{若 } x>0,\\ \phantom{-}0 & \text{若 } x=0,\\ -1 & \text{若 } x<0. \end{cases}
\]

对非零自变量，该函数有紧凑的代数形式 \( \operatorname{sgn} x = x/\|x\| \)<sup>[2](https://mathworld.wolfram.com/Sign.html)</sup>。这一表达式使它与绝对值的关系一目了然：一个数乘以其符号即恢复其大小，而符号函数是绝对值函数在原点之外的导数。

**与赫维赛德阶跃的联系。** 符号函数是赫维赛德阶跃函数 \( H \) 的缩放平移版本，后者对负自变量取 0、对正自变量取 1：\( \operatorname{sgn}(x) = 2H(x) - 1 \)<sup>[2](https://mathworld.wolfram.com/Sign.html)</sup>。反之，当阶跃取对称值 \( H(0) = 1/2 \) 时，恒等式 \( H(x) = \tfrac{1}{2}(\operatorname{sgn} x + 1) \) 对所有实 \( x \) 成立<sup>[6](https://planetmath.org/signumfunction)</sup>。在信号处理中，这两个函数作为基本信号并列出现：单位阶跃在原点从 0 跳至 1，而符号函数从 −1 跳至 1<sup>[7](https://www.munotes.in/notes/BSc-IT/FY-BSc-IT/Semester-1/Fundamentals-of-Telecommunication-Systems/the-unit-step-and-signum-functions/)</sup>。

## 零点值与推广

有些作者仅将符号函数定义为 \( x>0 \) 时取 1、\( x<0 \) 时取 −1，而在 \( x=0 \) 处不定义。在拉普拉斯变换等应用中这已足够，因为函数在单点的取值不改变分析；设定 \( \operatorname{sgn}(0) = 0 \) 的动机来自与绝对值和阶跃函数的代数关系<sup>[6](https://planetmath.org/signumfunction)</sup>。工程文献对阶跃函数原点值也有同样的说明：约定各异（0、1 或 1/2），只要明确声明并一致使用，选择不影响任何积分<sup>[7](https://www.munotes.in/notes/BSc-IT/FY-BSc-IT/Semester-1/Fundamentals-of-Telecommunication-Systems/the-unit-step-and-signum-functions/)</sup>。

定义可推广到扩展实数 \( \overline{\mathbb{R}} = \mathbb{R} \cup \{\infty, -\infty\} \)，设定 \( \operatorname{sgn}(\infty) = 1 \) 与 \( \operatorname{sgn}(-\infty) = -1 \)<sup>[6](https://planetmath.org/signumfunction)</sup>。

**复推广。** 在复平面上，通常的推广是：对 \( z \neq 0 \)，\( \operatorname{sgn} z = z/\|z\| \)，且 \( \operatorname{sgn} 0 = 0 \)<sup>[1](https://encyclopediaofmath.org/wiki/Signum)</sup>。结果是 \( z \) 在单位圆上的投影，因此对非零复数，符号函数只记录其方向，即它所在射线的辐角<sup>[1](https://encyclopediaofmath.org/wiki/Signum)</sup><sup>[6](https://planetmath.org/signumfunction)</sup>。对实自变量，这退化为实符号函数<sup>[6](https://planetmath.org/signumfunction)</sup>。

## 解析性质

\( \operatorname{sgn} \) 的图像由高度为 1 和 −1 的两条水平半直线及孤立点 \( (0,0) \) 组成。函数在 \( x=0 \) 处有跳跃间断，其值从 −1 跃至 1，而在每个 \( x \neq 0 \) 处连续<sup>[3](https://people.ohio.edu/just/M4302S21/Lectures/ACL32np.pdf)</sup>。它是奇函数，满足 \( \operatorname{sgn}(-x) = -\operatorname{sgn}(x) \)，因为对每个非零 \( x \)，输入取反则输出取反，且 \( \operatorname{sgn}(0)=0 \)<sup>[6](https://planetmath.org/signumfunction)</sup>。

由于原点处的跳跃，\( \operatorname{sgn} \) 在经典意义下于该点不可微；对 \( x>0 \) 其导数为常数 0，对 \( x<0 \) 同样为 0，故普通导数在其存在处处处为零<sup>[8](https://www.sciencedirect.com/topics/mathematics/signum-function)</sup>。在将微分推广到奇异对象的分布理论中，赫维赛德阶跃满足 \( dH/dx = \delta(x) \)，即狄拉克 δ 分布<sup>[8](https://www.sciencedirect.com/topics/mathematics/signum-function)</sup>。符号函数还通过绝对值的次微分出现在凸分析中：在 \( x=0 \) 处，\( \|z\| \) 的次微分是区间 \( [-1, 1] \)，即以符号函数两个单侧值为界的斜率集合<sup>[9](https://web.stanford.edu/class/ee364b/lectures/subgradients_notes.pdf)</sup>。

## 记号的历史

符号 \( [a] \) 用以根据 \( a \) 为 0、正或负分别表示 0、1 或 −1，由利奥波德·克罗内克（Leopold Kronecker，1823–1891）引入，这位德国数学家以代数和数论方面的工作著称。在一段注明日期为 1878 年 2 月 14 日的文字中，他写道：\( [a] \) 表示值零、+1 或 −1，取决于实量 \( a \) 本身为零、正或负<sup>[4](https://math.hawaii.edu/~tom/history/functions.html)</sup>。

## 应用

**信号处理与控制。** 在信号与系统中，符号函数是标准基本信号之一，与正弦、指数衰减、矩形脉冲和单位阶跃并列<sup>[10](https://www.emerald.com/books/oa-monograph/20745/chapter/106656412/Introduction)</sup>。在控制工程中，它根据误差的符号切换控制输入的能力，使其成为需要鲁棒性和快速响应的控制器的工具。它是滑模控制器的切换元件——控制输入根据滑模面的符号切换——并在数字控制系统中实现砰砰控制与继电器控制，根据误差信号的符号在两个极值之间驱动输入<sup>[5](https://www.mdpi.com/2227-7390/12/20/3246)</sup>。

**计算。** 编程语言提供具有类型感知行为的符号函数。Common Lisp 的 `signum` 对有理数参数返回整数 −1、0 或 1 之一；对浮点数返回同格式的浮点数，值为负一、零或一；对复数返回同相位、单位模的复数，若参数为零则返回复零本身<sup>[11](https://www.cs.cmu.edu/Groups/AI/util/html/hyperspec/HyperSpec/Body/fun_signum.html)</sup>。浮点硬件使简单的三值图景复杂化：IEEE 有符号零意味着在支持有符号零的平台上，Python 的 `copysign(1.0, -0.0)` 返回 −1.0，因此零的符号可以为负<sup>[12](https://docs.python.org/3/library/math.html)</sup>。

## References

1. [Signum, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Signum)
2. [Sign, Wolfram MathWorld](https://mathworld.wolfram.com/Sign.html)
3. [Lecture 32: Continuous functions, Winfried Just, Ohio University](https://people.ohio.edu/just/M4302S21/Lectures/ACL32np.pdf)
4. [Earliest Uses of Function Symbols, Jeff Miller](https://math.hawaii.edu/~tom/history/functions.html)
5. [An Explicit Form of Signum Function, Mathematics (MDPI, 2024)](https://www.mdpi.com/2227-7390/12/20/3246)
6. [Signum function, PlanetMath](https://planetmath.org/signumfunction)
7. [The Unit-Step and Signum Functions, BSc IT notes, Mumbai University](https://www.munotes.in/notes/BSc-IT/FY-BSc-IT/Semester-1/Fundamentals-of-Telecommunication-Systems/the-unit-step-and-signum-functions/)
8. [Signum Function, ScienceDirect Topics](https://www.sciencedirect.com/topics/mathematics/signum-function)
9. [Subgradients, EE364b lecture notes, Stanford University](https://web.stanford.edu/class/ee364b/lectures/subgradients_notes.pdf)
10. [Applied Signal Processing, Emerald Publishing, Chapter 1](https://www.emerald.com/books/oa-monograph/20745/chapter/106656412/Introduction)
11. [CLHS: Function SIGNUM, Common Lisp HyperSpec](https://www.cs.cmu.edu/Groups/AI/util/html/hyperspec/HyperSpec/Body/fun_signum.html)
12. [math, Mathematical functions, Python 3 documentation](https://docs.python.org/3/library/math.html)

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

Topic: 物质世界与数学 › 数学与统计学 › 数学分析与数学模型 › Real analysis

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/sign-function

English original: https://www.edgepedia.org/sign-function
