Polar Decomposition Calculator
Factorize a real square matrix into its right polar decomposition A = QH, where Q is orthogonal and H is symmetric positive semidefinite. This decomposition separates a linear transformation into an orthogonal component and a component describing stretching.
A
Learn About Polar Decomposition
The polar decomposition is the matrix analogue of the polar representation of complex numbers $z = r e^{i\theta}$, where $e^{i\theta}$ represents a pure phase rotation on the unit circle and $r = |z| \ge 0$ represents a non-negative radial scaling.
For any square real matrix $\mathbf{A} \in \mathbb{R}^{n \times n}$, the Right Polar Decomposition factors the matrix into:
where:
- $\mathbf{Q} \in \mathbb{R}^{n \times n}$ is an orthogonal matrix ($\mathbf{Q}^T\mathbf{Q} = \mathbf{I}_n$, so $\mathbf{Q}^{-1} = \mathbf{Q}^T$), representing a rigid geometric isometry (pure rotation and/or reflection).
- $\mathbf{H} \in \mathbb{R}^{n \times n}$ is a symmetric positive semi-definite matrix ($\mathbf{H} = \mathbf{H}^T$ and $\mathbf{x}^T\mathbf{H}\mathbf{x} \ge 0$ for all $\mathbf{x} \in \mathbb{R}^n$), representing pure non-negative stretching (dilation) along mutually orthogonal principal axes.
Geometrically, the decomposition asserts that any linear transformation can be factored into a pure anisotropic stretch $\mathbf{H}$ followed by an isometric rotation/reflection $\mathbf{Q}$.
Right vs. Left Polar Decomposition
A square matrix also admits a Left Polar Decomposition:
where the orthogonal factor $\mathbf{Q}$ is identical to the right polar decomposition, and the symmetric positive semi-definite factor $\mathbf{H}'$ is related to $\mathbf{H}$ via similarity:
In the left polar form, the isometric rotation $\mathbf{Q}$ is applied first, followed by the anisotropic stretch $\mathbf{H}'$.
Derivation via Singular Value Decomposition (SVD)
The polar decomposition is computed from the SVD $\mathbf{A} = \mathbf{U}\mathbf{\Sigma}\mathbf{V}^T$:
Setting:
- Because $\mathbf{U}$ and $\mathbf{V}^T$ are orthogonal matrices, their product $\mathbf{Q} = \mathbf{U}\mathbf{V}^T$ is orthogonal: $\mathbf{Q}^T\mathbf{Q} = (\mathbf{V}\mathbf{U}^T)(\mathbf{U}\mathbf{V}^T) = \mathbf{I}_n$.
- Because $\mathbf{\Sigma} \ge 0$ and $\mathbf{H}$ shares the eigenvectors of $\mathbf{V}$, $\mathbf{H}$ is symmetric positive semi-definite with eigenvalues equal to the singular values $\sigma_i(\mathbf{A})$.
Uniqueness Conditions
- Square Invertible Matrix ($\det(\mathbf{A}) \ne 0$): The factorization $\mathbf{A} = \mathbf{Q}\mathbf{H}$ is strictly unique, and $\mathbf{H}$ is strictly positive definite ($\mathbf{H} \succ 0$).
- Square Singular / Rank-Deficient Matrix ($\det(\mathbf{A}) = 0$): The stretch factor $\mathbf{H} = \sqrt{\mathbf{A}^T\mathbf{A}}$ is unique, but $\mathbf{Q}$ is not unique because any orthonormal basis for $\operatorname{Null}(\mathbf{A})$ can be mapped to any orthonormal basis for $\operatorname{Col}(\mathbf{A})^\perp$.
- Rectangular Matrix Generalization ($m \ge n$): For tall rectangular matrices, polar decomposition $\mathbf{A} = \mathbf{Q}\mathbf{H}$ has an $m \times n$ factor $\mathbf{Q}$ satisfying $\mathbf{Q}^T\mathbf{Q} = \mathbf{I}_n$. The factor $\mathbf{Q}$ is strictly unique if and only if $\mathbf{A}$ has full column rank ($\operatorname{rank}(\mathbf{A}) = n$). If $\mathbf{A}$ is rank-deficient ($\operatorname{rank}(\mathbf{A}) < n$), $\mathbf{Q}$ is non-unique, while $\mathbf{H}$ is always unique.
Worked Numerical Example
Compute the right polar decomposition $\mathbf{A} = \mathbf{Q}\mathbf{H}$ for the $2 \times 2$ matrix:
- Compute the Gram Matrix $\mathbf{A}^T\mathbf{A}$:
- Compute the Stretch Matrix $\mathbf{H} = \sqrt{\mathbf{A}^T\mathbf{A}}$:
Because $\mathbf{A}^T\mathbf{A}$ is diagonal, its unique symmetric positive definite square root is obtained by taking the positive square root of each diagonal element:
$\mathbf{H}$ is symmetric ($\mathbf{H} = \mathbf{H}^T$) with strictly positive eigenvalues $\lambda_1 = 2, \lambda_2 = 1$.
- Invert $\mathbf{H}$:
- Compute the Orthogonal Factor $\mathbf{Q} = \mathbf{A}\mathbf{H}^{-1}$:
- Verify Orthogonality and Factorization:
- Orthogonality: $\mathbf{Q}^T\mathbf{Q} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = \mathbf{I}_2$.
- Orientation: $\det(\mathbf{Q}) = (0)(0) - (-1)(1) = 1$ (a pure counterclockwise rotation of $90^\circ$).
- Product: $\mathbf{Q}\mathbf{H} = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} 2 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 0 & -1 \\ 2 & 0 \end{bmatrix} = \mathbf{A}$.
What is the geometric interpretation of the polar factors Q and H?
The matrix $\mathbf{H}$ scales the input space along its principal axes (the eigenvectors of $\mathbf{A}^T\mathbf{A}$) by factors equal to the singular values $\sigma_i$. Subsequently, $\mathbf{Q}$ rotates and/or reflects the stretched space into its final orientation without altering distances or angles.
How does polar decomposition relate to complex numbers?
For a scalar complex number $z = x + iy$, the polar form is $z = e^{i\theta} r$, where $|e^{i\theta}| = 1$ is a unit-circle rotation and $r = |z| \ge 0$ is a non-negative magnitude. In matrix algebra, the orthogonal factor $\mathbf{Q}$ acts as the unitary phase factor $e^{i\theta}$, while the positive semi-definite matrix $\mathbf{H} = \sqrt{\mathbf{A}^T\mathbf{A}}$ acts as the magnitude $r$.
When is the polar decomposition factor Q unique?
For square matrices, the orthogonal factor $\mathbf{Q}$ is strictly unique if and only if $\mathbf{A}$ is non-singular ($\det(\mathbf{A}) \ne 0$). If $\mathbf{A}$ is singular, $\mathbf{H} = \sqrt{\mathbf{A}^T\mathbf{A}}$ remains unique, but $\mathbf{Q}$ is not unique because its action on the null space $\operatorname{Null}(\mathbf{A})$ can be chosen arbitrarily. In theoretical linear algebra for rectangular matrices $\mathbf{A} \in \mathbb{R}^{m \times n}$ ($m \ge n$), polar decomposition $\mathbf{A} = \mathbf{Q}\mathbf{H}$ features an $m \times n$ factor $\mathbf{Q}$ with orthonormal columns ($\mathbf{Q}^T\mathbf{Q} = \mathbf{I}_n$). In this setting, $\mathbf{Q}$ is unique if and only if $\mathbf{A}$ has full column rank ($\operatorname{rank}(\mathbf{A}) = n$). Whenever $\mathbf{A}$ is rank-deficient, $\mathbf{Q}$ is non-unique, while $\mathbf{H}$ is always uniquely determined.
Why is polar decomposition important in continuum mechanics?
In continuum mechanics, the deformation gradient tensor $\mathbf{F} = \boldsymbol{\nabla}\mathbf{x}$ characterizes the local deformation of a material. The polar decomposition $\mathbf{F} = \mathbf{R}\mathbf{U}$ isolates the rigid-body rotation $\mathbf{R}$ from the pure material stretch $\mathbf{U}$, enabling engineers to calculate strain tensors that are invariant under rigid rotations.
- The Best Orthogonal Approximant: The orthogonal factor $\mathbf{Q}$ from the polar decomposition is the unique closest orthogonal matrix to $\mathbf{A}$ in the Frobenius norm: it solves $\min_{\mathbf{M} \in \mathrm{O}(n)} \|\mathbf{A} - \mathbf{M}\|_F$. In computer vision and robotics, this provides the exact solution to the Orthogonal Procrustes problem for point-cloud alignment.
- Higham's Polar Iteration: While SVD computes polar decomposition accurately, Nicholas Higham developed iterative algorithms based on Newton-Schulz and dynamically weighted Halley iterations ($\mathbf{X}_{k+1} = \frac{1}{2}(\mathbf{X}_k + \mathbf{X}_k^{-T})$) that converge quadratically to $\mathbf{Q}$ using only matrix multiplications and matrix inversions.