Polar Decomposition of Matrices: A Complete Guide to Rotation and Scaling
Understand polar decomposition of matrices — how every matrix factors into a rotation (orthogonal) and a symmetric positive semi-definite component. See step-by-step examples and use our calculator.
Every square matrix can be decomposed into the product of an orthogonal (or unitary) matrix and a symmetric positive semi-definite matrix — a factorization known as polar decomposition. Much like how a complex number z can be written as z = reiθ, where r captures the magnitude and θ captures the rotation, polar decomposition separates a linear transformation into its rotational and stretching components. This separation is invaluable in computer graphics, mechanics, robotics, and any domain where understanding the geometric nature of a transformation matters.
The beauty of polar decomposition lies in its geometric clarity. When you apply a matrix A to a vector, two things happen: the vector may be rotated, and it may be stretched or compressed. Polar decomposition explicitly isolates these two effects. The orthogonal factor U handles rotation without distortion, while the symmetric factor P handles stretching along principal axes. This factorization reveals the intrinsic geometric character of any linear map, even when the original matrix appears to mix rotation and scaling in an entangled way.
Key Takeaway
Polar decomposition factors any square matrix A into A = UP, where U is orthogonal (a rotation or reflection) and P is symmetric positive semi-definite (a stretching). The symmetric factor is computed as P = √(ATA), and the orthogonal factor is U = AP−1. This factorization is unique when A is invertible and provides deep geometric insight into linear transformations.
1. What Is Polar Decomposition?
Polar decomposition expresses a square matrix A ∈ ℝn×n as the product of two factors: A = UP. Here U is an orthogonal matrix satisfying UTU = I (it preserves lengths and angles), and P is a symmetric positive semi-definite matrix satisfying P = PT and all eigenvalues of P are non-negative. This factorization always exists for real square matrices and extends naturally to complex matrices using unitary matrices.
The connection to complex numbers is instructive. Any complex number z = a + bi can be written in polar form z = reiθ, where r = |z| is the magnitude (a non-negative real number) and θ is the argument (an angle representing rotation). Polar decomposition generalizes this idea to matrices: the symmetric factor P plays the role of the magnitude r, capturing scaling along principal directions, while the orthogonal factor U plays the role of eiθ, representing pure rotation.
A = U × P
P = √(ATA)
U = A × P−1
For invertible A: P is unique and positive definite; U is the unique orthogonal factor.
The Orthogonal Factor (U)
The orthogonal factor U satisfies UTU = UUT = I. Geometrically, U represents a pure rotation (or a rotation combined with a reflection if det(U) = −1). It preserves the Euclidean norm of every vector: ‖Ux‖ = ‖x‖ for all x. When A represents a physical deformation, U captures only the rigid-body motion — the part of the transformation that changes orientation but not shape or size.
The Symmetric Factor (P)
The factor P = √(ATA) is symmetric and positive semi-definite. Its eigenvalues are the singular values of A (or their squares, depending on the convention), and its eigenvectors define the principal axes of stretching. When you apply P to a vector, it stretches or compresses along these principal axes without any rotation. This makes P the "pure stretching" component of the transformation.
2. How to Compute Polar Decomposition
Computing polar decomposition involves a sequence of straightforward matrix operations. The process is: first compute ATA, then find its matrix square root to obtain P, and finally recover U via U = AP−1. For 2×2 and 3×3 matrices, these steps can be carried out by hand. For larger matrices, numerical algorithms (such as the Newton iteration for matrix square roots) are used.
Step-by-Step Procedure
- Compute ATA: Multiply A by its transpose to obtain a symmetric positive semi-definite matrix.
- Find eigenvalues of ATA: Solve the characteristic polynomial to get eigenvalues λ₁, λ₂, ...
- Compute P = √(ATA): Take the square root of each eigenvalue and reconstruct P using eigenvectors: P = Q diag(√λ₁, √λ₂, ...) QT.
- Compute U = AP−1: Multiply A by the inverse of P to obtain the orthogonal factor.
- Verify: Check that U is orthogonal (UTU ≈ I) and A ≈ UP.
Worked Example: A = [[2, 1], [1, 3]]
Let A = [[2, 1], [1, 3]]. Step 1: Compute ATA. Since A is symmetric, ATA = A² = [[2,1],[1,3]] × [[2,1],[1,3]] = [[5, 5], [5, 10]].
Step 2: Find eigenvalues of ATA = [[5, 5], [5, 10]]. The characteristic polynomial is (5 − λ)(10 − λ) − 25 = λ² − 15λ + 25 = 0. Using the quadratic formula: λ = (15 ± √(225 − 100)) / 2 = (15 ± √125) / 2. So λ₁ ≈ 13.09 and λ₂ ≈ 1.91.
Step 3: Compute P. The eigenvectors of ATA form Q, and P = Q diag(√13.09, √1.91) QT. Since A is symmetric positive definite, P = A itself (the polar decomposition of a symmetric positive definite matrix is A = I × A, with U = I and P = A). This makes sense — a symmetric positive definite matrix already represents pure stretching along its eigenvectors.
A = [[2, 1], [1, 3]]
ATA = [[5, 5], [5, 10]]
Since A is symmetric PD: P = A, U = I
Verification: I × A = A ✓
For a more illuminating example, consider a non-symmetric matrix like A = [[3, 1], [0, 2]]. Here ATA = [[9, 3], [3, 5]], with eigenvalues λ₁ ≈ 10.62 and λ₂ ≈ 3.38. The square root P = √(ATA) is computed via eigendecomposition, and U = AP−1 yields an orthogonal matrix that represents the rotational component.
| Step | Operation | Result for A = [[3,1],[0,2]] |
|---|---|---|
| 1 | Compute ATA | [[9, 3], [3, 5]] |
| 2 | Eigenvalues of ATA | λ₁ ≈ 10.62, λ₂ ≈ 3.38 |
| 3 | P = √(ATA) | ≈ [[2.83, 0.87], [0.87, 2.21]] |
| 4 | U = AP−1 | ≈ [[0.957, 0.291], [−0.291, 0.957]] |
| 5 | Verify UTU ≈ I | ✓ det(U) ≈ 1 |
3. Properties and Uniqueness
A fundamental property of polar decomposition is its uniqueness. When A is invertible (det(A) ≠ 0), both U and P are uniquely determined. P must be positive definite (all eigenvalues strictly positive), and U is the unique orthogonal matrix satisfying A = UP. When A is singular, the orthogonal factor U is not unique — multiple orthogonal matrices may satisfy the decomposition — though P remains unique.
Connection to Singular Value Decomposition
Polar decomposition has a deep connection to the Singular Value Decomposition (SVD). If A = Usvd Σ VT is the SVD of A, then the polar decomposition factors can be extracted directly:
If A = Usvd Σ VT (SVD), then:
Upolar = Usvd VT (orthogonal factor)
P = V Σ VT (symmetric factor)
P is the matrix square root of ATA, since ATA = VΣ²VT.
Left vs. Right Polar Decomposition
The decomposition A = UP is called the right polar decomposition because P appears on the right. There is also a left polar decomposition A = P′U, where P′ = √(AAT) is the symmetric factor on the left. In general, P′ ≠ P unless A is normal (AAT = ATA). The right form is more commonly used in applications.
- Determinant: det(A) = det(U) × det(P). Since det(P) ≥ 0, the sign of det(A) equals the sign of det(U).
- Norm: ‖A‖₂ = ‖P‖₂ = σ₁ (largest singular value), since orthogonal multiplication preserves the spectral norm.
- Condition number: κ(A) = κ(P) = σ₁/σₙ, since U does not affect the condition number.
- Inverse: A−1 = P−1UT when A is invertible.
4. Applications
Computer Graphics and Animation
In 3D graphics, objects undergo transformations that combine rotation, scaling, and shearing. Polar decomposition separates these components, allowing animators to extract the pure rotation (for orientation interpolation using quaternions) and the pure scaling (for squash-and-stretch effects). This is critical for smooth animation blending and for ensuring that interpolated transformations remain physically plausible.
Continuum Mechanics
In solid mechanics, the deformation gradient tensor F maps reference configurations to current configurations. Polar decomposition F = RU separates the rotation R from the stretch tensor U, enabling engineers to compute strain measures (Green-Lagrange strain E = ½(U² − I)) and to distinguish between rigid-body motion and actual material deformation. This decomposition is foundational in finite strain theory.
Image Processing
Image transformations (rotation, scaling, affine warps) can be analyzed via polar decomposition. When an image is distorted by an unknown affine transformation, decomposing that transformation reveals how much of the distortion is rotational (orientation change) versus how much is stretching (anisotropic scaling). This information guides image registration, deblurring, and geometric correction algorithms.
Robotics
Robot kinematics involves transformation matrices that map joint coordinates to end-effector poses. Polar decomposition extracts the rotational orientation and the scaling/stretching components of these transformations, which is essential for path planning, singularity analysis, and controlling multi-joint robotic arms with precision.
5. Common Mistakes
- Confusing ATA with AAT: For the right polar decomposition (A = UP), use P = √(ATA). Using AAT gives the left decomposition instead.
- Assuming U is always a rotation: U can have det(U) = −1, making it a reflection combined with rotation. Check the determinant to distinguish pure rotations from improper rotations.
- Forgetting uniqueness only holds for invertible A: When A is singular, the orthogonal factor is not unique. Do not expect a unique decomposition in that case.
- Numerical instability with near-singular matrices: Computing P−1 when P has very small eigenvalues leads to large numerical errors. Use SVD-based polar decomposition for robustness.
- Applying polar decomposition to non-square matrices: The standard polar decomposition requires a square matrix. For rectangular matrices, use the compact SVD instead.
6. Frequently Asked Questions
Is polar decomposition the same as SVD?
No, but they are closely related. SVD decomposes A = UΣVT into three factors, while polar decomposition uses two factors A = UP. The polar decomposition can be derived directly from the SVD: Upolar = UVT and P = VΣVT. SVD is more general and numerically stable, while polar decomposition provides more direct geometric insight.
Can polar decomposition be applied to rectangular matrices?
The standard form requires a square matrix. For an m × n matrix with m ≠ n, you can use the "thin" or "compact" polar decomposition derived from the compact SVD, but the factors have different dimensions and the orthogonality conditions are modified.
What happens when A is singular?
When det(A) = 0, the symmetric factor P = √(ATA) is still well-defined but is only positive semi-definite (some eigenvalues are zero), so it is not invertible. The orthogonal factor U is not uniquely determined in this case — there may be infinitely many orthogonal matrices satisfying A = UP.
How does polar decomposition relate to the matrix square root?
Computing P = √(ATA) requires the matrix square root, which is a separate computational problem. The matrix square root can be computed via eigendesignation, Newton's method, or Schur decomposition. The polar decomposition inherits whatever numerical properties the matrix square root algorithm provides.
What is the complexity of computing polar decomposition?
The dominant cost is computing the eigenvalues and eigenvectors of ATA, which is O(n³) for an n × n matrix. Alternatively, iterative methods based on Newton's iteration for the matrix square root converge cubically and are often faster in practice for large matrices.
Try It Yourself
Use our Polar Decomposition Calculator to decompose any square matrix into its orthogonal and symmetric factors. Related tools: QR Decomposition Calculator, SVD Calculator, Eigenvalue Calculator.