Explain how the periodic law relates to the arrangement of elements in the modern periodic table, particularly how atomic number influences an element's position and chemical properties within groups and periods.