Energy and mass are interchangeable according to Einstein's equation E = mc², where a small amount of mass contains enormous energy. The rest energy of any object is E₀ = mc², and the total relativistic energy is E = γmc². This explains nuclear binding energy, matter-antimatter annihilation, and why particle accelerators must accelerate particles to relativistic speeds to create new particles.
From your prerequisite on relativistic momentum and energy, you know that Newton's expression p = mv fails at high speeds and must be replaced by the relativistic momentum p⃗ = γm v⃗, where γ = 1/√(1 − v²/c²) is the Lorentz factor. You also know that the total relativistic energy of a particle is E = γmc². The famous equation E = mc² is the special case of this when v = 0: a particle at rest (γ = 1) still has energy E₀ = mc², called the rest energy. Mass is not merely something that has energy stored in it — mass is a form of energy, and energy has inertia (resistance to acceleration) proportional to E/c².
The magnitude of the rest energy is staggering. One kilogram of matter at rest contains E = (1)(3 × 10⁸)² = 9 × 10¹⁶ joules — roughly the energy released by two million tons of TNT. The factor c² ≈ 9 × 10¹⁶ m²/s² acts as a conversion constant between mass units and energy units. Most physical processes — chemical reactions, heating, mechanical deformation — convert only a minuscule fraction of rest mass into other energy forms. Nuclear reactions are different: a uranium fission event converts roughly 0.1% of rest mass to kinetic energy of fragments, which is why nuclear fuel is millions of times more energy-dense than chemical fuel.
The full relativistic energy-momentum relation, E² = (pc)² + (mc²)², is worth examining carefully. For a massive particle at rest (p = 0), it reduces to E = mc². For a photon, which has m = 0, it gives E = pc — consistent with the photon relation E = hf and p = hf/c you know from wave-particle duality. This unified equation covers both massive and massless particles and is Lorentz invariant: the quantity E² − (pc)² = (mc²)² has the same value in every inertial frame. The mass m in this equation is the invariant mass (or rest mass), a Lorentz scalar — not the outdated "relativistic mass" mγ that some older texts use.
Mass-energy equivalence is not merely a theoretical statement — it is directly verified by nuclear physics. A helium-4 nucleus weighs less than the sum of its two protons and two neutrons by a deficit called the mass defect. This missing mass (about 0.7% of the total) has been converted into the binding energy that holds the nucleus together. To split helium into its constituents, you must supply exactly E = Δmc² of energy. Conversely, in matter-antimatter annihilation — say, an electron and positron colliding — all of the rest mass of both particles converts to photon energy: two gamma rays, each with energy 511 keV = m_e c². In a particle accelerator, when you want to create new massive particles, you must supply at least the rest energy of the particles you intend to create — which is why high-energy physics requires particle beams with energies in the GeV to TeV range.