When a rod is stretched beyond its yield point, it permanently deforms and doesn't regain its original length. The stresses created during loading are not completely removed even after unloading due to plastic deformations. These remaining stresses are known as residual stresses. Consider a small plug welded to a large plate. During welding, the plug's temperature increases significantly, reducing both the modulus of elasticity and stress. Once the plug cools down after welding, it causes an increase in the modulus of elasticity, and yielding happens at a fairly constant stress level, creating residual stress in the plug and the weld. The cooling of cast or hot-rolled metals also causes residual stresses. In these cases, the outer layers cool faster than the inner core, causing them to regain their stiffness more quickly. On returning to room temperature, the inner core gets contracted more than the outer layers, resulting in residual longitudinal tensile stresses at the inner core. The outer layers develop residual compressive stresses. Large residual stresses are removed through reheating and slow cooling.