Let $V$ be an inner product space finitely generated over $\mathbb{C}$ and let $\alpha\in Aut(V)$. Then there exists a unique positive-definite automorphism $\theta$ of $V$ and a unique unitary automorphism $\psi$ of $V$ satisfying $\alpha=\psi\theta$.
I can show there exist $\theta$ and $\psi$ satisfying $\alpha=\psi\theta$. However, I have problem to show the uniqueness. I appreciate any help.
Assume that $\psi\theta=\psi'\theta'$ where $\psi$ and $\psi'$ are unitary automorphism of $V$ and where $\theta$ and $\theta'$ are positive definite automorphism of $V$.
As $\psi$ is unitary, we get $\psi^*=\psi^{-1}$. Hence,
$$\theta^2=\theta\psi^*\psi\theta=(\psi\theta)^*(\psi\theta)=(\psi'\theta')^*(\psi'\theta')=\theta'(\psi')^*\psi'\theta'=(\theta')^2$$
Both $\theta$ and $\theta'$ are positive definite, but I don't know how to show they are equal.
If you first think of $\theta$ and $\theta'$ as positive definite matrices, then $\theta^2$ (which is function composition in your setup) becomes matrix multiplication.
The result I was trying to refer to is that since $\theta^2$ is positive definite, you can take a "square root" by diagonalizing it and replacing the eigenvalues with their square roots. Similarly for $(\theta')^2$. Note that this square root is unique, so they must be $\theta$ and $\theta'$ respectively. In short, $\theta^2 = (\theta')^2$ implies $\theta=\theta'$.
The argument for operators is essentially the same. Here is a post that goes through the details.