Unitary invariance and spectral variation