On the swells of the Sea of Cortez, everything looks like a whale. But the suggestive shapes usually turn out to be whitecaps or a cloud’s shadow. Lulled by disappointment, the rocking boat and general monotony, I drift into torpor. Then, less than half a mile away, a series of unmistakable spouts erupts, and bursts of exhalation carry across the water.

The BIP XII, a trawler from Mexico’s Center for Biological Research, changes course and chugs toward a group of about 25 sperm whales—adult females, juveniles and suckling calves up to 2 years old. The calves and juveniles are 15 to 20 feet long, and some of the larger females are more than 30 feet from head to tail (a male would be almost twice as long). We approach one that appears to be sleeping, its rumpled back and bulging head rolling with the waves. It snorts awake and swims off as its companions drift away from us in loose pairs and trios. We trail after one of the pairs, a female and calf. The two idle along, nudging each other and blowing mist. Then the female surges forward. The huge muscles of her flanks go taut as she arches her back and heaves out her tail. Water cascades off her broad tail flukes, and she dives. The calf follows, Leviathan in miniature, its flukes aloft as it slides into the sea.

The other whales start to dive and our boat slows to a stop. The 12 of us aboard, a mix of biologists and crew members, gather at the rail to await the whales’ return. Five minutes turns into ten, then fifteen. Still they do not surface. We have a schedule to keep and so must motor on.

The life of a sperm whale remains largely a mystery. The animals spend most of their time at great depths, diving more than 6,000 feet in pursuit of prey and staying down for more than an hour. They are the largest toothed whales (a few filter-feeders, like the blue whale, are larger) and can grow to more than 60 feet long; their brains are larger than those of any other animal on earth. But even after decades of study, basic elements of sperm whale biology and behavior are poorly understood. I am here because scientists have started to figure out just what it is a sperm whale does in the deep: how it hunts, how it communicates, what it might be saying. From the boat’s stern, I look back at the patches of water, now still, where the whales had been, and presumably still are, somewhere beneath us.

Until recently, most information about sperm whales came from their slaughter. In 1712, so the story goes, one Captain Hussey’s vessel was blown offshore south of Nantucket Island while hunting right whales for their oil. Hussey happened upon a pod of sperm whales, killed one and dragged it home. The animal’s huge head brimmed with a peculiar waxy substance, called spermaceti (“seed of the whale”) after the mistaken belief it was seminal fluid. Spermaceti oil was versatile, and of a much higher quality than oils that came from the blubber of other whale species. As a liquid, it fueled lamps; congealed, it could be fashioned into smokeless candles, fine soaps and cosmetics. Hundreds upon hundreds of ships from North America and Europe were soon plying the world’s oceans in search of sperm and other whales.

“Whaling was the oil industry of its day,” says Hal Whitehead, a biologist at Dalhousie University in Nova Scotia and an expert on sperm whale behavior. “Oil from the sperm whale quite literally lubricated the Industrial Revolution.” At the revolution’s height, in the mid-1800s, whalers killed perhaps 5,000 sperm whales a year.

The industry captured the popular imagination. “Old-time whaling had a dual identity,” Whitehead says. “It was a way of getting stuff we needed, but it was also a wild, romantic chase. A lot of art was linked to the sperm whale.” But the need for spermaceti decreased with the drilling of petroleum and natural gas wells and the harnessing of electricity. By the 1880s, whaling’s early phase was on the decline.

The reprieve would last until 1925, when “factory ships” set sail from Norway, bristling with harpoon guns and designed with slipways for sailors to haul whales aboard for quick processing. A whale once sighted was effectively dead. The factory ship’s speed and artless efficiency made whale hunting cost-effective. Whaling would increase significantly after World War II, and by 1958, more than 20,000 sperm whales were killed each year to be turned into margarine, cattle fodder, dog food, vitamin supplements, glue, leather preservative and brake fluid. The global population of sperm whales and other whale species declined so drastically that in 1982 the International Whaling Commission, a body established in 1946 to monitor whale populations, issued a moratorium on commercial whaling. It’s hard to count such an elusive species, but Whitehead estimates that before com­mercial whaling began, there were more than one million sperm whales. Now that number may be around 360,000, and it’s unclear whether the population is increasing.

The ban improved human-sperm whale relations but made the study of whales more difficult. Whaling gave scientists access to otherwise inaccessible subjects, but yielded reports that tended to emphasize the animal’s physiology and diet rather than behavior. One researcher speculated that based on the properties of oil at different temperatures, the spermaceti organ helped regulate buoyancy; others combed through the stomachs of dead whales, counting squid beaks to see which species they liked to eat. From a boat like the BIP XII, all one can see of a sperm whale is the tail and the broad slab of back and head that rides above the waves. Less than 10 percent of a whale’s body is visible, in a part of the ocean—the surface—where the animal spends less than 20 percent of its life.

Sperm whale research now relies more on technology and an ability to think like a leviathan. “We have a very mysterious animal that we don’t understand,” Whitehead says. “Sperm whales live in an environment totally different from ours, one with completely different constraints. Where we are visual, they see the world through sound—both the sounds they hear and the sounds they make.”

In 1839, in the first scientific treatise on the sperm whale, Thomas Beale, a surgeon aboard a whaler, wrote that it was “one of the most noiseless of marine animals.” While they do not sing elaborate songs, like humpbacks or belugas, in fact they are not silent. Whalers in the 1800s spoke of hearing loud knocking, almost like hammering on a ship’s hull, whenever sperm whales were present. They called the animals “the carpenter fish.” Only in 1957 did two scientists from the Woods Hole Oceanographic Institution confirm the sailors’ observations. Aboard a research vessel, the Atlantis, they approached five sperm whales, shut off the ship’s motors and listened with an underwater receiver. At first, they assumed the “muffled, smashing noise” they heard came from somewhere on the ship. Then they determined the sounds were coming from the whales.

Biologists now believe that the sperm whale’s massive head functions like a powerful telegraph machine, emitting pulses of sound in distinct patterns. At the front of the head are the spermaceti organ, a cavity that contains the bulk of the whale’s spermaceti, and a mass of oil-saturated fatty tissue called the junk. Two long nasal passages branch away from the bony nares of the skull, twining around the spermaceti organ and the junk. The left nasal passage runs directly to the blowhole at the top of the whale’s head. But the other twists and turns, flattens and broadens, forming a number of air-filled sacs capable of reflecting sound. Near the front of the head sit a pair of clappers called “monkey lips.”

Sound generation is a complex process. To make its clicking sounds, a whale forces air through the right nasal passage to the monkey lips, which clap shut. The resulting click! bounces off one air-filled sac and travels back through the spermaceti organ to another sac nestled against the skull. From there, the click is sent forward, through the junk, and amplified out into the watery world. Sperm whales may be able to manipulate the shape of both the spermaceti organ and the junk, possibly allowing them to aim their clicks. The substance that made them so valuable to whalers is now understood to play an important role in communication.

Whitehead has identified four patterns of clicks. The most common are used for long-range sonar. So-called “creaks” sound like a squeaky door and are used at close range when prey capture is imminent. “Slow clicks” are made only by large males, but no one knows precisely what they signify. (“Probably something to do with mating,” Whitehead guesses.) Finally, “codas” are distinct patterns of clicks most often heard when whales are socializing.

Codas are of particular interest. Whitehead has found that different groups of sperm whales, called vocal clans, consistently use different sets; the repertoire of codas the clan uses is its dialect. Vocal clans can be huge—thousands of individuals spread out over thousands of miles of ocean. Clan members are not necessarily related. Rather, many smaller, durable matrilineal units make up clans, and different clans have their own specific ways of behaving.

A recent study in Animal Behaviour took the specialization of codas a step further. Not only do clans use different codas, the authors argued, but the codas differ slightly among individuals. They could be, in effect, unique identifiers: names.

Whitehead, who was a co-author of the paper, cautions that a full understanding of codas is still a long way off. Even so, he believes the differences represent cultural variants among the clans. “Think of culture as information that is transmitted socially between groups,” he says. “You can make predictions about where it will arise: in complex societies, richly modulated, among individuals that form self-contained communities.” That sounds to him a lot like sperm whale society.

But most of a sperm whale’s clicking, if not most of its life, is devoted to one thing: finding food. And in the Sea of Cortez, the focus of its attention is Dosidicus gigas, the jumbo squid.

One afternoon, i’m sitting on the deck of the BIP XII reading Moby-Dick when Bill Gilly happens by. “Have you reached the squid chapter?” he asks. I tell him I have not. Gilly waves his hands in mock dismissal—“Gaaah!”—and continues on his way. Apparently, I am not worth talking to until I have read it. I flip ahead to “Squid,” which is only two pages long. My edition of Moby-Dick has 457 pages, but for Gilly, the rest of the book might as well not exist.

Gilly, a biologist at Stanford University, studies the jumbo squid. “For animals that live two years at most,” he says, “they sure do live it up.” In that time, the squid grow from larvae that could generously be called cute into far more menacing specimens that can be more than six feet long and weigh more than 80 pounds. They can swim more than 100 miles a week and recently have expanded their range. Native to subtropical waters, they were caught in 2004 by fishermen as far north as Alaska. There may be a couple of reasons for this. One is that climate change has altered the oxygen levels in parts of the ocean. Also, many top predators, like tuna, have been heavily fished, and squid may be replacing them, preying on fish, crustaceans and other squid. No one knows the consequences of this great sea-grab, which extends not just to Alaska, but apparently to other corners of the ocean. In the Sea of Cortez, squid “certainly weren’t a prominent presence earlier in the century,” Gilly says. “Steinbeck mentions them two, maybe three times in Sea of Cortez.” (Gilly’s wife is a Steinbeck scholar at San Jose State University.)

The most celebrated natural antagonism between sperm whales and squid, conjuring up images of the Leviathan grappling with the Kraken in the abyssal trenches, almost certainly involves the jumbo squid’s larger cousin, the giant squid, a species that grows to 65 feet long and closely resembles the creature described in Moby-Dick. In the novel’s “Squid” chapter, Starbuck, the first mate, is so discomfited by a squid that floats up in front of the Pequod—“a vast pulpy mass, furlongs in length and breadth, of a glancing cream-color, lay floating on the water, innumerable long arms radiating from its centre”—that he wishes it were Moby-Dick instead.

The nonfictional relationship between sperm whales and squid is pretty dramatic also. A single sperm whale can eat more than one ton of squid per day. They do eat giant squid on occasion, but most of what sperm whales pursue is relatively small and overmatched. With their clicks, sperm whales can detect a squid less than a foot long more than a mile away, and schools of squid from even farther away. But the way that sperm whales find squid was until recently a puzzle.

The orange octagonal box in Kelly Benoit-Bird’s office at Oregon State University is an echo sounder transducer. At sea, it hangs under a boat and sends out waves of sound at four different frequencies. The time it takes each of the waves to return tells her how far away an object is; the waves’ intensity tells her the object’s size. Each organism has a different acoustic signature, and she can often figure out what sort of creature the waves are bouncing off of. To do so requires a certain interpretive knack. Once, in the Bering Sea, her boat came upon a flock of thick-billed murres, diving seabirds, as they were feeding. The acoustics showed a series of thin, vertical lines in the water. What did they represent? Murres pursue their prey by flying underwater, sometimes to great depths. Benoit-Bird figured out that the lines were columns of tiny bubbles the murres expelled when their feathers compressed as they dove.

“Acoustics is a great way to see what’s going on where you can’t see,” Benoit-Bird says. To understand sperm whale sound, she had to first establish how the whales use their clicks to find squid. Unlike fish, squid don’t have swim bladders, those hard, air-filled structures that echolocating hunters such as spinner dolphins and harbor porpoises typically key in on. “Everyone thought squid were lousy sonar targets,” she says. But she thought it unlikely that the whales would spend so much time and energy—diving hundreds or thousands of feet, clicking all the way down—only to grope blindly in the dark.

In a test, Benoit-Bird, Gilly and colleagues tethered a live jumbo squid a few feet under their boat to see if the echo sounders could detect it. They found that squid make fabulous acoustic targets. “They have plenty of hard structures for sonar to pick up,” she says. Toothy suckers cover their arms; the beak is hard and sharp; and the pen, a feather-shaped structure, supports the head. Benoit-Bird was thrilled. “You could say,” she says, “that I’m learning to see like a sperm whale.”

To see like a sperm whale is to get a glimpse of a world inhabited by much smaller animals. “In the Sea of Cortez,” Benoit-Bird says, “you know that what sperm whales do is driven by what the squid do. So you expand. You ask: What is driving the squid?”

The squid, it turns out, are following creatures whose behavior was first noted during World War II, when naval sonar operators observed that the seafloor had the unexpected and somewhat alarming tendency to rise toward the surface at night and sink again during the day. In 1948, marine biologists realized that this false bottom was actually a layer of biology, thick with small fish and zooplankton. Instead of the seafloor, the Navy’s depth sounders were picking up many millions of tiny swim bladders, aggregated so densely that they appeared as a solid band. The layer is composed of fish and zooplankton that spend the day between 300 and 3,000 feet deep, where almost no light can penetrate. At night, they migrate upward, sometimes to within 30 feet of the surface. The fish are well suited to life in the dim depths, with enormous, almost grotesquely large eyes and small organs, known as photophores, that produce a faint glow.

The mobile band of life was named the deep scattering layer, or DSL, for the way that it scattered sound waves. In the Sea of Cortez, the fish that inhabit it, called myctophids or lanternfish, are among the jumbo squid’s preferred prey. The squid follow the fish’s daily vertical migration, spending the daylight hours between 600 and 1,200 feet and then pursuing them toward the surface at night.

Biologists assumed that the DSL creatures were at the mercy of currents, drifting haplessly, helplessly along. But Benoit-Bird and colleagues have found that even microscopic plants and animals can lead active and finicky lives. Phytoplankton, seeking out particular conditions of biochemistry and light, will form sheets that can stretch for miles but are only a few feet high. Slightly larger zooplankton take advantage of this great conveyor of food. Lanternfish likewise fight against prevailing currents to reach the feast. Things gather to eat or not be eaten—by fish, by squid, by sperm whales. What was thought to be at the whim of physics turns out to act on its own biological imperatives.

“I always go in with the same question,” says Benoit-Bird, who in 2010 was awarded a MacArthur Fellowship for her work on sensing biological activity in the deep ocean. “How come things are found where they are? And so what? I think of it as the Big Why and the So What. All the pieces make the full picture.” More than trying to see like a sperm whale, she is trying to see—to understand—everything. “Sometimes, you get a little swept away,” she says. “It’s fun just to watch and go, ‘Cool!’ ”

Using her gadgets, she can record a whole world at once. She shows me a printout from an earlier Sea of Cortez cruise with Gilly, when sperm whales surrounded them. “We knew they were down there beneath us,” she says, “but you can’t tell what they’re doing from the boat.”

The acoustic reading shows a ten-minute window, with time on the horizontal axis and depth on the vertical. One thick band stretches from 700 feet or so to more than 900 feet. This is the deep scattering layer, the zooplankton and lanternfish. Individual squid, one visible as a blue-green smear, the other in orange, are among them, perhaps feeding. A school of squid shows up a few minutes later, loitering about 60 feet from the surface. The real drama, though, starts at one minute and 55 seconds, with a pair of red and orange squiggles: two sperm whales, one near the surface and the other more than 300 feet under the boat. The latter dives to a school of squid nearly 400 feet deep. The tracks of the squid and the whale converge, are lost as they move into the band of fish, and pop out of the jumble.

Seeing this, I think back to a night near the cruise’s end, when I was alone on the bow of the BIP XII. The trawler was chugging over a still sea, and the night was hypnotically quiet. Then, somewhere in the distance, I heard the spouting of whales. But I could see nothing, and the boat continued on in languorous pursuit of the moon’s reflection.

For a long time, we didn’t know much more than that about the whales. But now we have a better idea of what is happening in that strange world where the sperm whale swims. We can imagine the wan glow from a school of lanternfish, the jumbo squid among them, and a sperm whale moving through the gloom with relentless purpose. The whale searches with usual clicks and gives a quick creeeeeek! as it locks onto the squid. There is a rush of pressure from its head wave as it surges to its prey, jaw agape, and the jet from the squid as, panicked, it bursts away into the darkness.

Eric Wagner, who wrote for Smithsonian about cranes in Korea’s Demilitarized Zone, frequently reports for Smithsonian.com.