Longitudinal stress occurs when a deforming force is applied normal to the cross-sectional area of a body,resulting in a change in its length.
If a cylinder is stretched by two equal and opposite forces applied normal to its cross-sectional area,the restoring force per unit area is called tensile stress.
If the cylinder is compressed under the action of applied forces,the restoring force per unit area is known as compressive stress.
Tensile or compressive stress $(\sigma)$ is collectively known as longitudinal stress. It is defined as the ratio of the restoring force $(F)$ to the area of cross-section $(A)$,given by $\sigma = F/A$.