The reason for the decrease in the atomic size of elements across a period is…