Last verified · v1.0
Calculator · math
Polar Decomposition Calculator (2×2 Matrix)
Decompose any 2×2 matrix A into orthogonal factor U and symmetric factor P via A = UP, with instant output of U, P, or rotation angle θ.
Inputs
Polar Decomposition Result
—
Explain my result
Get a plain-English breakdown of your result with practical next steps.
The formula
How the
result is
computed.
What Is Polar Decomposition?
Polar decomposition factors any real square matrix A into the product A = UP, where U is an orthogonal matrix representing pure rotation or reflection and P is a symmetric positive semi-definite matrix representing pure stretching or scaling. The decomposition is the exact matrix analogue of writing a complex number in polar form z = r·eiθ: it separates the directional (rotational) component from the magnitude (deformation) component. For 2×2 matrices, all factors can be computed analytically with no iterative methods required.
The Core Formula
Given the 2×2 matrix A with scalar entries a (row 1, col 1), b (row 1, col 2), c (row 2, col 1), and d (row 2, col 2), the polar decomposition proceeds through three explicit steps:
- Compute the symmetric factor P = √(ATA). The matrix ATA is always symmetric positive semi-definite, so its square root is well-defined. For a 2×2 matrix, ATA has entries [[a²+c², ab+cd], [ab+cd, b²+d²]], and P is obtained via eigendecomposition of this product.
- Compute the orthogonal factor U = A·P−1. When A is invertible, U satisfies UTU = I. If det(A) > 0, then det(U) = +1 (pure rotation); if det(A) < 0, then det(U) = −1 (improper rotation combined with reflection).
- Extract the rotation angle θ = atan2(c − b, a + d). This direct formula recovers the net rotation angle encoded in U without explicitly inverting P, making it the numerically preferred approach for the 2×2 case.
Variable Definitions
- a — Top-left entry of matrix A (row 1, column 1)
- b — Top-right entry of matrix A (row 1, column 2)
- c — Bottom-left entry of matrix A (row 2, column 1)
- d — Bottom-right entry of matrix A (row 2, column 2)
- P — Symmetric positive semi-definite factor; its eigenvalues equal the singular values of A and encode all scaling information
- U — Orthogonal factor; det(U) = +1 indicates a proper rotation, det(U) = −1 indicates an improper rotation
- θ — Net rotation angle in radians encoded in U, computed as θ = atan2(c − b, a + d)
Worked Example
Consider A = [[3, −1], [1, 3]] with a = 3, b = −1, c = 1, d = 3.
Step 1: ATA = [[3,1],[−1,3]]·[[3,−1],[1,3]] = [[10, 0],[0, 10]], so P = √10·I₂ — a uniform scaling by √10 ≈ 3.162.
Step 2: P−1 = (1/√10)·I₂, so U = (1/√10)·[[3,−1],[1,3]]. Verification: UTU = I and det(U) = (9+1)/10 = 1 (proper rotation).
Step 3: θ = atan2(c − b, a + d) = atan2(1 − (−1), 3 + 3) = atan2(2, 6) ≈ 0.3217 radians ≈ 18.43°. Matrix A encodes a counterclockwise rotation of approximately 18.4° followed by a uniform scale factor of √10.
Mathematical Derivation via SVD
Polar decomposition is most cleanly derived from the Singular Value Decomposition. If A = VΣWT is the SVD (with V, W orthogonal and Σ diagonal with non-negative singular values), then U = VWT and P = WΣWT. The identity P = √(ATA) follows directly because ATA = WΣ²WT and its positive square root is WΣWT. This relationship is treated rigorously in Foster's Numerical Methods reference on SVD and in the Emory University SVD exercise set (Section 8.6). The singular values of A appear as eigenvalues of P, meaning both decompositions encode equivalent geometric information.
Applications Across Disciplines
- Aerospace attitude determination: NASA research applies polar decomposition to extract optimal rotation matrices from noisy vector sensor observations, as detailed in the NASA Technical Report on polar decomposition for attitude determination.
- Computer graphics and animation: 2D transformation matrices are decomposed into rotation and scale components to enable smooth interpolation and physically correct skinning.
- Continuum mechanics: The polar decomposition theorem for deformation gradients separates rigid-body rotation (U) from pure material stretch (P), a foundational result in finite-strain elasticity theory.
- Robotics and control: Projecting noisy or numerically drifted transformation matrices back onto the rotation group SO(2) requires extracting U from a computed polar decomposition.
- Symplectic Lie group integration: High-order structure-preserving integrators on SO(n) use polar decomposition to maintain orthogonality constraints, as described in NSF-funded research on symplectic Lie group methods.
Edge Cases and Numerical Notes
When det(A) = 0 (singular matrix), P is positive semi-definite rather than definite and P−1 does not exist; the factor U is then non-unique. For nearly singular matrices, direct eigendecomposition of ATA is preferred over numeric inversion. The rotation angle formula θ = atan2(c − b, a + d) is numerically robust for all non-degenerate inputs, as it relies only on the four scalar entries and avoids matrix inversion entirely.
Reference