Polar Decomposition Calculator - U and P Factor Solver

Use this polar decomposition calculator to factor any invertible 2x2 matrix into the orthogonal factor U and the symmetric positive definite factor P, with determinant sign and U^T U = I verification.

Updated: June 16, 2026 • Free Tool

Polar Decomposition Calculator

Top-left entry of A. The polar decomposition accepts any real 2x2 input with det(A) ≠ 0; singular inputs are rejected with a clear error.

Top-right entry of A. Set to 0 for a shear or rotation.

Bottom-left entry of A. Controls off-diagonal asymmetry with a₁₂.

Bottom-right entry of A. A and D set the trace and det of the input.

Results

U[1,1]
0
U[1,2] 0
U[2,1] 0
U[2,2] 0
P[1,1] 0
P[1,2] 0
P[2,2] 0
det(A) 0
det(U) 0
det(P) 0
U^T U max error 0

What Is the Polar Decomposition Calculator?

A polar decomposition calculator factors an invertible 2x2 real matrix A into A = U P, where U is orthogonal and P is symmetric positive definite. Singular (rank-deficient) inputs are rejected because U is not unique when A loses rank. U captures the rotation or reflection of A and P captures the stretching. The calculator returns U and P as bracket matrices, reports det(A), det(U), and det(P), and prints the U^T U verification error. A 2x2 input like A = [[1, 1], [0, 1]] factors into a 26.57 degree rotation plus a stretch, in one pass.

  • Continuum mechanics: Split F = R U so the right stretch tensor U describes the material stretch without any rotational component.
  • Robotics interpolation: Pull the rotation out of a homogeneous transform so end-effector poses can be interpolated along the rotation group.
  • Geometry and graphics: Read the principal axes of a shear or anisotropic scaling by separating the rotation from the stretch.
  • Numerical sanity check: Confirm a hand calculation with U P = A, U^T U, and the determinant sign.

The right polar decomposition is unique for any real square A with det(A) ≠ 0: P is the unique symmetric square root of A^T A, and U = A P^{-1} is the unique rotation or reflection with U^T U = I. The rotation-versus-reflection split is decided by the sign of det(A): positive yields a proper rotation (det(U) = +1), negative yields an improper rotation (det(U) = -1).

For 2x2 matrices the rotation case is the same algebraic structure as multiplying a complex number, so the Complex Number Calculator helps when you want to read the orthogonal factor as a single complex unit.

How the Polar Decomposition Calculator Works

The calculator builds C = A^T A, takes the symmetric matrix square root P, and reads off U = A P^{-1}. For 2x2 inputs the square root is a closed form, and U^T U is reduced to a single maximum error.

A = U P, with U^T U = I and P = sqrt(A^T A); for 2x2 SPD C with tr(C) = t and det(C) = d, P = (C + sqrt(d) I) / sqrt(t + 2 sqrt(d))
  • A: The 2x2 input matrix with entries a, b, c, d. The decomposition is defined for any real 2x2 A with det(A) ≠ 0; singular inputs are out of scope because U is not unique for rank-deficient A.
  • C = A^T A: The symmetric positive semi-definite matrix that drives P. Its determinant is non-negative for real A.
  • P: The symmetric positive semi-definite factor, the matrix square root of A^T A. P[1,2] = P[2,1] by symmetry.
  • U: The orthogonal factor with U^T U = I. det(U) equals the sign of det(A): +1 for a proper rotation, -1 for a reflection.

The closed form for P comes from Cayley-Hamilton: P^2 - tr(P) P + det(P) I = 0 gives P = (C + sqrt(d) I) / sqrt(t + 2 sqrt(d)). Once P is in hand, U = A P^{-1} takes four multiplications. The verification step multiplies U^T by U and reduces it to a single maximum error, which is zero for a clean factorization.

2x2 shear A = [[1, 1], [0, 1]]

A = [[1, 1], [0, 1]], so C = A^T A = [[1, 1], [1, 2]].

tr(C) = 3, det(C) = 1, so tr(P) = sqrt(5) and det(P) = 1. P = (C + I) / sqrt(5) = [[2, 1], [1, 3]] / sqrt(5). U = A P^{-1} = (1 / sqrt(5)) [[2, 1], [-1, 2]].

U ≈ [[0.8944, 0.4472], [-0.4472, 0.8944]], P ≈ [[0.8944, 0.4472], [0.4472, 1.3416]], det(A) = 1, det(U) = 1, det(P) = 1, max error = 0.

The shear splits into a 26.57 degree rotation plus a stretch with principal scales 1 and sqrt(2).

P is the matrix square root of A^T A, the same object that drives the Cholesky factor L. The Cholesky Decomposition Calculator shows the lower-triangular route through that symmetric positive definite object.

According to Wikipedia Polar decomposition, every real square matrix admits a polar decomposition A = U P with U orthogonal and P symmetric positive semi-definite, and P is the unique symmetric square root of A^T A.

Key Concepts Behind the Polar Decomposition

Four ideas carry the entire calculation, each one showing up in a different line of the result panel.

A = U P factorization

The polar decomposition splits A into the product of an orthogonal matrix U and a symmetric positive semi-definite matrix P. U describes the rotation or reflection; P describes the stretching.

Symmetric factor P

P is the unique symmetric matrix satisfying P^2 = A^T A, so P is the matrix square root of A^T A. Its entries are real, its diagonal is non-negative, and det(P) = sqrt(det(A^T A)).

Orthogonal factor U

U satisfies U^T U = I, so it preserves lengths and angles. det(U) is the sign of det(A): +1 for a proper rotation, -1 for a reflection.

Right vs left form

The right form A = U P is what this calculator returns, with P = sqrt(A^T A). The left form A = P' U uses P' = sqrt(A A^T) instead. The two forms coincide only when A is symmetric, because A A^T and A^T A are equal in that case.

P is sometimes called the right stretch tensor in mechanics, and its eigenvalues are the principal stretches. The polar decomposition is related to the SVD A = V Sigma W^T as U = V W^T and P = W Sigma W^T. The 2x2 calculator takes the direct route through A^T A because the closed form is short and exact.

Because U preserves lengths, the columns of U are unit vectors, and the Vector Magnitude Calculator is the right next step when you want to check the column length of U by hand.

How to Use This Polar Decomposition Calculator

Enter the four entries of a 2x2 matrix and read off the orthogonal factor U, the symmetric factor P, the determinants, and the verification line.

  1. 1 Type the four entries of A: Fill a₁₁, a₁₂, a₂₁, and a₂₂ in row-major order. Negative values are fine.
  2. 2 Read U: U appears as a bracket matrix and as U[1,1], U[1,2], U[2,1], U[2,2]. Columns are orthonormal, confirmed by the U^T U error.
  3. 3 Read P: P is symmetric with P[1,2] = P[2,1]. Diagonal entries are non-negative and det(P) = sqrt(det(A^T A)).
  4. 4 Check the determinant sign: det(A), det(U), det(P) are reported together. det(U) is +1 for a rotation, -1 for a reflection, and det(A) = det(U) det(P) to four decimals.
  5. 5 Read the U^T U error: The largest absolute difference between U^T U and the identity. Zero is a clean factorization; a non-zero value points to a poorly conditioned input.
  6. 6 Reset: Restores the identity defaults. The calculator re-runs on every keystroke.

For A = [[2, 1], [1, 2]] (a symmetric positive definite matrix), the calculator returns U = I and P = A, with det(A) = 3, det(U) = 1, det(P) = 3, and max error = 0. A symmetric positive definite input is its own polar factor, a useful sanity check.

Benefits of Using This Polar Decomposition Calculator

The calculator replaces a hand-coded closed form with one read-off that includes the rotation, the stretch, the determinant sign, and a numerical verification.

  • Saves a hand calculation: The closed form for the symmetric square root of a 2x2 SPD matrix involves a determinant, a square root, and a Cayley-Hamilton step.
  • Surfaces rotation and stretch separately: U and P come back as separate matrices, so the rotation and stretches read directly.
  • Pairs with other factorizations: The same 2x2 input can be fed into a Cholesky decomposition, and U^T U certifies the polar factor is orthogonal.
  • Real-time recompute: U, P, the determinants, and the verification line update as soon as any entry changes.
  • Teaches the geometric meaning: Reading U and P side by side shows what a shear, stretch, or reflection looks like once split.

For an invertible input the polar decomposition always exists and is unique, so the result panel matches a hand calculation. The verification line is the safety net: a non-zero max error means the input pushed the 2x2 closed form outside its numerical comfort zone.

Reading P as a stretch tensor is easier with the adjugate, and the Adjoint Matrix Calculator returns the adjugate of a 2x2 input in the same step the polar decomposition returns the symmetric factor.

Factors That Affect Your Polar Decomposition Result

Four properties of the input matrix decide what the result panel looks like and how clean the calculation stays.

Sign of det(A)

Positive det(A) gives a proper rotation (det(U) = +1); negative gives a reflection (det(U) = -1).

Symmetry of A

A symmetric positive definite input has U = I and P = A, the simplest case.

Conditioning of A^T A

An ill-conditioned A^T A drives the entries of P and P^{-1} upward.

Magnitude of the entries

Entries above 100 or below 0.01 push det(C) and tr(C) into regimes where the closed form loses precision.

  • 2x2 real matrices only. Larger square matrices use the same decomposition, but the closed form is replaced by an iterative algorithm such as the scaled Newton iteration.
  • A is assumed real. A complex matrix has a polar decomposition, but the orthogonal factor is unitary and the symmetric factor is Hermitian, a different output.
  • A singular A is reported as an error because P cannot be inverted and U is no longer unique.

If the U^T U max error rises above 1e-10, the input is at the edge of the closed form's numerical comfort zone. Rescale A so the entries sit between 0.1 and 10 and det(A^T A) stays close to one. The polar decomposition of the rescaled matrix is undone by rescaling P by the same constant.

According to Wolfram MathWorld Polar decomposition, the polar decomposition of a real matrix A is A = U P with U orthogonal and P the symmetric positive semi-definite factor, with det(U) = 1 when det(A) >= 0 and det(U) = -1 when det(A) < 0.

According to Higham, Functions of Matrices (SIAM, 2008), the symmetric square root P of a positive semi-definite matrix is the unique symmetric factor satisfying P^2 = A^T A and is the basis for the polar factor used in numerical linear algebra.

The U^T U = I line is a pair of dot products on the columns of U, so the Dot Product Calculator is the right next step when a hand check on the orthogonality of U is needed.

Polar decomposition calculator showing a 2x2 matrix factored into the orthogonal factor U and the symmetric positive definite factor P, with U^T U = I verification and determinant sign readout
Polar decomposition calculator showing a 2x2 matrix factored into the orthogonal factor U and the symmetric positive definite factor P, with U^T U = I verification and determinant sign readout

Frequently Asked Questions

Q: What is a polar decomposition calculator used for?

A: A polar decomposition calculator factors a real square matrix A into A = U P, where U is an orthogonal matrix and P is a symmetric positive semi-definite matrix. It is used in continuum mechanics to split a deformation gradient into a rotation and a stretch, in robotics to pull the rotation out of a homogeneous transform, and in numerical linear algebra to expose the geometric action of a matrix without losing any information.

Q: What does the calculator output show?

A: The calculator outputs the orthogonal factor U as a bracket matrix and as the four entries U[1,1], U[1,2], U[2,1], U[2,2]. It outputs the symmetric factor P in the same format. It also reports det(A), det(U), and det(P), and prints the maximum U^T U = I verification error so the result can be checked numerically.

Q: Is polar decomposition the same as singular value decomposition?

A: No. The polar decomposition writes A as the product of two matrices, U and P, and the SVD writes A as the product of three matrices, V, Sigma, and W^T. The polar factors can be recovered from the SVD as U = V W^T and P = W Sigma W^T, but the polar decomposition is a shorter expression that emphasizes the rotation-versus-stretch split.

Q: When does a 2x2 matrix have a proper rotation as the orthogonal factor?

A: The orthogonal factor U is a proper rotation when det(A) is positive, which makes det(U) = +1. When det(A) is negative, U is an improper rotation, a reflection composed with a rotation, and det(U) = -1. The result panel reads off the sign of det(U) directly.

Q: How is the symmetric square root P of A^T A computed?

A: For a 2x2 symmetric positive semi-definite matrix C = A^T A with trace t and determinant d, the symmetric square root is P = (C + sqrt(d) I) / sqrt(t + 2 sqrt(d)). The identity comes from the Cayley-Hamilton theorem applied to P, and it gives a closed form the calculator evaluates directly.

Q: What happens if the input matrix is singular?

A: A singular A makes A^T A singular as well, so the symmetric square root P is also singular. P cannot be inverted, so the orthogonal factor U = A P^{-1} is not defined. The calculator reports this case as a clear error and asks for a non-singular 2x2 input.