polard
Polar Decomposition of a matrix.
(U,R)=polard(A)
Inputs
A Any square matrix.
Outputs
U A Hermitian (or symmetric if A is real) matrix.
R A unitary matrix (i.e. R'*R=R*R'=I ).


Description
The results satisfy A=U*R . This decomposition illustrates the basic result in three dimensions that any affine transformation can be decomposed into a rigid body rotation followed by pure defomation.


Example
>>a=[1 2 3 ; 4  5 6; 7 8 9]
>>[u,r]=polard(a)
>>// u is symmetric
>>u
       1.6186        2.121       2.6233
        2.121       4.6326       7.1443
       2.6233       7.1443      11.6652

>>// r is unitary
>>r'*r
            1 -6.6613e-016 -1.1102e-016
 -6.6613e-016            1 -1.1657e-015
 -1.1102e-016 -1.1657e-015            1

>>// get back the original matrix
>>u*r
            1            2            3
            4            5            6
            7            8            9