In a paper (corollary 1, p.14) the following identity is used:
Let g be a unitary matrix. Then:
$$\det(I+g^{-1})\det(I+g)=|\det(g-I)|^2 \text{ for }g \in U(n)$$
Now my question is why this holds
I calculated:
$$\det(I+g^{-1})\det(I+g)=\overline{\det(I+g^t)}\det(I+g)=\overline{\det(I+g)}\det(I+g)=|\det(I+g)|^2$$
Where the second equality holds as $I$ has only entries in the diagonal ($I$ is of course the unit matrix). But this is not the same as on the right side.
(I also thought that maybe there was a typo on the left side where should be minus-signs. However in the paper itself it is needed that there are plus-signs.)
Thanks for any hints.
Edit: This equality was in the scope of an integral: $$\int_{U(n)}\prod_{l=1}^{k}det(I+g^{-1})\prod_{l=1}^{k}\det(I+g)dg=\int_{U(n)}|\det(g-I)|^{2k}dg$$
With a change of variable it was solved with my calculation done above. See Giuseppe's answer.