polar | R Documentation |
polar
calculates the left polar decomposition of a matrix.
polar(X)
X |
A matrix. |
polar
Takes a matrix X, of dimensions n by
p, and returns two matrices P and Z such that
X = PZ. P is a symmetric positive definite matrix of
dimension n by n and Z is an n by p
matrix with orthonormal rows.
P
A n by n symmetric positive definite
matrix.
Z
A n by p matrix with orthonormal rows.
Note that X == P %*% Z
, up to numerical precision.
David Gerard.
X <- matrix(1:6, nrow = 2) polar_x <- polar(X) P <- polar_x$P Z <- polar_x$Z P Z trim(Z %*% t(Z)) trim(X - P %*% Z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.