Supercapacitors charge quickly but store little energy because all the action takes place only at the interface where its solid components — the electrodes — and its liquid component — the electrolyte — meet. In contrast, a battery brings its charge inside the electrodes and thus uses the full volume of the electrodes for storage.

“Think of an electrode as a sponge,” said Dr. Schwartz, who was not involved in the study. “The battery soaks water up into all of the sponge, whereas the supercapacitor just has it on the surface of each pore.”

Xianwen Mao, a chemical engineer at Cornell University and the lead author of the study, had been working in a research group led by Alan Hatton at the Massachusetts Institute of Technology to improve the surface of a supercapacitor’s electrodes. But then, a few years ago, Paul Brown, a chemist who studied ionic liquids, worked with Dr. Mao to focus on creating new electrolytes instead.

In the M.I.T. lab, Dr. Brown prepared new ionic liquids from positively and negatively charged ions that were significantly different in size. Crucially, the negatively charged ions were also common surface-active agents, or surfactants: giant molecules carrying a long, water-repelling tail while holding their negative charge on their water-loving heads.

When the ionic liquids were first tested in a prototype supercapacitor, Dr. Mao did not observe any significant improvement in energy storage capacity. But he didn’t abandon the idea. Noticing that the liquids were quite viscous, he decided to heat up the experiment. At 130 degrees Celsius and above, the prototype’s energy storage capacity abruptly spiked.

To understand this sudden improvement in energy storage capacity, the researchers looked at what was happening at the electrode-electrolyte interface. It turned out that the giant, negatively charged surfactant ions had corralled the small, positively charged ions into squeezing and huddling on the supercapacitor’s electrodes while their tails intertwined into a network.

Surfactants are known to self-assemble — for example, when a soap bubble forms. This self-assembly phenomenon was observed for the first time at the electrode-electrolyte interfaces, Dr. Mao said.