# Want something like Cayley formula for unitary matrices

It is known that assigning to a skew-symmetric matrix $S$ the matrix $(S-I)(S+I)^{-1}$ is one-to-one onto orthogonal matrices without nonzero fixed points (that is, with all eigenvalues $\ne1$); the inverse map assigns to an orthogonal $O$ as above the matrix $(I+O)(I-O)^{-1}$.

(To my shame I only learned about this beautiful fact from an answer on MO; it is called Cayley formula, although when I looked up his paper he only gives a clever description of the determinant for $S+I$ which implies that it is nonzero. Anyway, the standard reference seems to be page 289 in Gantmacher.)

Do you know if there is anything similar for unitary matrices? To be more specific, I want a rational function $f$ and a linear subspace $\mathscr L$ of all matrices such that the value of $f$ on any matrix from $\mathscr L$ is unitary, and "almost all" (say, outside a measure zero subset, or in a Zariski open subset, or just in a dense subset) of unitary matrices are in the image of $\mathscr L$. Of course it would be better to have explicit description of that missing set, and even better if unitarity of $f(M)$ implies $M\in\mathscr L$ but I would call this a bonus.

Post-accept

There are different choices for $f$: You may use the same formula $f(S)=(S+I)(S-I)^{-1}$ but with $S^*=-S$ (hermitian conjugate). The image is unitary but $1$ can not be an eigenvalue. You may also use $f(A)=(A+i)(A-i)^{-1}$ and $A^*=A$ you map selfadjoint matrices to unitary. If you simply change signs (or multiply by a number of modulus 1) you map to unitary matrices avoiding a specific number in the spectrum. In any case the image is dense and of full measure.