  We use a numerical algorithm on the Lie group of rotation matrices to obtain
rotated constellations for Rayleigh fading channels. Our approach minimizes the
union bound for the pairwise error probability to produce rotations optimized
for a given signal-to-noise ratio. This approach circumvents explicit
parametrization of rotation matrices, which has previously prevented robust
numerical methods from being applied to constellation rotation. Our algorithm
is applicable to arbitrary finite constellations in arbitrary dimensions, and
one can thus apply our method to non-uniform constellations, which are of
interest for practical concerns due to their ability to increase BICM capacity.
We show how our rotations can improve the codeword error performance of
non-uniform constellations, and we also apply our method to reproduce and
improve rotations given by ideal lattices in cyclotomic fields.
