Factors Influencing the Alignment of a Magnet