# 置换矩阵

置换矩阵是一种方阵，每行每列恰好有一个元素等于1，其余元素全为0。用置换矩阵去乘一个向量或另一个矩阵，会按照集合\(\{1, \dots, n\}\)的一个置换重排其行或列，因此这类矩阵是对称群——即n个对象全体置换构成的群——的矩阵表示。<sup>[1](https://www.math.uwaterloo.ca/~cgodsil/quagmire/linalg2/pdfs/LA2.pdf)</sup><sup> • </sup><sup>[2](https://scholarworks.iu.edu/iuswrrest/api/core/bitstreams/c7813bf6-43db-4ac6-8944-7e9099758a06/content)</sup>

| 关键事实 | 细节 |
|---|---|
| 定义 | 每行每列恰好有一个元素等于1的0-1矩阵<sup>[1](https://www.math.uwaterloo.ca/~cgodsil/quagmire/linalg2/pdfs/LA2.pdf)</sup> |
| 群结构 | \( n \times n \)置换矩阵在矩阵乘法下构成一个群，同构于n个元素上的对称群<sup>[1](https://www.math.uwaterloo.ca/~cgodsil/quagmire/linalg2/pdfs/LA2.pdf)</sup><sup> • </sup><sup>[2](https://scholarworks.iu.edu/iuswrrest/api/core/bitstreams/c7813bf6-43db-4ac6-8944-7e9099758a06/content)</sup> |
| 逆 | \( PP^{T} = I \)，故\( P^{-1} = P^{T} \)；置换矩阵是正交矩阵<sup>[1](https://www.math.uwaterloo.ca/~cgodsil/quagmire/linalg2/pdfs/LA2.pdf)</sup> |
| 行列式 | \( \det(P) \)为+1或−1；置换的符号定义为\( \operatorname{sign} \pi = \det P_{\pi} \)<sup>[2](https://scholarworks.iu.edu/iuswrrest/api/core/bitstreams/c7813bf6-43db-4ac6-8944-7e9099758a06/content)</sup> |
| 伯克霍夫定理 | 每个双随机矩阵（元素非负，行和与列和均为1）都是置换矩阵的加权和<sup>[3](https://arxiv.org/abs/1509.08626)</sup> |
| 推广 | 单项矩阵每行每列至多有一个非零元素，可分解为\( M = PD \)，其中P为置换矩阵，D为对角矩阵<sup>[1](https://www.math.uwaterloo.ca/~cgodsil/quagmire/linalg2/pdfs/LA2.pdf)</sup> |

## 定义与作用

集合\(\{1, \dots, n\}\)的一个置换是一个双射\( \pi \colon \{1, \dots, n\} \to \{1, \dots, n\} \)。对置换\( \pi \)，矩阵\( P_{\pi} \)由\( P_{\pi} e_i = e_{\pi(i)} \)定义，其中\( e_i \)为标准基向量；其元素为

\[ (P_{\pi})_{ij} = \begin{cases} 1 & \pi(j) = i \\ 0 & \pi(j) \neq i. \end{cases} \]

按照滑铁卢大学组合学与优化荣休教授克里斯·戈德西尔（Chris Godsil）采用的约定，算子\( P(\sigma) \)将坐标向量\( (x_1, \dots, x_n)^T \)映为\( (x_{1\sigma}, \dots, x_{n\sigma})^T \)，并将\( e_j \)映为\( e_{j\sigma^{-1}} \)；所得矩阵的第i行为\( e_{i\sigma}^{T} \)。<sup>[1](https://www.math.uwaterloo.ca/~cgodsil/quagmire/linalg2/pdfs/LA2.pdf)</sup><sup> • </sup><sup>[2](https://scholarworks.iu.edu/iuswrrest/api/core/bitstreams/c7813bf6-43db-4ac6-8944-7e9099758a06/content)</sup>

## 代数性质

**封闭性与逆。** 两个置换算子的乘积仍是置换算子，因此两个置换矩阵的乘积仍是置换矩阵，\( n \times n \)置换矩阵在乘法下构成一个群。<sup>[1](https://www.math.uwaterloo.ca/~cgodsil/quagmire/linalg2/pdfs/LA2.pdf)</sup>由于每行每列各含一个1，\( PP^{T} = I \)，故置换矩阵的逆就是其转置。<sup>[1](https://www.math.uwaterloo.ca/~cgodsil/quagmire/linalg2/pdfs/LA2.pdf)</sup>

**行列式与符号。** 任何置换矩阵都可通过交换行化为单位矩阵，而每次交换都改变行列式的符号，故\( \det(P) \)总是+1或−1。置换的符号定义为\( \operatorname{sign} \pi = \det P_{\pi} \in \{\pm 1\} \)，符号为+1或−1的置换分别称为偶置换或奇置换。偶置换构成对称群的一个子群，称为交错群。<sup>[2](https://scholarworks.iu.edu/iuswrrest/api/core/bitstreams/c7813bf6-43db-4ac6-8944-7e9099758a06/content)</sup>等价地，长度为k的轮换符号为\( (-1)^{k-1} \)，恰含e个偶数长度轮换的置换符号为\( (-1)^e \)。<sup>[1](https://www.math.uwaterloo.ca/~cgodsil/quagmire/linalg2/pdfs/LA2.pdf)</sup>

**单项矩阵。** 放宽唯一非零元素必须等于1的要求，便得到单项矩阵，其定义为每行每列至多有一个非零元素。矩阵M是单项矩阵当且仅当\( M = PD \)（或\( DP \)），其中P为置换矩阵，D为对角矩阵；同阶两个单项矩阵的乘积仍是单项矩阵，因为\( (P_1 D_1)(P_2 D_2) = P_1 P_2 (P_2^{-1} D_1 P_2) D_2 \)，而\( P_2^{-1} D_1 P_2 \)是对角矩阵。<sup>[1](https://www.math.uwaterloo.ca/~cgodsil/quagmire/linalg2/pdfs/LA2.pdf)</sup>

## 在矩阵论中的作用

置换矩阵出现在行列式的定义本身之中。戈德西尔的教材通过对置换矩阵求和来构造行列式：对\( A \in \mathrm{Mat}_{n \times n}(F) \)，

\[ \det(A) := \sum_{\pi \in \mathrm{Sym}(n)} \det(A \circ P(\pi)), \]

其中\( \circ \)为逐元素舒尔积，\( A \circ P(\pi) \)为单项矩阵。对\( n = 2 \)，这给出\( \det \begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bc \)。<sup>[1](https://www.math.uwaterloo.ca/~cgodsil/quagmire/linalg2/pdfs/LA2.pdf)</sup>

高斯消元中交换两行的初等矩阵\( P_{ij} \)是置换矩阵的特例，而每个可逆方阵都是初等矩阵的乘积。<sup>[2](https://scholarworks.iu.edu/iuswrrest/api/core/bitstreams/c7813bf6-43db-4ac6-8944-7e9099758a06/content)</sup>

**伯克霍夫定理。** 双随机矩阵的元素非负，且每行和与每列和均等于1；每个置换矩阵都是双随机矩阵。伯克霍夫定理指出，任何双随机矩阵都落在一个以置换矩阵为顶点的凸多胞形内，即它可写成置换矩阵的加权和。<sup>[3](https://arxiv.org/abs/1509.08626)</sup>酉情形有类似结论：任何行和与列和均等于1的酉矩阵，都可分解为置换矩阵的加权和，其权重在模与模平方两种意义下之和均为1。<sup>[4](https://arxiv.org/abs/1812.08833)</sup>相关工作将这些思想推广到图的双随机自同构，伯克霍夫定理作为特例被重新得到。<sup>[5](https://www.sciencedirect.com/science/article/pii/002437958890239X)</sup>

## 在数值计算中的应用

置换矩阵在稀疏矩阵算法中居于核心地位，这类算法在分解一个大型且大部分为零的矩阵之前，先重排其行与列。排序算法以稀疏矩阵A为输入，返回一对置换矩阵P和Q，使得\( B = PAQ \)具有小带宽或其他理想结构；一个已证明的结果是，任何每行每列至多有两个非零元素的矩阵，都可化为带宽为五的带状矩阵。<sup>[6](https://www.sciencedirect.com/science/article/pii/0304397595001514)</sup>重排还可仅用行与列置换，将稀疏矩阵化为块对角形，进而化为近似上三角形。<sup>[7](https://doi.org/10.1093/COMJNL/10.3.300)</sup>

在部分主元法的高斯消元中，分解具有形式\( A = P_1 M_1 P_2 M_2 \cdots P_{n-1} M_{n-1} U \)，其中每个\( P_k \)是记录第k步行交换的初等置换矩阵，\( M_k \)为单位下三角矩阵，U为上三角矩阵。<sup>[8](https://epubs.siam.org/doi/10.1137/0908072)</sup>软件直接暴露这些因子：SciPy的SuperLU接口将行置换存为索引数组，通过设置\( P_r[\mathrm{perm\_r}, \mathrm{arange}(n)] = 1 \)即可由此重构置换矩阵。<sup>[9](https://docs.scipy.org/doc/scipy-0.15.1/reference/generated/scipy.sparse.linalg.SuperLU.perm_r.html)</sup>

置换还用于将大元素移到对角线上。稀疏矩阵算法研究者达夫（Duff）和科斯特（Koster）开发了置换稀疏矩阵的算法，使其对角线含有绝对值较大的元素，这一步骤在稀疏方程的直接与迭代求解以及预条件子的构造中很有用；他们报告说，这种重排的效果可能非常显著，尽管最佳的先验策略尚不清楚。<sup>[10](https://epubs.siam.org/doi/abs/10.1137/S0895479897317661)</sup>

## References

1. [Chris Godsil, More Linear Algebra, section 25.3, Permutation Matrices, University of Waterloo](https://www.math.uwaterloo.ca/~cgodsil/quagmire/linalg2/pdfs/LA2.pdf)
2. [Linear Algebra course notes, Indiana University South Bend, Definition 15.3 and 15.4](https://scholarworks.iu.edu/iuswrrest/api/core/bitstreams/c7813bf6-43db-4ac6-8944-7e9099758a06/content)
3. [The Birkhoff theorem for unitary matrices of prime dimension, arXiv:1509.08626](https://arxiv.org/abs/1509.08626)
4. [The Birkhoff theorem for unitary matrices of prime-power dimension, arXiv:1812.08833](https://arxiv.org/abs/1812.08833)
5. [Richard A. Brualdi (1988), Some applications of doubly stochastic matrices, Linear Algebra and its Applications 107, 77-100](https://www.sciencedirect.com/science/article/pii/002437958890239X)
6. [On the ordering of sparse linear systems, Theoretical Computer Science](https://www.sciencedirect.com/science/article/pii/0304397595001514)
7. [Row-column permutation of sparse matrices, The Computer Journal 10(3), 300](https://doi.org/10.1093/COMJNL/10.3.300)
8. [Symbolic Factorization for Sparse Gaussian Elimination with Partial Pivoting, SIAM Journal on Scientific Computing](https://epubs.siam.org/doi/10.1137/0908072)
9. [scipy.sparse.linalg.SuperLU.perm_r, SciPy Reference Guide](https://docs.scipy.org/doc/scipy-0.15.1/reference/generated/scipy.sparse.linalg.SuperLU.perm_r.html)
10. [Iain S. Duff and Jacko Koster, The Design and Use of Algorithms for Permuting Large Entries to the Diagonal of Sparse Matrices, SIAM Journal on Matrix Analysis and Applications](https://epubs.siam.org/doi/abs/10.1137/S0895479897317661)

---
*Initially written Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Linear and multilinear algebra › Matrix theory › Structured and special matrix classes

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/permutation-matrix

English original: https://www.edgepedia.org/permutation-matrix
