一般角度的旋转矩阵的推导

一般角度的旋转矩阵

1. 复数与旋转的关系

在复平面上,复数 ejθe^{j\theta}ejθ 表示逆时针旋转角度 θ\thetaθ。对于任意复数 z=x+jyz = x + jyz=x+jy:

ejθ⋅z=(cos⁡θ+jsin⁡θ)(x+jy) e^{j\theta} \cdot z = (\cos\theta + j\sin\theta)(x + jy) ejθ⋅z=(cosθ+jsinθ)(x+jy)

展开计算:
=xcos⁡θ+jxsin⁡θ+jycos⁡θ+j2ysin⁡θ = x\cos\theta + jx\sin\theta + jy\cos\theta + j^2 y\sin\theta =xcosθ+jxsinθ+jycosθ+j2ysinθ
=(xcos⁡θ−ysin⁡θ)+j(xsin⁡θ+ycos⁡θ) = (x\cos\theta - y\sin\theta) + j(x\sin\theta + y\cos\theta) =(xcosθ−ysinθ)+j(xsinθ+ycosθ)

2. 旋转矩阵的一般形式

上述变换对应的矩阵形式为:

x′y′\]=\[cos⁡θ−sin⁡θsin⁡θcos⁡θ\]\[xy\] \\begin{bmatrix} x' \\\\ y' \\end{bmatrix} = \\begin{bmatrix} \\cos\\theta \& -\\sin\\theta \\\\ \\sin\\theta \& \\cos\\theta \\end{bmatrix} \\begin{bmatrix} x \\\\ y \\end{bmatrix} \[x′y′\]=\[cosθsinθ−sinθcosθ\]\[xy

因此,一般旋转矩阵 (逆时针旋转角度 θ\thetaθ)为:
R(θ)=cos⁡θ−sin⁡θsin⁡θcos⁡θ R(\theta) = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix} R(θ)=cosθsinθ−sinθcosθ

3. 特殊情况验证

  • θ=90∘=π2\theta = 90^\circ = \frac{\pi}{2}θ=90∘=2π
    R(π2)=0−110 R\left(\frac{\pi}{2}\right) = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} R(2π)=01−10

    对应 jjj 的旋转矩阵

  • θ=−90∘=−π2\theta = -90^\circ = -\frac{\pi}{2}θ=−90∘=−2π
    R(−π2)=01−10 R\left(-\frac{\pi}{2}\right) = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} R(−2π)=0−110

    对应 −j-j−j 的旋转矩阵

  • θ=180∘=π\theta = 180^\circ = \piθ=180∘=π
    R(π)=−100−1 R(\pi) = \begin{bmatrix} -1 & 0 \\ 0 & -1 \end{bmatrix} R(π)=−100−1

    对应 −1-1−1 的旋转(点反射)

  • θ=0∘=0\theta = 0^\circ = 0θ=0∘=0
    R(0)=1001 R(0) = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} R(0)=1001

    单位矩阵,不旋转

4. 矩阵性质

旋转矩阵具有以下重要性质:

  1. 正交性 :R(θ)TR(θ)=IR(\theta)^T R(\theta) = IR(θ)TR(θ)=I
  2. 行列式为1 :det⁡(R(θ))=cos⁡2θ+sin⁡2θ=1\det(R(\theta)) = \cos^2\theta + \sin^2\theta = 1det(R(θ))=cos2θ+sin2θ=1
  3. 逆矩阵 :R(θ)−1=R(−θ)=R(θ)TR(\theta)^{-1} = R(-\theta) = R(\theta)^TR(θ)−1=R(−θ)=R(θ)T
  4. 组合性 :R(θ1)R(θ2)=R(θ1+θ2)R(\theta_1) R(\theta_2) = R(\theta_1 + \theta_2)R(θ1)R(θ2)=R(θ1+θ2)

5. 最终结论

一般的二维旋转矩阵 (逆时针旋转角度 θ\thetaθ)为:

R(θ)=cos⁡θ−sin⁡θsin⁡θcos⁡θ \boxed{ R(\theta) = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix} } R(θ)=cosθsinθ−sinθcosθ

这个矩阵将任何向量 xy\begin{bmatrix} x \\ y \end{bmatrix}xy 绕原点逆时针旋转角度 θ\thetaθ。

相关推荐
想吃火锅10051 小时前
【leetcode】200. 岛屿数量
算法·leetcode·职场和发展
Nil2082 小时前
leetcode 54螺旋矩阵
算法·leetcode·矩阵
依然鸣3 小时前
PTA团体程序设计天梯赛L1真题讲解L1-077-080
开发语言·c++·算法·深度优先·pat考试·图论
qeen875 小时前
【数据结构】自平衡二叉搜索树各种旋转算法原理解析及AVL树的C++实现
数据结构·c++·算法
lucas_AI6 小时前
1.2B 小模型赢过 235B 大模型:NaviDC-OCR 把文档解析卷明白了
人工智能·深度学习·算法
冻柠檬飞冰走茶6 小时前
PTA基础编程题目集 7-35有理数均值(C++语言实现)
开发语言·数据结构·c++·算法·均值算法
民乐团扒谱机7 小时前
【微实验】倒谱算法(Cepstrum)深度解析:原理、数学推导与代码实现
人工智能·算法·语音识别
Nil2088 小时前
leetcode 189轮转数组
数据结构·算法·leetcode
-dzk-8 小时前
【动态规划】LC 118.杨辉三角
算法·动态规划
恣逍信点8 小时前
《凌微经》静态自悖——变化之自因
人工智能·科技·算法·机器学习·业界资讯·拓扑学·哲学