I'm using the Dirac notation for vectors here, since this is a quantum mechanics question.
Suppose the complete orthonormal bases $\{|\psi_n\rangle\}$ and $\{|\psi{'}_n\rangle\}$ are related by the transformation matrix $U$:
$$ |\psi{'}_n\rangle = U|\psi_n\rangle \\ \langle\psi{'}_n| = \langle\psi_n|U^{\dagger} $$
We want to prove that $U$ is a unitary operator, i.e. it satisfies the relationship $U^{\dagger}U = I$.
By operating the LHS of the second on the LHS of the first, and similarly for the RHS:
$$ \langle\psi{'}_n|\psi{'}_m\rangle = \langle\psi_n|U^{\dagger}U|\psi_m\rangle $$
Due to orthonormality $$ \langle\psi{'}_n|\psi{'}_m\rangle = \delta_{nm} = \langle\psi_n|\psi_m\rangle $$
Hence $$ \langle\psi_n|U^{\dagger}U|\psi_m\rangle = \langle\psi_n|\psi_m\rangle $$
My question is that is there any other relationship other than $U^{\dagger}U = I$ that satisfies this equation? i.e. is this a sufficient proof that $U$ is unitary?