Final answer:
Quasars and active galactic nuclei (AGNs) are formed when material falls towards and forms a hot accretion disk around a massive black hole. The formation of quasars and AGNs is believed to be related to the merger of gas-rich galaxies.
Step-by-step explanation:
Quasars and active galactic nuclei (AGNs) are formed when material falls towards and forms a hot accretion disk around a massive black hole. The energy produced in this process is emitted in a small volume of space and accounts for the large amount of energy observed. The formation of quasars and AGNs is believed to be related to the merger of gas-rich galaxies, which triggers AGN activity in the core of the new galaxy. This AGN activity can impact the shape, brightness, chemical content, and stellar components of the entire galaxy.