computes the polar decomposition of a numeric matrix m as a pair {u,p}, where u is unitary and p is positive semidefinite.
PolarDecomposition
computes the polar decomposition of a numeric matrix m as a pair {u,p}, where u is unitary and p is positive semidefinite.
Details and Options
- The polar decomposition of a matrix is analogous to the exponential form of a complex number, z==Exp[I θ]r.
- The matrix
returned by PolarDecomposition is positive semidefinite and Hermitian. If the input matrix is real, then
is additionally a real symmetric matrix. - The matrix
is uniquely defined by the requirement that it equal the matrix square root,
. » - The matrix
returned by PolarDecomposition is unitary in the sense that
, or
when dealing with square matrices. If the input is real valued, then
is additionally a real orthogonal matrix. » - The matrix
always has the same dimensions as the input matrix. The matrix
is always a square matrix with the same number of columns as the input. » - PolarDecomposition takes the follow option:
-
TargetStructure Automatic the structure of the returned matrices - Possible settings for TargetStructure include:
-
Automatic, "Structured" return u as a OrthogonalMatrix or UnitaryMatrix object and p as a SymmetricMatrix or HermitianMatrix object "Dense" return both matrices as lists of lists "Sparse" return both matrices as SparseArray objects - Whether the structured matrix types returned are the pair OrthogonalMatrix and SymmetricMatrix or UnitaryMatrix and HermitianMatrix depends on the reality of the input. If it is real valued, the former pair is used. Otherwise, the latter pair will be used. »
- Mathematically, if the input matrix does not have full rank,
need not be unique. »
Examples
open all close allBasic Examples (1)
Perform the polar decomposition of a 2×2 matrix:
{u, p} = PolarDecomposition[(| | |
| --- | - |
| 1 | 2 |
| 3.5 | 4 |)]The matrix
is positive definite and real symmetric:
{MatrixForm[p], PositiveSemidefiniteMatrixQ[p] && SymmetricMatrixQ[p]}The matrix
is real orthogonal:
{MatrixForm[u], OrthogonalMatrixQ[u]}The product
is the original matrix:
u.p//MatrixFormScope (4)
Compute the polar decomposition
for a 4×3 matrix
:
m = (| | | |
| -- | --- | --- |
| 1. | 2. | 3. |
| 1. | 5. | 6. |
| 1. | 8. | 9. |
| 1. | 11. | 12. |);
{u, p} = PolarDecomposition[m]The matrix
has the same shape as
, while
is square:
MatrixForm /@ {u, p}m == u.pSince
is rectangular, being real (semi-)orthogonal means PseudoInverse[u] == Transpose[u]:
{OrthogonalMatrixQ[u], PseudoInverse[u] == u}The matrix
is real symmetric and positive semidefinite:
SymmetricMatrixQ[p] && PositiveSemidefiniteMatrixQ[p]Compute the polar decomposition of a complex matrix
:
m = (| | |
| -------- | -------- |
| .5 + I | 1.5 + 2I |
| 2 - 1.5I | -0.5I |);
{u, p} = PolarDecomposition[m]As
is complex valued,
is a complex-valued Hermitian matrix:
{p//Chop//MatrixForm, HermitianMatrixQ[p]}Despite being complex valued,
is still positive semidefinite:
PositiveSemidefiniteMatrixQ[p]Moreover,
is a complex-valued unitary matrix:
{u//MatrixForm, UnitaryMatrixQ[u]}Confirm the decomposition up to numerical error:
u.p - m//ChopA matrix with entries having 20-digit precision:
m = N[(| | | |
| - | - | - |
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |), 20];The polar decomposition is computed using the full 20-digit precision of the input:
{u, p} = PolarDecomposition[m]Precision[{u, p}]{UnitaryMatrixQ[u], HermitianMatrixQ[p], PositiveSemidefiniteMatrixQ[p], u.p == m}The polar decomposition of an exact
matrix:
m = (1 Sqrt[2]);
{u, p} = PolarDecomposition[m]As expected,
is square, real symmetric and positive semidefinite:
{p//MatrixForm, PositiveSemidefiniteMatrixQ[p]}And
is a real orthogonal matrix of the same shape as
:
{u//MatrixForm, OrthogonalMatrixQ[u]}m == u.pOptions (3)
TargetStructure (3)
By default, structured matrices are returned:
m = RandomReal[1, {4, 4}];
PolarDecomposition[m]This is equivalent to setting TargetStructure->"Structured":
% === PolarDecomposition[m, TargetStructure -> "Structured"]Use TargetStructure->"Dense" to get the results as normal lists:
PolarDecomposition[RandomReal[1, {4, 4}], TargetStructure -> "Dense"]Use TargetStructure->"Sparse" to get the results as SparseArray objects:
PolarDecomposition[RandomReal[1, {4, 4}], TargetStructure -> "Sparse"]Note, however, that the results are unlikely to be sparse:
Comap[%, "Density"]Applications (1)
Consider the polar decomposition of the following noninvertible
matrix:
m = (| | |
| - | - |
| 0 | 1 |
| 0 | 0 |);
{u, p} = PolarDecomposition[m];
MatrixForm /@ {u, p}The matrix
is uniquely defined by the requirement that it equal the non-negative matrix square root,
:
p == MatrixPower[m.m, 1 / 2]However,
only has to satisfy the conditions
and
(since
is real valued). Solve these equations for a general matrix, where the latter equation has been rewritten as
:
u2 = {{a, b}, {c, d}};
sol = Solve[m == u2.p && u2.u2 == IdentityMatrix[2], {a, b, c, d}]The first solution is the matrix
returned by PolarDecomposition:
u == u2 /. First[sol]The second solution is a different unitary matrix:
MatrixForm[u2 = u2 /. Last[sol]]Confirm that
is also a unitary matrix that reconstructs
:
m == u2.p && UnitaryMatrixQ[u]Properties & Relations (9)
For a
matrix, PolarDecomposition[m] equals {Exp[I Arg[m]],Abs[m]}:
With[{m = RandomComplex[1 + I, {1, 1}, WorkingPrecision -> $MachinePrecision]}, PolarDecomposition[m] == {Exp[I Arg[m]], Abs[m]}]For Hermitian positive semidefinite input h, the positive symmetric part of the decomposition is h itself:
h = HilbertMatrix[3, WorkingPrecision -> $MachinePrecision];
{u, p} = PolarDecomposition[h];
PositiveDefiniteMatrixQ[h] && p == hThe unitary part of the decomposition is simply an identity matrix:
u == IdentityMatrix[3]For unitary m, the unitary part of PolarDecomposition[m] is m, itself:
m = RandomVariate[CircularUnitaryMatrixDistribution[3], WorkingPrecision -> $MachinePrecision];
{u, p} = PolarDecomposition[m]The positive definite Hermitian part is an identity matrix:
p == IdentityMatrix[3]If {u,p}==PolarDecomposition[m], then p==MatrixPower[ConjugateTranspose[m].m, 1/2]:
m = RandomComplex[1 + I, {5, 4}];
{u, p} = PolarDecomposition[m];
p - MatrixPower[m.m, 1 / 2]//ChopAnd u satisfies ConjugateTranspose[u]==PseudoInverse[u]:
u^† == PseudoInverse[u]If {u,p}==PolarDecomposition[m], then u and m have the same dimensions:
m = RandomReal[1, {RandomInteger[{1, 5}], RandomInteger[{1, 5}]}];
{u, p} = PolarDecomposition[m];
{r, c} = Dimensions[m];
Dimensions[u] == {r, c}p is a square matrix with the same number of columns as m:
Dimensions[p] == {c, c}If the input is real, PolarDecomposition returns OrthogonalMatrix and SymmetricMatrix objects:
m = (| | |
| - | - |
| 1 | 2 |
| 3 | 4 |);
PolarDecomposition[m]%∈Arrays[{2, 2, 2}, Reals]Otherwise it returns UnitaryMatrix and HermitianMatrix objects:
PolarDecomposition[(1 + I) m]A matrix is normal if and only if the matrices in its polar decomposition commute. First, consider a normal matrix:
n = (| | |
| -- | - |
| 1 | 2 |
| -2 | 1 |);
NormalMatrixQ[n]The pieces of its polar decomposition commute (
):
{un, pn} = PolarDecomposition[n];
Commutator[un, pn, Dot]//MatrixFormNext, consider a non-normal matrix:
e = (| | |
| - | - |
| 0 | 1 |
| 0 | 0 |);
NormalMatrixQ[e]The pieces of its polar decomposition do not commute:
{ue, pe} = PolarDecomposition[e];
Commutator[ue, pe, Dot]//MatrixFormA polar decomposition
can be recovered from the singular value decomposition
as
and
:
m = RandomComplex[1 + I, {3, 3}];
{w, σ, v} = SingularValueDecomposition[m];
{u, p} = PolarDecomposition[m];
u == w.ConjugateTranspose[v] && p == v.σ.ConjugateTranspose[v]QRDecomposition factorizes a matrix into unitary and upper triangular matrices:
m = RandomReal[1, {4, 4}];
{q, r} = QRDecomposition[m];
UnitaryMatrixQ[q] && UpperTriangularMatrixQ[r]PolarDecomposition, by contrast, factorizes into unitary and Hermitian positive semidefinite matrices:
{u, p} = PolarDecomposition[m];
UnitaryMatrixQ[q] && HermitianMatrixQ[p] && PositiveSemidefiniteMatrixQ[p]Possible Issues (2)
PolarDecomposition can give an unwieldy result for exact matrices:
PolarDecomposition[{{27, 48, 81}, {-6, 0, 0}, {1, 0, 3}}, TargetStructure -> "Dense"]For even modest dimensions, the polar decomposition of an exact matrix can be quite slow:
TimeConstrained[PolarDecomposition[{{61, 86, 35, 2, 21, 74, 98, 54}, {61, 29, 7, 19, 80, 24, 70, 12}, {6, 70, 66, 62, 91, 38, 42, 13}, {20, 58, 72, 53, 28, 6, 88, 91}, {53, 89, 25, 81, 9, 22, 25, 68}, {76, 41, 28, 62, 39, 94, 100, 77}, {69, 20, 60, 49, 23, 70, 1, 3}, {31, 98, 82, 48, 38, 69, 85, 37}}], 600, $TimedOut]Related Guides
History
Text
Wolfram Research (2026), PolarDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/PolarDecomposition.html.
CMS
Wolfram Language. 2026. "PolarDecomposition." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PolarDecomposition.html.
APA
Wolfram Language. (2026). PolarDecomposition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PolarDecomposition.html
BibTeX
@misc{reference.wolfram_2026_polardecomposition, author="Wolfram Research", title="{PolarDecomposition}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/PolarDecomposition.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_polardecomposition, organization={Wolfram Research}, title={PolarDecomposition}, year={2026}, url={https://reference.wolfram.com/language/ref/PolarDecomposition.html}, note=[Accessed: 13-June-2026]}