Magnetic dipoles aligned parallel or antiparallel to an external field with the magnitude of the dipole proportional to the external field will correspond to paramagnetic and diamagnetic materials respectively. In these cases the energy will be given by U = − − M ⋅ ⋅ B = − − k B ⋅ ⋅ B = − − k ( B x 2 + B y 2 + B z 2 ) , where k is a constant greater than zero for paramagnetic materials and less than zero for diamagnetic materials.