When is the composition operator assigned to a measure-preserving map unitary? Let $(X,\mathcal{B},\mu)$ be a standard probability space, and let $T:X\rightarrow X$ be a measurable, measure-preserving transformation, i.e. for every $A\in\mathcal{B}$, $\mu(T^{-1}(A))=\mu(A)$. Consider the operator $U_T:L_2(\mu)\rightarrow L_2(\mu)$ given by $U_T (f)=f\circ T$. Clearly it is a linear isometry. My question is whether $U_T$ is unitary.

The answer is yes when $T$ is invertible and with measurable inverse. In this case, $(U_T)^*=U_{T^{-1}}$ gives the adjoint. 
More generally, in Peter Walters' book An introduction to Ergodic theory, we find the following result:

Theorem 2.8. Let $T$ be a measure preserving transformation on the probability space $(\Omega,\mathcal B,\mu)$. Then $U_T\colon L^2(\mu)\to L^2(\mu)$ is surjective if and only if $M\colon (\widetilde{\mathcal B},\widetilde{\mu})\to (\widetilde{\mathcal B},\widetilde{\mu})$is surjective, where $\widetilde{\mathcal B}$ is $\mathcal B$ where we identify set $A$ and $B$ when $\mu(A\Delta B)=0$, $\widetilde{\mu}$ is defined canonically and $M(B)=T^{-1}(B)$. 

If $U_T$ is bijective and $A\in\mathcal B$, let $f$ such that $U_Tf=\chi_{\widetilde A}$. Then $U_T(f\cdot f)=U_T(f)$ so $f\cdot f=f$ and $f=\chi_{\widetilde C}$ for some $C\in\mathcal B$. So $\widetilde A=M(\widetilde C)$ and $M$ is surjective.
The latter condition is not always satisfied, as 5PM points out. Take $X=[0,1]$, $\mathcal B$ the Borel $\sigma$-algebra, $\mu$ the Lebesgue measure and $T(x):=2x\operatorname{ mod }1$. In this case $U_T$ is not onto as the function which are not $1/2$-periodic are not in the range. 
