旋转位置编码笔记: R矩阵相乘推导

学习旋转位置编码的时候 ( https://kexue.fm/archives/8265 ),发现对于Rm的转置和Rn相乘的结果不太理解,遂做推导并记笔记。推导过程如下:

\[\\ \]

\[{R}_{{m}} ^{{T}} {R}_{{n}} \\ \]

\[=\begin{bmatrix}{{cosm}\theta}&{{sinm}\theta}\\{−{sinm}\theta}&{{cosm}\theta}\end{bmatrix}\begin{bmatrix}{\mathrm{cos}\:{n}\theta}&{−{sinn}\theta}\\{{sinn}\theta}&{{cosn}\theta}\end{bmatrix} \\ \]

\[=\begin{bmatrix}{{cosm}\theta{cosn}\theta+{sinm}\theta{sinn}\theta}&{−{cosm}\theta{sinn}\theta+{sinm}\theta{cosn}\theta}\\{−{sinm}\theta{cosn}\theta+{cosm}\theta{sinn}\theta}&{{sinm}\theta{sinn}\theta+{cosm}\theta{cosn}\theta}\end{bmatrix} \\ \]

\[=\begin{bmatrix}{{cos}\left({n}−{m}\right)\theta}&{−{sin}\left({n}−{m}\right)\theta}\\{{sin}\left({n}−{m}\right)\theta}&{{cos}\left({n}−{m}\right)\theta}\end{bmatrix} \\ \]

因此

\[{R}_{{n}−{m}} ={R}_{{m}} ^{{T}} {R}_{{n}} \\ \]

推导完发现,这样硬算还是挺暴力的。换个不严谨的角度想想,其实可以发现,R矩阵转置以后就是反方向旋转,所以Rm转置再乘Rn,自然就是一个n-m的R矩阵

posted @ 2026-02-18 14:33  stardust2099  阅读(20)  评论(0)    收藏  举报