In an inelastic collision

suppose a spring connects two masses which collides, if after collision a deformation is achieved and two bodies move together that is inelastic collision. So, here a part of kinetic energy must be lost.

1