Answer
See explanation below.
Work Step by Step
The energy given out when the ions attract a bond is alot more higher than the energy that was taken in to create the ions.
The removal of the electron(s) from the metal to form the cation is an endothermic process, and the addition of electron(s) to the non-metal to form the anion is also an endothermic process. However, the process of the anion accepting the cation's electrons and the significant attraction of the ions to each other allow for the releases energy. Ionic bonding will occur only if the overall energy change for the reaction is favourable - when the reaction is exothermic. The larger the resulting energy change, the stronger the bond. The low electronegativity of metals and high electronegativity of non-metals means that the reaction is most favourable between a metal and a non-metal.