Rotation Matrix
2D and 3D rotation matrices from angles
About this calculator
The Rotation Matrix Calculator builds the 2D rotation matrix R(θ) = [[cosθ, −sinθ], [sinθ, cosθ]] from a single angle, or the 3D matrix R = Rz·Ry·Rx (yaw–pitch–roll, ZYX order) from three angles. It works in degrees or radians, gives exact entries at special angles, confirms that det(R) = 1, and draws the rotated basis vectors so you can see what the matrix does. Useful for linear algebra, computer graphics, robotics, and physics.
How to use the Rotation Matrix calculator
- Enter the measurements you know into the input fields.
- Read the computed properties — they update instantly as you type.
- Compare the diagram with your figure to confirm the setup is right.
- Copy the page URL to share the exact calculation.
Common examples
- 2D, θ = 90° → [[0, −1], [1, 0]], det(R) = 1
- 2D, θ = 45° → all entries ±√2/2 ≈ ±0.7071 (exact at special angles)
- 3D, yaw 90° about z → [[0, −1, 0], [1, 0, 0], [0, 0, 1]]: x̂ lands on ŷ
- 3D, roll 30°, pitch 45°, yaw 60° (ZYX) → R₁₁ ≈ 0.3536, R₃₁ ≈ −0.7071, det(R) = 1
Frequently asked questions
How does the Rotation Matrix calculator work?
Enter the known measurements of your figure and the calculator applies the standard geometric formulas to find the remaining properties, alongside a diagram that reflects your numbers. All values are computed with high-precision arithmetic.
When would I use the Rotation Matrix calculator?
It helps with geometry homework, technical drawing, construction and DIY layout, and any situation where you know some measurements of a shape and need the rest.
How accurate are the results?
Formulas are evaluated at 30 significant digits of precision internally, including roots and trigonometric functions. Displayed values are rounded for readability, but the underlying computation does not accumulate floating-point drift.
Can I share a specific calculation with someone else?
Yes. Every value you enter updates the URL, so copying the address bar and sharing the link reopens the exact same figure and results for whoever clicks it.