# 齐次变换矩阵

齐次变换矩阵是一个4×4矩阵，用于表示三维空间中一个刚体（或坐标系）相对于另一个刚体的位置和姿态。它将一个3×3旋转矩阵和一个3维平移向量打包进单个矩阵，使得先旋转后平移可以一次矩阵乘法完成。所有此类矩阵构成的集合形成特殊欧几里得群SE(3)，这是机器人学、力学和计算机图形学中刚体运动的数学家园。<sup>[1](https://modernrobotics.northwestern.edu/nu-gm-book-resource/3-3-1-homogeneous-transformation-matrices/)</sup>

| 关键事实 | 详情 |
|---|---|
| 结构 | \( T = \begin{bmatrix} R & p \\ 0 & 1 \end{bmatrix} \)，其中 \( R \in SO(3) \) 为旋转矩阵，\( p \in \mathbb{R}^3 \) 为体坐标系原点在空间坐标系中的位置；底行三个零和一个一简化了矩阵运算<sup>[1](https://modernrobotics.northwestern.edu/nu-gm-book-resource/3-3-1-homogeneous-transformation-matrices/)</sup><sup> • </sup><sup>[2](https://opentextbooks.clemson.edu/wangrobotics/chapter/forward-kinematics/)</sup> |
| 群 | 所有变换矩阵的集合是特殊欧几里得群SE(3)；两个变换矩阵的乘积仍是变换矩阵，每个矩阵都有逆矩阵，原矩阵与其逆矩阵的乘积为4×4单位矩阵，乘法满足结合律但一般不满足交换律<sup>[1](https://modernrobotics.northwestern.edu/nu-gm-book-resource/3-3-1-homogeneous-transformation-matrices/)</sup> |
| 逆 | 对于 \( H = \begin{bmatrix} R & d \\ 0 & 1 \end{bmatrix} \)，其逆为 \( H^{-1} = \begin{bmatrix} R^{T} & -R^{T}d \\ 0 & 1 \end{bmatrix} \)<sup>[2](https://opentextbooks.clemson.edu/wangrobotics/chapter/forward-kinematics/)</sup> |
| 三种用途 | 表示刚体构型、改变向量或坐标系的参考系、以及位移（移动）向量或坐标系<sup>[1](https://modernrobotics.northwestern.edu/nu-gm-book-resource/3-3-1-homogeneous-transformation-matrices/)</sup> |
| 齐次坐标 | 3维点向量末尾附加一个1成为4维向量，使得同一矩阵既能变换位置又能变换方向；将维度升高一维以吸收平移的技巧来自射影几何<sup>[1](https://modernrobotics.northwestern.edu/nu-gm-book-resource/3-3-1-homogeneous-transformation-matrices/)</sup><sup> • </sup><sup>[3](https://msl.cs.uiuc.edu/planning/node99.html)</sup> |
| 运动链 | 串联机器人的正运动学是各关节变换矩阵的乘积；六关节链成为六个矩阵的乘积<sup>[4](https://www.robohouse26.tech/book/vcp6-handbook/chapter-9)</sup><sup> • </sup><sup>[2](https://opentextbooks.clemson.edu/wangrobotics/chapter/forward-kinematics/)</sup> |
| 软件 | SciPy的`RigidTransform`类（1.16.0版本新增）将此类变换存储为4×4矩阵，支持复合、求逆和作用于向量；ROS的tf2库在时间缓冲树中维护坐标系关系<sup>[5](https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.transform.RigidTransform.html)</sup><sup> • </sup><sup>[6](https://docs.ros.org/en/ros2_packages/rolling/api/tf2/generated/doxygen/html/classtf2_1_1Quaternion-members.html)</sup> |

## 定义与结构

要表示体坐标系{b}在固定空间坐标系{s}中的构型，需要指定{b}原点的位置\( p \)（在{s}坐标中表示）以及指定{b}姿态的旋转矩阵\( R \)（同样在{s}坐标中表示）。这些被汇集为单个4×4矩阵\( T \)，称为齐次变换矩阵，或简称变换矩阵。底行由三个零和一个一组成，其作用是简化矩阵运算。<sup>[1](https://modernrobotics.northwestern.edu/nu-gm-book-resource/3-3-1-homogeneous-transformation-matrices/)</sup>

矩阵形式之所以有效，是因为刚体运动是旋转后接平移。在二维中，对一个点先施加角度为\( \theta \)的旋转，再施加平移\( (t_x, t_y) \)，得到\( T(\mathbf{x}) = R(\theta)\,\mathbf{x} + \mathbf{t} \)，由于附加了向量，这不是线性的。在点后附加一个1使其成为齐次坐标，同一变换就变成单个3×3矩阵乘法：<sup>[7](https://motion.cs.illinois.edu/RoboticSystems/CoordinateTransformations.html)</sup>

\[ \hat{T}(\hat{\mathbf{x}}) = \begin{bmatrix} \cos\theta & -\sin\theta & t_x \\ \sin\theta & \cos\theta & t_y \\ 0 & 0 & 1 \end{bmatrix} \hat{\mathbf{x}} \]

在三维中同样的技巧给出4×4形式。当作用于齐次位置时，旋转和平移作用于前三个坐标，而附加的1使最后一行的点积保持为1，因此位置仍然是位置。方向则用最后一位的0表示，这使得平移部分消失，因为方向没有位置。<sup>[7](https://motion.cs.illinois.edu/RoboticSystems/CoordinateTransformations.html)</sup>将维度升高一维以吸收平移部分的技巧在射影几何中很常见。<sup>[3](https://msl.cs.uiuc.edu/planning/node99.html)</sup>

## 代数性质

变换矩阵满足与旋转矩阵类似的性质。每个矩阵都有逆矩阵，使得\( T \)与其逆的乘积为4×4单位矩阵。两个变换矩阵的乘积仍是变换矩阵，因此SE(3)对乘法封闭。[矩阵乘法](https://www.edgepedia.org/zh/matrix-multiplication)满足结合律但一般不满足交换律，这反映了一个物理事实：先旋转后平移一个物体，通常与先平移后旋转给出不同的结果。<sup>[1](https://modernrobotics.northwestern.edu/nu-gm-book-resource/3-3-1-homogeneous-transformation-matrices/)</sup>

逆矩阵有闭式表达，避免了通用矩阵求逆。由于旋转块是正交的，其逆就是其转置，平移块随之得出：<sup>[2](https://opentextbooks.clemson.edu/wangrobotics/chapter/forward-kinematics/)</sup>

\[ H^{-1} = \begin{bmatrix} R^{T} & -R^{T}d \\ 0 & 1 \end{bmatrix} \]

几何上，逆对应于交换下标的顺序：表示坐标系{s}相对于坐标系{b}的矩阵，是表示{b}相对于{s}的矩阵的逆。<sup>[1](https://modernrobotics.northwestern.edu/nu-gm-book-resource/3-3-1-homogeneous-transformation-matrices/)</sup>

## 三种用途

**构型。** 由旋转\( R_{sb} \)和{b}原点在{s}坐标中的位置构建的矩阵\( T_{sb} \)，表示体坐标系相对于空间坐标系的构型。<sup>[1](https://modernrobotics.northwestern.edu/nu-gm-book-resource/3-3-1-homogeneous-transformation-matrices/)</sup>

**改变参考系。** 与旋转矩阵一样，适用下标消去规则：若已知\( T_{sb} \)和\( T_{bc} \)，其乘积\( T_{sb} T_{bc} \)给出\( T_{sc} \)，即坐标系{c}在坐标系{s}中的构型。要改变一个点的坐标系，首先在3维向量后附加一个1形成其齐次坐标表示，解决4×4矩阵与3维向量之间的维度不匹配。<sup>[1](https://modernrobotics.northwestern.edu/nu-gm-book-resource/3-3-1-homogeneous-transformation-matrices/)</sup>

**位移坐标系。** 变换矩阵也可以作为算子移动坐标系或向量。从初始构型出发，先绕固定轴\( \hat{\omega} \)旋转角度\( \theta \)，再平移\( p \)，可以到达任何构型。旋转轴和平移向量是在空间坐标系还是体坐标系中解释，取决于乘法的哪一侧：用\( T \)左乘\( T_{sb} \)将\( p \)和\( \hat{\omega} \)视为在空间坐标系中表示，而右乘则视为在体坐标系中表示，并颠倒操作顺序——先平移，后旋转。<sup>[1](https://modernrobotics.northwestern.edu/nu-gm-book-resource/3-3-1-homogeneous-transformation-matrices/)</sup>

## 在机器人运动学中的作用

正运动学——从关节变量计算末端执行器的位置和姿态——是主要应用。串联机器人是由旋转关节（转动）和移动关节（平移）连接各连杆的运动链，每个关节有一个自由度。表示坐标系{j}相对于坐标系{i}的变换是各连杆齐次变换\( A_i = \begin{bmatrix} R_i^{i-1} & o_i^{i-1} \\ 0 & 1 \end{bmatrix} \)的乘积，沿链将这些矩阵相乘即得末端执行器在基坐标系中的位姿。<sup>[2](https://opentextbooks.clemson.edu/wangrobotics/chapter/forward-kinematics/)</sup>六关节链成为六个矩阵的乘积。<sup>[4](https://www.robohouse26.tech/book/vcp6-handbook/chapter-9)</sup>

构建各关节矩阵的两种标准方法是Denavit-Hartenberg约定——用四个参数参数化每对相邻坐标系——以及来自旋量理论的[指数积公式](https://www.edgepedia.org/zh/product-of-exponentials-formula)，后者只需要空间坐标系和末端执行器坐标系。<sup>[2](https://opentextbooks.clemson.edu/wangrobotics/chapter/forward-kinematics/)</sup>同样的表示延续到机器人软件中：ROS的tf2库在按时间缓冲的树中维护坐标系之间的关系，并在任意两个坐标系之间变换点和向量，MoveIt的运动规划节点通过它读取变换信息。<sup>[6](https://docs.ros.org/en/ros2_packages/rolling/api/tf2/generated/doxygen/html/classtf2_1_1Quaternion-members.html)</sup><sup> • </sup><sup>[8](https://moveit.picknik.ai/main/doc/concepts/move_group.html)</sup>

## 替代方案与历史

齐次变换是机器人运动学中建模旋转和平移最常见的方式，但并非唯一方式。1990年，当时任职于IBM的研究者亚内兹·丰达、拉塞尔·H·泰勒和理查德·P·保罗发表了一项研究，比较了使用四元数/向量对作为空间算子的方法与齐次变换，结论是四元数对与矩阵方法同样高效、更紧凑、更优雅；该论文还给出了将旋转矩阵转换为单位四元数的鲁棒算法，以及Puma 560机械臂基于四元数的逆运动学解。<sup>[9](https://research.ibm.com/publications/on-homogeneous-transforms-quaternions-and-computational-efficiency)</sup>后来的工作同样将齐次矩阵运动学描述为相对于基于共形几何代数的表述具有较高的计算成本。<sup>[10](https://arxiv.org/abs/2109.12411)</sup>现代库仍将矩阵形式作为交换格式：SciPy的`RigidTransform`从4×4矩阵初始化，并可与指数坐标和对偶四元数相互转换。<sup>[5](https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.transform.RigidTransform.html)</sup>

齐次坐标的基本思想比机器人学更古老。重心坐标由奥古斯特·费迪南德·莫比乌斯在其1827年专著《重心计算》中引入，是几何中最早系统使用的齐次坐标，而齐次坐标由那个时代的几位数学家独立得出，包括莫比乌斯、尤利乌斯·普吕克、艾蒂安·博比耶和卡尔·费尔巴哈。<sup>[11](https://www.five-dimensions.org/Textbooks/alg-2.pdf)</sup><sup> • </sup><sup>[12](https://www.researchgate.net/publication/314212658_Homogeneous_Coordinates_for_Projective_Geometry)</sup>机器人学中的用法借用了射影几何中增加一个坐标以将平移折叠进线性映射的技巧。<sup>[3](https://msl.cs.uiuc.edu/planning/node99.html)</sup>

## References

1. [Modern Robotics, Chapter 3.3.1: Homogeneous Transformation Matrices, K. M. Lynch and F. C. Park, Northwestern University](https://modernrobotics.northwestern.edu/nu-gm-book-resource/3-3-1-homogeneous-transformation-matrices/)
2. [Forward Kinematics, in Modeling, Motion Planning, and Control of Manipulators and Mobile Robots, Clemson Open Textbooks](https://opentextbooks.clemson.edu/wangrobotics/chapter/forward-kinematics/)
3. [Combining translation and rotation, S. M. LaValle, Planning Algorithms](https://msl.cs.uiuc.edu/planning/node99.html)
4. [Frames, rotations, and homogeneous transforms, The VCP6 Handbook](https://www.robohouse26.tech/book/vcp6-handbook/chapter-9)
5. [scipy.spatial.transform.RigidTransform, SciPy v1.18.0 Manual](https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.transform.RigidTransform.html)
6. [tf2::Quaternion Member List, tf2 Rolling documentation, ROS 2](https://docs.ros.org/en/ros2_packages/rolling/api/tf2/generated/doxygen/html/classtf2_1_1Quaternion-members.html)
7. [Coordinate Transformations, Robotic Systems, Kris Hauser, University of Illinois](https://motion.cs.illinois.edu/RoboticSystems/CoordinateTransformations.html)
8. [The move_group node, MoveIt Documentation](https://moveit.picknik.ai/main/doc/concepts/move_group.html)
9. [On Homogeneous Transforms, Quaternions, and Computational Efficiency, J. Funda, R. H. Taylor, R. P. Paul, IEEE Transactions on Robotics and Automation, 1990, IBM Research](https://research.ibm.com/publications/on-homogeneous-transforms-quaternions-and-computational-efficiency)
10. [Closed-form solutions for the inverse kinematics of serial robots using conformal geometric algebra, arXiv](https://arxiv.org/abs/2109.12411)
11. [Homogeneous coordinates, in Introduction to Algebraic Geometry, five-dimensions.org](https://www.five-dimensions.org/Textbooks/alg-2.pdf)
12. [Homogeneous Coordinates for Projective Geometry, ResearchGate](https://www.researchgate.net/publication/314212658_Homogeneous_Coordinates_for_Projective_Geometry)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 工程与制造 › 机器人技术与自动化 › Mechanical foundations of robotics › Robot kinematics and differential kinematics

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/homogeneous-transformation-matrix

English original: https://www.edgepedia.org/homogeneous-transformation-matrix
