terican

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 θ.

FreeInstantNo signupOpen source

Inputs

Polar Decomposition Result

Explain my result

0/3 free

Get a plain-English breakdown of your result with practical next steps.

Polar Decomposition Result

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·e: 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:

  1. 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.
  2. 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).
  3. 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

Frequently asked questions

What is polar decomposition of a 2×2 matrix?
Polar decomposition factors a 2×2 matrix A into the product A = UP, where U is an orthogonal matrix encoding pure rotation or reflection and P is a symmetric positive semi-definite matrix encoding stretching and scaling. The factorization is the direct matrix analogue of writing a complex number in polar form r·e^{iθ}, separating directional and magnitude information. When A is invertible, both factors are unique and fully characterize the geometric action of A on the plane.
How is the rotation angle θ computed from the entries of a 2×2 matrix?
For a 2×2 matrix A with entries a (top-left), b (top-right), c (bottom-left), and d (bottom-right), the rotation angle embedded in the orthogonal polar factor U is computed directly as θ = atan2(c − b, a + d). For example, with a = 3, b = −1, c = 1, d = 3, the formula gives θ = atan2(2, 6) ≈ 0.3217 radians ≈ 18.43°. This approach is numerically stable and avoids any matrix inversion.
What is the difference between the factors U and P in the polar decomposition A = UP?
In the polar decomposition A = UP, the factor U is an orthogonal matrix that captures the purely rotational component: det(U) = +1 indicates a proper rotation and det(U) = −1 indicates an improper rotation (a reflection combined with rotation). The factor P is a symmetric positive semi-definite matrix whose eigenvalues are exactly the singular values of A, capturing all of A's stretching and scaling behavior. Together, U and P provide a complete geometric description of the linear map A.
When is the polar decomposition of a 2×2 matrix unique?
The polar decomposition A = UP is unique if and only if A is invertible, i.e., det(A) ≠ 0. In that case, P = √(AᵀA) is symmetric positive definite with all eigenvalues strictly positive, P⁻¹ exists, and U = A·P⁻¹ is the unique orthogonal factor. When A is singular, P is only positive semi-definite (at least one zero eigenvalue), P⁻¹ does not exist, and infinitely many orthogonal matrices U satisfy A = UP, so the decomposition becomes non-unique.
How does polar decomposition relate to the singular value decomposition (SVD)?
Polar decomposition is derived directly from the SVD. If A = VΣWᵀ is the singular value decomposition (with V and W orthogonal and Σ diagonal with non-negative singular values), then the polar factors are U = VWᵀ and P = WΣWᵀ. The singular values of A appear as the eigenvalues of P, so both decompositions encode identical geometric content in different forms. This connection is detailed in Foster's Numerical Methods reference and the Emory University SVD exercises.
What are the main real-world applications of polar decomposition for 2×2 matrices?
Applications span multiple fields. In aerospace engineering, NASA uses polar decomposition to extract optimal rotation matrices from noisy sensor vector observations for spacecraft attitude determination. In computer graphics, it separates rotation from scale in 2D transformation matrices for animation interpolation. In continuum mechanics, it decomposes deformation gradients into rigid rotation and pure stretch. In robotics, it reprojects numerically drifted matrices onto the rotation group SO(2). Symplectic Lie group integrators also use it to preserve orthogonality constraints in numerical simulations on SO(n).