# Coordination number of spheres (all identical) in hexagonal close packing (HCP)

I was revising solid state chapter when I came across this question

What is the maximum coordination number of an atom in a hcp crystal structure of an element?

The word 'maximum' drew my attention. The answer provided was 12, without any explanation.

Now, it is pretty easy to visualise that the coordination number of the two spheres in the middle of the top and bottom layer is 12, but what about the other ones?

Update

After extending the lattice, it becomes clear that the coordination number of all spheres in layer A will be 12. The spheres in the original hexagon (layer A) can be seen as center points of some other hexagon.

Yes, in for example magnesium all atoms are the same and there is only one crystallographically distinguishable magnesium atom. It crystallizes in the space group $P6_3$/mmc having the Wyckoff-position of $2c$. If we look into the international tables of crystallography for this space group and the position we can see how the primitive unit cell of magnesium only consists of two atoms with the coordinates (1/3, 2/3, 1/4) and (2/3, 1/3, 3/4). As you can see each of them has a separate link. If we click that for the first atom (1/3, 2/3, 1/4) we can see that by applying the different symmetry operations for this space group and position we can construct 11 other atoms. In the picture below I added them around the magnesium atom with the corresponding coordinates. As you can see the 12th one is actually the other magnesium atom (2/3, 1/3, 3/4). Therefore I colored them in different colors. If you then draw in the polyhedron you can see that this would look the same for the other atoms as well and from the new ones you could go on constructing 11 other ones around it. And so they all have the same coordination number.