Galaxy merger
Galaxy mergers can occur when two (or more) galaxies collide. They are the most violent type of galaxy interaction. Although galaxy mergers do not involve stars or star systems actually colliding, due to the vast distances between stars in most circumstances, the gravitational interactions between galaxies and the friction between the gas and dust have major effects on the galaxies involved. The exact effects of such mergers depend on a wide variety of parameters such as collision angles, speeds, and relative size/composition, and are currently an extremely active area of research. Galaxy mergers are important because the merger rate is fundamental measurement of galaxy evolution. The merger rate also provides astronomers with clues about how galaxies bulked up over time.
Description
During the merger, stars and dark matter in each galaxy become affected by the approaching galaxy. Toward the late stages of the merger, the gravitational potential (i.e. the shape of the galaxy) begins changing so quickly that star orbits are greatly affected, and lose any memory of their previous orbit. This process is called violent relaxation. Thus if two disk galaxies collide, they begin with their stars in an orderly rotation in the plane of the disk. During the merger, the ordered motion is transformed into random energy. The resultant galaxy is dominated by stars that orbit the galaxy in a complex, and random, web of orbits. This is what we see in elliptical galaxies, stars on random unordered orbits.