In diamond, the atoms are very closely packed and each atom is connected to four other carbon atoms, giving it a very strong and rigid structure in three dimensions. In the case of graphite, only the bonds between the graphite layers are weak.