已知向量 O P 0 → \overrightarrow{OP_0} OP0 为 ( x 0 , y 0 ) (x_0,y_0) (x0,y0),求旋转 ϕ \phi ϕ 度后的坐标 ( x 1 , y 1 ) (x_1,y_1) (x1,y1)
由上图可知
x 1 = ∣ O P 1 → ∣ c o s ( θ + ϕ ) = ∣ O P 0 → ∣ c o s ( θ + ϕ ) = ∣ O P 0 → ∣ c o s θ ⋅ c o s ϕ − ∣ O P 0 → ∣ s i n θ ⋅ s i n ϕ = x 0 c o s ϕ − y 0 s i n ϕ \begin{aligned} x_1 &= |\overrightarrow{OP_1}| cos (\theta + \phi) \\ &= |\overrightarrow{OP_0}| cos (\theta + \phi) \\ &= |\overrightarrow{OP_0}| cos \theta \cdot cos\phi - |\overrightarrow{OP_0}| sin \theta \cdot sin\phi\\ &= x_0 cos\phi - y_0sin\phi \end{aligned} x1=∣OP1∣cos(θ+ϕ)=∣OP0∣cos(θ+ϕ)=∣OP0∣cosθ⋅cosϕ−∣OP0∣sinθ⋅sinϕ=x0cosϕ−y0sinϕ
上述推导利用了 ∣ O P 0 → ∣ = ∣ O P 1 → ∣ |\overrightarrow{OP_0}| = |\overrightarrow{OP_1}| ∣OP0∣=∣OP1∣,以及三角函数的和差公式化积公式
同理
y 1 = ∣ O P 1 → ∣ s i n ( θ + ϕ ) = ∣ O P 0 → ∣ s i n ( θ + ϕ ) = ∣ O P 0 → ∣ s i n θ ⋅ c o s ϕ + ∣ O P 0 → ∣ c o s θ ⋅ s i n ϕ = y 0 c o s ϕ + x 0 s i n ϕ \begin{aligned} y_1 &= |\overrightarrow{OP_1}| sin (\theta + \phi) \\ &= |\overrightarrow{OP_0}| sin (\theta + \phi) \\ &= |\overrightarrow{OP_0}| sin \theta \cdot cos\phi + |\overrightarrow{OP_0}| cos \theta \cdot sin\phi\\ &= y_0 cos\phi + x_0sin\phi \end{aligned} y1=∣OP1∣sin(θ+ϕ)=∣OP0∣sin(θ+ϕ)=∣OP0∣sinθ⋅cosϕ+∣OP0∣cosθ⋅sinϕ=y0cosϕ+x0sinϕ
综上所述, O P 1 → = ( x 0 c o s ϕ − y 0 s i n ϕ , x 0 s i n ϕ + y 0 c o s ϕ ) \overrightarrow{OP_1} = (x_0 cos\phi - y_0sin\phi, x_0sin\phi + y_0 cos\phi ) OP1=(x0cosϕ−y0sinϕ,x0sinϕ+y0cosϕ)
写成矩阵乘法的形式
[ c o s ϕ − s i n ϕ s i n ϕ c o s ϕ ] ⋅ [ x 0 y 0 ] = [ x 1 y 1 ] \begin{bmatrix} cos \phi & -sin\phi \\ sin\phi & cos\phi \end{bmatrix} \cdot \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = \begin{bmatrix} x_1 \\ y_1 \end{bmatrix} [cosϕsinϕ−sinϕcosϕ]⋅[x0y0]=[x1y1]