2D Rotation

Rz2 θ = cos θ -sin θ sin θ cos θ Rz2 0 = 1 0 0 1 Rz2 90 = 0 -1 1 0 Rz2 180 = -1 0 0 -1

3D Rotation

Rx3 θ = 1 0 0 0 cos θ -sin θ 0 sin θ cos θ Ry3 θ = cos θ 0 -sin θ 0 1 0 sin θ 0 cos θ Rz3 θ = cos θ -sin θ 0 sin θ cos θ 0 0 0 1
Rx3 0 = 1 0 0 0 1 0 0 0 1 Ry3 0 = 1 0 0 0 1 0 0 0 1 Rz3 0 = 1 0 0 0 1 0 0 0 1
Rx3 90 = 1 0 0 0 0 -1 0 1 0 Ry3 90 = 0 0 -1 0 1 0 1 0 0 Rz3 90 = 0 -1 0 1 0 0 0 0 1
Rx3 180 = 1 0 0 0 -1 0 0 0 -1 Ry3 180 = -1 0 0 0 1 0 0 0 -1 Rz3 180 = -1 0 0 0 -1 0 0 0 1
Rx3 270 = 1 0 0 0 0 1 0 -1 0 Ry3 270 = 0 0 1 0 1 0 -1 0 0 Rz3 270 = 0 1 0 -1 0 0 0 0 1

4D Rotation

Rzw4 θ = cos θ -sin θ 0 0 sin θ cos θ 0 0 0 0 1 0 0 0 0 1 Ryw4 θ = cos θ 0 -sin θ 0 0 1 0 0 sin θ 0 cos θ 0 0 0 0 1 Rxw4 θ = 1 0 0 0 0 cos θ -sin θ 0 0 sin θ cos θ 0 0 0 0 1
Rxy4 θ = 1 0 0 0 0 1 0 0 0 0 cos θ -sin θ 0 0 sin θ cos θ Rxz4 θ = 1 0 0 0 0 cos θ 0 -sin θ 0 0 1 0 0 sin θ 0 cos θ Ryz4 θ = cos θ 0 0 -sin θ 0 1 0 0 0 0 1 0 sin θ 0 0 cos θ