Both Lithium and magnesium have small size and high charge density. The electronegativities of Li is 1.0 and Mg is 1.2. They are low and almost same. Their ionic radii are similar. Hence they show similarities which is known as diagonal relationship between first element of a group with the second element in the next higher group.