As applications of Kadison’s Pythagorean and carpenter’s theorems, the Schur–Horn theorem, and Thompson’s theorem, we obtain an extension of Thompson’s theorem to compact operators and use these ideas to give a characterization of diagonals of unitary operators. Thompson’s mysterious inequality concerning the last terms of the diagonal and singular value sequences plays a central role.