When galaxies interact through collisions, dynamical friction between stars causes matter to sink toward the center of the galaxy and for the orbits of stars to be randomized. This process is called violent relaxation and can change two spiral galaxies into one larger elliptical galaxy.