Ada Lovelace, aged about 20, is pictured in a portrait from 1835.

This 'Countess of Computing' wrote the first computer program

Ada Lovelace, daughter of poet Lord Byron and mathematician Annabella Milbanke, became the world's first programmer in 1843 with her algorithm for Charles Babbage's Analytical Engine.

Learning to fly

Ada Lovelace is pictured at 20 years old in a portrait from 1835. Lovelace combined her mother’s mathematical rigor with her father’s imagination. When she was 12 years old, she decided (as many children do) that she wanted to fly, but unlike other children whose attempts may have been limited to jumping off chairs, she took a more scientific approach. She studied birds, assessed materials for their likelihood to enable flight, and considered how to construct wings. In this era before widespread electricity, she even drew up plans for a steam-powered flying machine. Young Ada Lovelace wrote and illustrated a guide on how she may best be able to achieve flight and called it “Flyology.”
Ian Dagnall Computing/Alamy

On a summer Monday evening in 1833, Ada Byron and her mother Anne Isabella “Annabella” Byron went to the home of English mathematician Charles Babbage. Twelve days earlier, when the younger Byron met Babbage at a high society soiree, she had been taken with his description of a machine he was building.

The hand-cranked apparatus of bronze and steel used stacks of cogs, hammer-like metal arms, and thousands of numbered wheels to automatically solve mathematical equations. But the Difference Engine, as Babbage called it, was incomplete. He had finished a small prototype that stood about two-and-a-half feet tall. The clanging, whirring showpiece was able to spit out answers to challenging mathematical equations. Babbage believed the complete product had the potential to solve much more complex problems. The Difference Engine’s demonstration piece set London’s intellectual circles and scientific community alight, wowing the likes of Charles Darwin and Charles Dickens. Its performance was near miraculous, even to London’s greatest intellects—an almost sorcerous parlor trick for Babbage.

While the Difference Engine wasn’t magical to 17-year-old Ada Byron, it was transformative. Upon seeing the machine on that fateful evening in 1833, she understood how it worked. In Ada, 41-year-old Babbage found his intellectual equal, and over the course of the next two decades, Ada would prove that her understanding and vision for such machines went far beyond mere calculation.

An analytical childhood

Ada Lovelace was born Augusta Ada Byron on December 10, 1815, into Victorian English high society. Her mother, Annabella Byron, was one of the few women of her generation to be afforded an education. She passed her love of knowledge—and mathematics in particular—on to her daughter, hiring famous mathematicians to tutor young Ada and instructing Ada herself when she could not find a suitable tutor.

It wasn’t just the selfless pursuit of knowledge that led Annabella to ensure her daughter had the best education. Annabella was worried that too much unchecked imagination could bring out the influence of Ada’s absentee father, the poet George Gordon Byron, better known to the world as Lord Byron. Described by one of his mistresses as“mad, bad, and dangerous to know,” Lord Byron was famous for his wordsmithery and infamous for his licentious and tortured public life. As a Romantic-era celebrity, his addiction and mental health struggles were visible for all to see.

Annabella and he were briefly married, but when Ada was born, Byron was reportedly quite angry about the sex of the child. On a January morning in 1816, less than five weeks after Ada’s birth, Annabella quietly gathered the baby and left for her parents’ country home, moving them away from Byron and his influence. Within a matter of months, Lord Byron had left England for good. Ada, Bryon’s only child born in wedlock, never knew her father. He died when Ada was eight years old.

Intellectual equals

Lady Byron, fearful that Ada would inherit her father’s self-destructive tendencies, nurtured her daughter’s analytical side, and Ada’s childhood passion for mathematics proved enduring. By the time Ada entered her late teens, her mother noted (with wry pride) that she was more interested in talking to scientists and mathematicians than potential suitors from England’s elite. In 1835 Ada married William King, a member of the English nobility. He soon became the Earl of Lovelace, giving Ada the title Countess of Lovelace. The two shared a love of horses—and her husband appears to have supported Ada’s intellect and thirst for knowledge.

Perhaps Ada’s most fruitful relationship was her lifelong friendship with Charles Babbage. On an evening together in 1834, Babbage explained to Ada and her mother an idea he had for another invention. Although the Difference Engine—that clanging, hand-cranked machine he had demonstrated for Ada the previous year— remained unfinished, Babbage was already envisioning a machine more complicated and more capable. It would be powered by steam, and its spinning wheels would take up as much space as a locomotive.

He called the imagined machine the Analytical Engine, and it would be able to do more than simple math; instead, it would be able to “[eat] its own tail,” in Babbage’s words, which meant that the machine could store its outputs and then employ them in other equations. In essence, this machine would not just calculate; it would compute.

Fascinated with the invention and its potential, Lovelace stayed in close communication with Babbage as he developed the machine’s schematics. In 1842 Italian mathematician (and future prime minister) Luigi Federico Menabrea published a paper on Babbage’s proposed machine, which Lovelace eagerly translated into English, in hopes of drumming up more support for the invention in England. She signed her translation only as “A.A.L.”

Along with the translated article, Lovelace submitted her own notes on the Analytical Engine. Her “Translator’s Note” dwarfed the translated article itself, clocking in at well over double Menabrea’s word count. In the notes, Lovelace included her own explanation of how the hypothetical machine would work, expressed in considerably greater detail than Menabrea’s original paper. 

Lovelace explained that the machine would function similarly to the Jacquard loom—an invention that had transformed the textile industry in the 19th century. The loom used a series of punch cards to partially automate the mechanical production of woven patterns and images. Rather than a person manipulating certain threads to create a pattern, the presence or absence of a punch on the card automatically told the loom which threads to raise, creating complex designs in a mere fraction of the time. The cards were a sort of binary code, and the Analytical Engine, too, would run on punch cards. “The Analytical Engine weaves algebraic patterns just as the Jacquard loom weaves flowers and leaves,” Lovelace wrote.

Perhaps the most influential of her notes was titled “Note G.” In this note, she wrote a detailed description of how punch cards could be used in the Analytical Engine to output a long sequence of Bernoulli numbers—a series of rational numbers that recur throughout mathematics. Her note converted a mathematical calculation into a series of instructions that could be executed by the Analytical Engine. With this note, Lovelace had written the first computer program—for a machine that did not even exist, and was known only by description.

Poetical science

Lovelace’s vision for the device went far beyond just the ability to calculate complex equations. In her notes, she argued that anything that could be represented by numbers—such as musical notes and letters—could also be manipulated by such machines. She foresaw an age in which people worked collaboratively with such machines. Her vision for these devices went far beyond the ideas of Babbage himself, who believed the machine’s usefulness would stop at computation.

In her work, Lovelace balanced her mother’s analytical rigor and her father’s whimsy. She published detailed, concrete descriptions of how a hypothetical computer would function while writing poetically about the potential of a machined future. Her mathematical intellect paired with her creativity allowed her to envision an abstract field that came to be known as computing. She called her own work “poetical science.”

Lovelace died of uterine cancer in 1852 at just 36 years old. She never saw the Analytical Engine completed. In fact, the machine has never been built. Babbage completed only a small piece of the Analytical Engine before his death in 1871. But in 1979—well over 100 years after Lovelace wrote the first computer program—a computing language used in transportation and military systems worldwide was named Ada in her honor.

Read This Next

An ambitious new Florida trail links two U.S. national parks
How reading the night sky helped Black Americans survive
Does a woman’s fertility really plummet at age 35?

Go Further

Subscriber Exclusive Content

Why are people so dang obsessed with Mars?

How viruses shape our world

The era of greyhound racing in the U.S. is coming to an end

See how people have imagined life on Mars through history

See how NASA’s new Mars rover will explore the red planet

Why are people so dang obsessed with Mars?

How viruses shape our world

The era of greyhound racing in the U.S. is coming to an end

See how people have imagined life on Mars through history

See how NASA’s new Mars rover will explore the red planet

Why are people so dang obsessed with Mars?

How viruses shape our world

The era of greyhound racing in the U.S. is coming to an end

See how people have imagined life on Mars through history

See how NASA’s new Mars rover will explore the red planet