# jax.scipy.linalg.polar#

jax.scipy.linalg.polar(a, side='right', *, method='qdwh', eps=None, max_iterations=None)[source]#

Computes the polar decomposition.

Given the $$m \times n$$ matrix $$a$$, returns the factors of the polar decomposition $$u$$ (also $$m \times n$$) and $$p$$ such that $$a = up$$ (if side is "right"; $$p$$ is $$n \times n$$) or $$a = pu$$ (if side is "left"; $$p$$ is $$m \times m$$), where $$p$$ is positive semidefinite. If $$a$$ is nonsingular, $$p$$ is positive definite and the decomposition is unique. $$u$$ has orthonormal columns unless $$n > m$$, in which case it has orthonormal rows.

Writing the SVD of $$a$$ as $$a = u_\mathit{svd} \cdot s_\mathit{svd} \cdot v^h_\mathit{svd}$$, we have $$u = u_\mathit{svd} \cdot v^h_\mathit{svd}$$. Thus the unitary factor $$u$$ can be constructed as the application of the sign function to the singular values of $$a$$; or, if $$a$$ is Hermitian, the eigenvalues.

Several methods exist to compute the polar decomposition. Currently two are supported:

• method="svd":

Computes the SVD of $$a$$ and then forms $$u = u_\mathit{svd} \cdot v^h_\mathit{svd}$$.

• method="qdwh":

Applies the QDWH (QR-based Dynamically Weighted Halley) algorithm.

Parameters:
Return type:
Returns:

A (unitary, posdef) tuple, where unitary is the unitary factor ($$m \times n$$), and posdef is the positive-semidefinite factor. posdef is either $$n \times n$$ or $$m \times m$$ depending on whether side is "right" or "left", respectively.