Skip to content
Math

Polar Decomposition Calculator

Enter the entries of a real square matrix and this calculator returns its polar decomposition A = U P, where U is an orthogonal matrix (pure rotation or reflection) and P is a symmetric positive semi-definite matrix (pure stretch). The decomposition is computed via singular value decomposition (SVD). Results update as you type, and the step-by-step panel shows every stage of the working.

Your details

Choose a 2x2 or 3x3 real square matrix.
Entry in row 1, column 1.
Entry in row 1, column 2.
Entry in row 2, column 1.
Entry in row 2, column 2.
Singular value σ₁
4.995561

Largest singular value of A

Singular value σ₂2.245968
det(U)0.891276
det(A)10
Residual ||A - UP||3.11708818
U matrix (rows separated by |)0.601408, -0.439363 | 0.798942, 0.898310
P matrix (rows separated by |)4.017302, 1.316368 | 1.316368, 3.224226
σ₁ (largest)4.995561
σ₂2.245968
σ₃ (3x3 only)-

A = U · P: reflection/rotation composed with a symmetric stretch.

  • U is a linear map with det(U) = 0.8913. P is the symmetric stretch factor with eigenvalues equal to the singular values.
  • All singular values are positive (4.9956, 2.2460), so A is invertible and P is positive definite.
  • Condition number σ₁/σ₂ = 2.22, which is low: the matrix is well-conditioned.
  • Reconstruction residual ||A - UP|| = 3.12e+0, confirming the factorization is numerically accurate.

Next stepTo use this in continuum mechanics, U is the rotation tensor R and P is the right stretch tensor. In machine learning, polar decomposition is used to project weight matrices onto the Stiefel manifold (the set of orthogonal matrices).

Formula

A=UP,A=WΣV,U=WV,P=VΣVA = U \cdot P, \quad A = W \Sigma V^{\top}, \quad U = W V^{\top}, \quad P = V \Sigma V^{\top}

Worked example

For A = [[3,1],[2,4]]: SVD gives singular values sigma1 approx 5.099, sigma2 approx 1.961. U is the orthogonal factor (det close to +1), and P = V diag(sigma) V^T is symmetric positive definite. The residual ||A - UP|| is less than 1e-13.

What is the polar decomposition of a matrix?

Every real square matrix A can be written as A = U P, where U is an orthogonal matrix (U^T U = I, det(U) = +/-1) and P is a symmetric positive semi-definite matrix. This is called the polar decomposition, and it is the matrix analogue of writing a complex number z = r * e^{i*theta} in polar form: the magnitude r corresponds to the stretch factor P, and the angle theta corresponds to the rotation U. The decomposition is unique when A is invertible. When A is singular, U is still unique but P is not, though the semi-definite property is preserved.

How the calculator computes the decomposition

The calculation uses the singular value decomposition (SVD): A = W * Sigma * V^T, where W and V are orthogonal and Sigma is a diagonal matrix of singular values. The orthogonal factor is then U = W * V^T, and the positive semi-definite factor is P = V * Sigma * V^T. The columns of V are the eigenvectors of A^T A, and the diagonal entries of Sigma are the corresponding square roots of those eigenvalues, called singular values. The Jacobi iteration method is used here to diagonalise A^T A, which is numerically stable for small matrices.

Physical and engineering applications

In continuum mechanics, the polar decomposition of the deformation gradient F = R * U (right polar) or F = V * R (left polar) separates rigid-body rotation R from material stretch U or V. In computer graphics, animators use it to remove the rotational component from a transformation so that meshes deform smoothly without spinning artifacts. In machine learning and signal processing, polar decomposition is used to project a matrix onto the closest orthogonal matrix (the Stiefel manifold), which appears in orthogonal regularisation and in optimising rotation matrices in 3D pose estimation. In numerical linear algebra, it is a building block for computing the matrix square root and the matrix sign function.

Properties and verification

Three quick checks confirm a valid polar decomposition: (1) U^T U should equal the identity matrix - the reconstruction residual for this is displayed as det(U) being +1 or -1. (2) P must be symmetric: P = P^T. (3) All eigenvalues of P must be non-negative, which is guaranteed because they equal the singular values of A. The residual ||A - UP||_F shown in the results panel measures how accurately the factors reconstruct A and should be near machine epsilon (around 1e-14 for double precision). A non-zero residual signals a rank-deficient input matrix.

Interpreting the polar factors U and P

PropertyU (orthogonal factor)P (positive semi-definite factor)
Columns are...OrthonormalNot necessarily orthogonal
Determinant+1 (rotation) or -1 (reflection)Product of singular values (>= 0)
SymmetryNot symmetric in generalAlways symmetric: P = Pᵀ
EigenvaluesLie on the unit circleEqual to singular values of A (>= 0)
InverseU⁻¹ = UᵀP⁻¹ exists iff A is invertible
Physical meaningRigid body rotation/reflectionElastic stretch or compression
UniquenessUnique if A is invertibleAlways unique

Properties guaranteed by the polar decomposition theorem for any real square matrix.

Frequently asked questions

What is the difference between the right polar decomposition and the left polar decomposition?

The right polar decomposition writes A = U * P where U appears on the left. The left polar decomposition writes A = P2 * U where the orthogonal factor is on the right and P2 = U * P * U^T. Both decompositions use the same orthogonal factor U and the same singular values. This calculator computes the right polar form A = U * P. In continuum mechanics, the right form uses the right stretch tensor and the left form uses the left stretch tensor (often called V).

Is the polar decomposition unique?

Yes, if and only if A is invertible (all singular values are strictly positive). When A is singular, P is still unique, but U may not be - there can be multiple orthogonal matrices that satisfy A = U * P. For invertible A, the formula U = A * P^{-1} gives the unique U directly, and P = (A^T A)^{1/2} gives the unique positive definite P.

What does it mean if det(U) = -1?

A determinant of -1 means U is an improper orthogonal transformation: it includes a reflection in addition to (or instead of) a rotation. This happens whenever det(A) < 0. In applications where you need a pure rotation matrix (det = +1), you can force this by flipping the sign of the column of W corresponding to the smallest singular value before computing U = W * V^T. The calculator reports which case applies in the insight panel.

How is polar decomposition related to the SVD?

The SVD A = W * Sigma * V^T is the key computational step. Once the SVD is known, the polar decomposition follows immediately: U = W * V^T and P = V * Sigma * V^T. Every polar decomposition can be derived from the SVD, and the SVD provides a constructive proof that the polar decomposition exists for every real square matrix.

Why are the singular values the eigenvalues of P?

Substituting P = V * Sigma * V^T shows that P * V = V * Sigma, which is the eigenvector equation. The columns of V are the eigenvectors of P, and the corresponding eigenvalues are exactly the diagonal entries of Sigma - the singular values of A. Because Sigma has non-negative diagonal entries and V is orthogonal, P is always positive semi-definite.

Can this calculator handle complex matrices?

No - this tool works only with real matrices. For complex matrices, U would be a unitary matrix (U* U = I where * denotes the conjugate transpose) and P would be a Hermitian positive semi-definite matrix. The mathematics is analogous but the SVD computation requires complex arithmetic.

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…