Well, that's sort of what happens with gases. In the noble gases—helium, neon, argon, krypton, xenon, radon—the atoms simply don't stick together at all. But rather than collapse into a pile on the floor, they fly about all over the place. That's because the gas contains the potential energy of heat and, as we've seen earlier, heat is equivalent to kinetic energy (or energy of motion) of the atoms within the gas. Gas atoms at room temperature bounce around at quite high speeds, so they tend to expand out and fill whatever container they're placed in. If you cool these gases down, the atoms move more slowly. Eventually, at really low temperatures, the atoms don't fly around all over the place, but settle into a pile that we call a liquid, which we need to keep in a jar to stop it flowing out sideways.

More familiar gases—like oxygen, nitrogen, hydrogen, carbon dioxide, and so on—are formed of molecules, each molecule being two or more atoms stuck together. The molecules behave more or less like the atoms of noble gases: they're just particles that don't stick together but rather bounce around at high speed. But the question here is: what holds the molecules together?

And in solid objects—lumps of wood, stones, cats, the computer you're reading this on—what holds the atoms together in that shape? Why doesn't a stone fly apart into some sort of gas? The atoms in a stone are jiggling around at quite high speeds, but they're only vibrating by microscopic amounts, held tightly in place and wobbling very slightly. What's holding them there?

The answer is, perhaps surprisingly, electricity.

The word electricity comes from the Greek ηλεκτρον "elektron", which is the Greek word for amber[1]. Amber is the transparent golden yellow or brown material formed when tree resin solidifies. It is found in lumps, either in the ground or washed up on beaches, and when polished makes beautiful pieces of jewellery. It's a lovely material, and sometimes contains valuable fossils in the form of insects that got stuck in the tree resin, perhaps millions of years ago, and are now preserved perfectly inside the amber. But what on earth does it have to do with electricity?

If you rub a piece of amber with a piece of wool, a very curious thing happens. After a little while of rubbing you start to hear a crackling noise. And if you then hold the amber near some little pieces of paper, the pieces of paper leap up into the air and stick to the amber. The ancient Greeks knew about this curious property, but for about two thousand years it remained a disconnected mystery, not considered related to anything of import.

You might recognise this behaviour as the phenomenon we call "static electricity", the thing that causes little sparks and shocks when you scuff your feet on carpet on a dry day. You probably also know that static electricity causes things to cling together: dust to a TV screen, clothes straight out of the dryer, bits of styrofoam to cats. Well, it turns out that this clinging force is the same thing that makes atoms stick together.

Because atoms, it turns out, are not the smallest possible bits of matter. They are not indivisible. They are the smallest possible bits of the elements, however. When you split an atom of copper, you don't get two smaller bits of copper, you get something else entirely.

For starters, it's possible to strip off a tiny piece of a copper atom, leaving behind what is still a copper atom, that still behaves chemically like a copper atom, but with a bit missing. And then there's the little piece you've stripped off, which isn't an atom of anything at all. This little piece we call an electron, after the Greek word for amber. The name was given to it in 1894, after a history of about 200 years of experimentation by curious natural philosophers. They determined that the strange attractive behaviour of amber could be emulated by rubbing many other materials. Furthermore, by playing with different materials, they determined that there seemed to be two different types of "electrical charge" that were produced by rubbing. Objects with differing charges would attract one another, but objects with the same charge would repel one another.

So what's going on here? It turns out that by rubbing materials like amber or wool, you're actually stripping electrons off the atoms. In the case of amber, it strips electrons off the wool. The excess electrons accumulate on the amber, leaving a deficit of electrons on the wool. To differentiate these two different states, we say that the amber has acquired a negative electric charge, while the wool has acquired a positive electric charge. Yes, that seems like it's around the wrong way, but Benjamin Franklin gave these names to the two different types of electric charge before electrons were discovered, and they (if you'll excuse the pun) stuck.

So that's static electricity. Items with a positive charge are attracted to and tend to stick to items with a negative charge. And it's the same on the atomic level. Let's start with the simple compound salt, as in standard table salt. It's made of equal parts of sodium and chlorine atoms. It turns out that sodium atoms have one electron which is held on very loosely - it's really easy to strip it off. And chlorine atoms have the property that they like to hang on to an extra electron, if they can get one. Put sodium and chlorine together, and it's a match made in heaven! Each sodium atom gives up its loose electron, and the chlorine atoms snap them up. The sodium atoms end up with a positive electric charge, and the chlorine atoms with a negative charge. So each sodium atom is attracted to chlorine atoms nearby, and the chlorine atoms are attracted to nearby sodium atoms. The result is that the atoms form into a regular three-dimensional lattice, in which each sodium atom is next to six chlorine atoms, and each chlorine atom is next to six sodium atoms, in a cubic arrangement. Although the atoms are far too small to see, this cubic structure is so regular that it produces the familiar visible cubic crystals of salt we know.

And the thing about the electric force at the atomic scale is that it is extremely strong. Not merely strong enough to levitate bits of paper or stick styrofoam to a cat. It's strong enough to hold the atoms together and form a rock-hard substance. Table salt is not as hard as it gets either. Think of rocks - they're held together by the same atomic electrical forces. This type of electrical bonding of atoms is known as ionic bonding, because the atoms with stripped electrons or extra electrons are known as ions.

Molecules and some other solids (such as the carbon atoms in a diamond) are held together in a slightly different way. Some atoms can "share" electrons, in such a way that electrons from both atoms sort of float between the atoms. The region where the electrons are has a negative electric charge, while the leftover atoms have a positive charge, so are both attracted to the electrons. The result is the atoms are stuck together by a kind of "electron glue". (It's a bit more complicated than this - this is a simplified explanation.) This type of bonding is called covalent bonding. If anything, it's even stronger than ionic bonding.

Metals are held together in a different way again. Metals typically have atoms with loosely held electrons (like sodium, which is a metal). In a large lump of metal, all those loose electrons tend to wander around. Rather than being stuck to one atom, they jump to a nearby one, then jump again, and so on. The effect is kind of like a wash of "free" electrons sloshing around. Embedded in this wash of electrons are the positively charged metal ions, each one having contributed one or more electrons to the wash. The wash is negatively charged, and so keeps all the positively charged atoms locked in place, though not as strongly as in a crystal. This is why many metals can be bent or hammered into different shapes, whereas if you try this with a crystal like salt or a rock, it just shatters. It also leads to the fact that metals can easily carry an electric current, which is a flow of electrons in a particular direction. And so we use metals for our electrical wiring. This sort of bonding of atoms is called metallic bonding.

So that's how things are held together. By static electricity! Really!

Some solid objects are held together somewhat more loosely than rocks and metals though. For example, the elastic holding up your pants or underpants, or a metal spring. These sorts of objects are held together strongly on the atomic level - their stretchiness comes from structure on a larger scale. It's most easily seen in a spring. The metal itself is very solid and not really stretchy. But coiled into a spring shape, the resulting structure becomes, well, springy. You can compress the coils closer together, or pull them further apart, and when you let go, they return to their original position. The metal itself hasn't stretched or been compressed - it's just the shape of the metal that's been changed.

It's the same sort of thing with elastic material, such as found in pants. Only here the structure is on a much smaller scale, in fact it's too small to see. Elastic materials like rubber are made of large molecules formed from long chains of atoms. The atoms are typically held together in the molecule by covalent bonds. But the molecules are held together less strongly, by smaller residual electric charges and the fact that these long spaghetti-like molecules are actually tangled together. This tangle of long molecules acts a bit like a spring coil. Think about a tangled ball of wool. You can stretch it a bit, in fact more than you can stretch a single strand of wool, because the stretching straightens the tangled mess out a bit, without actually stretching the individual strands. It's the same with materials like rubber. Stretching them straightens out the long tangled molecules. And when you release the stretch, they tend to return to their original tangled position. This tendency can be helped by some strong covalent bonds linking the molecular strands in a few places. This will ensure the material snaps back properly. Without these, or if you stretch the material far enough to snap some of the covalent bonds, it will lose its elasticity.

And so, your elasticised pants are also being held up by electrical forces. Cool, huh?

Addendum: I mentioned in an earlier annotation that electricity is the answer to two puzzling historical questions about the properties of atoms and elements. I've introduced electricity here, but we still need a bit more work to answer those questions:

Why are the atomic weights of many of the elements so tantalisingly close to whole number multiples of the weight of a hydrogen atom? And why are a few of them not close at all?

Why are the chemical properties of the elements related to the weights of their atoms?

Stay tuned.
[1] The Greek word for amber, "elektron", by the way, itself comes from "Elektor" (meaning "Awakener"), which was one of the titles of the Greek sun god Helios. So the Greek word for amber can be read to mean "formed from the sun", which ties in to its golden appearance and the myth regarding the origin of amber as the solidified tears of Helios's daughters. So our word "electricity" has an ultimate root meaning of "from the sun". (Which isn't particularly accurate in a physical sense, just interesting.)