Advanced maths

Matrix polar decomposition calculator for rectangular matrices

Decompose a real rectangular matrix as A=UH with a canonical partial isometry, positive-semidefinite stretch, exact rank and numerical residuals.

Your numbers

One rational row per line, comma-separated; at most 6 rows and columns.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Polar decomposition separates the action of a real matrix into a symmetric stretch and an isometric action on the directions that survive the matrix. This page uses the right form A=UH, so H has one row and column per input column. For rank-deficient input, the canonical U is a partial isometry and vanishes on the kernel; adding an arbitrary orthogonal completion would change that convention. Exact rational row reduction determines rank, while numerical Jacobi singular directions construct the factors and support explicit reconstruction checks.

THE FORMULAA=UH, H=(AᵀA)^(1/2); U is zero on ker(A) and isometric on its orthogonal complement.

A worked example

For A with rows (3,0), (0,0), (0,4), the two columns are orthogonal and have lengths three and four. The right stretch is H=diag(3,4), and U has rows (1,0), (0,0), (0,1). Their product is A, and U has orthonormal columns in this full-column-rank example. If the second column is replaced by zero, the rank drops to one and the canonical U also has a zero second column rather than an invented unit vector.

Good to know

Real rational rectangular matrices up to 6×6, including zero and rank-deficient inputs. Factors are numerical; the rank is exact for the entered rational values. Retained singular directions require a relative singular-value ratio above 10^−10. One-sided Jacobi iteration is capped at 150 sweeps and exact rank must agree with retained directions. Reconstruction, stretch-square and partial-isometry residuals must remain below 5×10^−9; failure returns an error.

The right stretch acts before the partial isometry

In A=UH, a column vector is first transformed by H and then by U. The stretch lives in the input-coordinate space and is symmetric positive semidefinite, so it can scale orthogonal directions without a negative stretch eigenvalue. For a rectangular m×n matrix, U is m×n and H is n×n. The left form uses a different m×m stretch and places that factor before U in the written product.

The positive square root of AᵀA determines H uniquely. On a nonzero singular direction, dividing its image by its singular value defines U. On a zero singular direction, that division is unavailable; the canonical convention sets U to zero. Some decompositions instead choose an orthogonal completion on the nullspace. Their product can still reconstruct A, but their U need not match the canonical partial isometry returned here.

Two orthogonal input columns stretch by three and four before a rectangular isometry34Input stretch HH = diag(3,4)Ue1 = (1,0,0)Ue2 = (0,0,1)A = UH; rank 2
A has columns (3,0,0) and (0,0,4). H=diag(3,4) stretches two input axes, while U sends them to the first and third output axes. U has a zero middle row; A=UH and rank is two.

Rank and conditioning are separate from a small reconstruction error

A tiny singular direction can be difficult to recover numerically even when the entered rational matrix has full exact rank. This calculator checks rational rank independently and refuses a retained singular-value ratio below its stated threshold. It does not silently reinterpret a small nonzero direction as exactly zero. Users working with uncertain measurements may prefer an application-specific rank tolerance rather than the exact decimal interpretation used on this page.

The output reports three checks: UH reproduces A, H² reproduces AᵀA, and U(UᵀU) reproduces U. The last identifies the partial-isometry behavior; UᵀU is a projector and need not be the identity for deficient rank. The Real 2×2 singular value decomposition calculator exposes the three SVD factors in a smaller family. Here the goal is the canonical rotation-or-reflection action plus stretch, with rectangular and kernel semantics made explicit.

A few questions, answered

Why is U not always orthogonal?

A rectangular or rank-deficient U can be a partial isometry. It preserves lengths only on the appropriate nonzero input subspace and is zero on the kernel.

Is H computed entry by entry?

No. It is the positive-semidefinite matrix square root of AᵀA, constructed from singular directions rather than by taking square roots of individual entries.

Find your calculator

Start typing to explore the library.