The high pressure structural phase transition in the rare earth compounds has the interest of researchers in many fields, especially in the spintronics applications. The authors of this book try to introduce you a reference in ab initio calculations and magnetic properties of two different compounds of rare earths, one from rare earth nitrides GdN and rare earth alkaline MgN.Our calculation is a first- principles study of GdN and MgN compounds in different structures within the framework of density functional theory.