The relationship between the first and second figures is that the main shape rotates 45 degrees clockwise and the small internal circle becomes a dot. Applying this to the third figure, the diamond rotates 45 degrees to become a square, and the internal circle becomes a dot.