Next, as shown in FIG. 5, a MTJ stack (not shown) or stack structure is formed on the metal interconnections 38 and IMD layer 24. In this embodiment, the formation of the MTJ stack could be accomplished by sequentially forming a bottom electrode 42, a pinned layer 44, a barrier layer 46, a free layer 48, and a top electrode 50. In this embodiment, the bottom electrode 42 and the top electrode 50 are made of conductive materials including but not limited to for example tantalum (Ta), platinum (Pt), copper (Cu), gold (Au), aluminum (Al), or combination thereof. The pinned layer 44 could be made of ferromagnetic material including but not limited to for example iron, cobalt, nickel, or alloys thereof such as cobalt-iron-boron (CoFeB) or cobalt-iron (CoFe), in which the pinned layer 44 is formed to fix or limit the direction of magnetic moment of adjacent layers. The barrier layer 46 could be made of insulating material including but not limited to for example oxides such as aluminum oxide (AlOx) or magnesium oxide (MgO). The free layer 48 could be made of ferromagnetic material including but not limited to for example iron, cobalt, nickel, or alloys thereof such as cobalt-iron-boron (CoFeB) or nickel-iron (NiFe), in which the magnetized direction of the free layer 48 could be altered freely depending on the influence of outside magnetic field.