Rubber contains long molecules which are tangled up in its resting state. This is due to different charges in different parts of the molecule causing it to be attracted to each other and other parts of itself. When you stretch the rubber you are stretching out all the tangled molecules making them straight. When you release the rubber the molecules gets attracted to each other again and snap back to its former tangled configuration.
Latest Answers