Factor a nonsingular real 2 by 2 matrix into an orthogonal factor and a symmetric positive-definite factor.
Calculate matrix polar decomposition
Enter the four entries of a nonsingular 2 by 2 matrix A.
About matrix polar decomposition
The polar decomposition factors a real matrix A into a product QP. For a nonsingular square matrix, Q is orthogonal and P is symmetric positive definite. An orthogonal matrix preserves lengths and angles, so it represents a rotation or reflection. The positive factor stretches space along perpendicular principal directions without adding rotation. This separation is the matrix counterpart of writing a nonzero complex number as a magnitude multiplied by a unit direction.
This calculator handles real nonsingular two-by-two matrices. It first forms the symmetric Gram matrix A transpose times A. The positive square root of that matrix is P. For a two-by-two positive-definite matrix, the square root can be evaluated directly from its trace and determinant, avoiding an iterative approximation. The orthogonal factor then follows from Q equals A times the inverse of P. Displayed entries are rounded to six decimal places, while the internal calculations retain JavaScript double precision.
The factors have useful identities that make the answer easy to check. Multiplying Q transpose by Q gives the identity matrix, apart from rounding error. Matrix P equals its own transpose and has positive eigenvalues. Finally, multiplying Q by P reconstructs the original matrix A. For the identity matrix, both factors are the identity. For a matrix that combines a quarter-turn with unequal axis scaling, Q isolates the quarter-turn while P records the two stretch factors.
Polar decomposition appears in mechanics, graphics, numerical analysis, optimization, and statistics. In continuum mechanics it separates deformation into rigid rotation and pure stretch. In computer graphics it helps extract rotation from a transformation that also includes scale or shear. The orthogonal Procrustes problem uses the polar factor to find the closest orthogonal matrix, and numerical algorithms use polar iterations when preserving geometric structure matters.
A singular matrix can also possess a polar decomposition, but its orthogonal factor may not be unique and calculating it requires extra conventions. This interactive calculator restricts input to nonsingular matrices so that P has an inverse and the displayed factorization is unambiguous. Very ill-conditioned matrices can amplify floating-point error because one stretch direction is close to zero. Use the result as a clear educational and computational aid, and verify high-stakes numerical work with software designed for arbitrary precision or larger matrix dimensions.
Polar decomposition examples
Matrix A
Factors
Interpretation
[1, 0] [0, 1]
Q = I, P = I
The identity contains no rotation or stretch.
[0, -2] [3, 0]
Q = [0, -1] [1, 0], P = [3, 0] [0, 2]
A 90-degree rotation followed by unequal stretching.
[2, 0] [0, 4]
Q = I, P = [2, 0] [0, 4]
A positive diagonal matrix is already pure stretch.
How to calculate polar decomposition
Enter the matrix entries in row order.
Select Calculate polar decomposition.
Read the orthogonal Q matrix and symmetric positive P matrix.
Multiply Q by P to verify that the factors reconstruct the input matrix.
Polar decomposition FAQ
What does polar decomposition separate?
It separates an invertible linear transformation into an orthogonal rotation or reflection and a symmetric positive stretch. Their product reproduces the original transformation.
How is polar decomposition related to complex polar form?
Both split an object into a magnitude-like part and a direction-like part. For matrices, the positive factor generalizes magnitude and the orthogonal factor generalizes a unit complex direction.
How can I verify the Q factor?
Multiply the transpose of Q by Q. The result should be the identity matrix, allowing for the six-decimal rounding shown by the calculator.
Why is a singular matrix rejected?
The direct method used here calculates Q by multiplying A by the inverse of P. A singular matrix makes P noninvertible and may not have a unique orthogonal factor.
Is P always diagonal?
No, P is symmetric positive definite but may contain nonzero off-diagonal entries. It becomes diagonal only when its principal stretch directions align with the coordinate axes.