The rotation matrix of the plane #
The real 2 × 2 matrix Matrix.rotation θ = !![cos θ, -sin θ; sin θ, cos θ] of the
counterclockwise rotation of ℝ² by the angle θ.
Mathlib has the conformal matrix Matrix.planeConformalMatrix a b = !![a, -b; b, a] in GL₂,
which Complex.toMatrix_rotation identifies with multiplication by a unit complex number, but no
rotation matrix parametrised by the angle (the GeneralLinearGroup file lists one as a TODO);
Matrix.rotation θ is its case a = cos θ, b = sin θ. The angle parametrisation is
needed whenever a physical model mixes two real fields by an angle: the neutral electroweak gauge
fields (W³, B) are rotated into (Z, A) by the weak mixing angle, and the mass matrix is
diagonalised by conjugating with this rotation. The results here are the facts such a
diagonalisation uses: the action on vectors, the transpose as the inverse, the group law, and
membership in the special orthogonal group.
Main results #
Matrix.rotation_eq_planeConformalMatrix: the rotation is Mathlib'splaneConformalMatrix (cos θ) (sin θ).Matrix.rotation_mulVec: the rotation applied to a vectorw, componentwise.Matrix.rotation_zero,Matrix.rotation_mul_rotation: the rotation by0is the identity, and composing rotations adds their angles.Matrix.rotation_transpose: the transpose of the rotation byθis the rotation by-θ.Matrix.det_rotation: the rotation has determinant1.Matrix.rotation_mem_specialOrthogonalGroup: the rotation is orthogonal with determinant1.
The rotation by θ is the underlying matrix of Mathlib's conformal matrix
planeConformalMatrix (cos θ) (sin θ), an element of GL₂(ℝ).
The rotation by 0 is the identity.
The rotation matrix is orthogonal and has determinant 1.