Temperature also depends on how much potential energy atoms have, and how much energy lies in the interactions between the atoms. The researchers used the optical lattice to limit how much potential energy the atoms had, and they used magnetic fields to very finely control the interactions between atoms, making them either attractive or repulsive.
Temperature is linked with pressure — the hotter something is, the more it expands outward, and the colder something is, the more it contracts inward. To make sure this gas had a negative temperature, the researchers had to give it a negative pressure as well, tinkering with the interactions between atoms until they attracted each other more than they repelled each other.