On the thirtieth of August, 1852, William, Earl of Lovelace, stood beside his dying wife and listened to a confession that would dissolve their marriage in the space of one sentence. History has preserved no exact record of what Ada said to him that day, yet its impact was instant and total. He left the room and did not return. In the days that followed, he described a mind in the deepest misery, every treasured certainty of his married life thrown into doubt.

He had been the Countess of Lovelace’s husband for seventeen years. He would never see her again before her death. A quiet existence had never been within Ada’s reach, not with a father like the one she had. She was born Augusta Ada Byron on December 10th, 1815, the sole legitimate child of the poet Lord Byron.
All his other offspring came from affairs, yet being born within marriage did not shield her from a sorrowful youth. Byron’s union with Anne Isabella Milbanke—known as Annabella—had astonished society. He was a shameless rogue, notorious throughout Europe for his outrageous behavior, whether housing a bear in his Cambridge rooms or commanding troops in Greece’s struggle for independence. She was prim and principled, steeped in science to such a degree that Byron tauntingly nicknamed her the princess of parallelograms.
It was through her mother that Ada would come to inherit her later passion for figures. The affectionate nickname could not rescue the marriage. Byron had expected his first legitimate child to be a splendid son who would continue the family line, and upon discovering he had a daughter, he made no attempt to conceal his letdown. Only a month after Ada’s birth, the pair parted ways.
Not long afterward, mounting debts drove Byron to abandon England for the European continent. He would never again lay eyes on his homeland or his daughter. Byron professed to keep Ada in his thoughts, requesting that relatives send him news of her welfare, mentioning her frequently in his verse, and for years keeping her likeness upon his desk. These were empty displays.
By the laws of England in that era, Byron could readily have sought custody of his daughter. He never attempted it. His departure left Annabella sour and resentful. She circulated scandalous tales about him and never shrank from condemning him in front of their child.
Consequently, Ada had no bond with her father of any kind. She had not even exchanged a word with him when he succumbed to a violent illness at thirty-six, while Ada was merely eight years old. She did not lay eyes on a portrait of him until she reached twenty. Rather, her mother controlled her early years, resolved to guarantee Ada would never tread her father’s path.
From the moment Ada was a tiny child, Annabella instructed her in mathematics and reasoning, trusting that rigorous training in numbers would stifle her daughter’s imagination. She feared that even a small taste of the creative arts might send Ada down the same road to madness that had consumed her father. Yet Annabella cared more about stopping Ada from resembling Byron than about being a mother. To the public, she presented the picture of a devoted, affectionate parent.
It was all a pretense. Once the doors were closed, the grim reality emerged. Perhaps Ada reminded her too strongly of the husband she loathed. Lady Byron spent as little time as she could with her daughter, though she knew that if anyone learned of her neglect, Ada could be removed from her care.
Whenever Annabella received a letter from her own mother inquiring after Ada, she gave highly particular directions on the envelope: retain every one of these letters, in case she should ever need proof that she was a devoted mother. Her contempt still leaked through. In one letter she called Ada “it”: “I talk to it for your satisfaction, not my own, and shall be very glad when you have it under your own. “
Ada passed her childhood in solitude at her mother’s country estate while Annabella journeyed elsewhere, guarded closely by her mother’s intimate friends, who were under strict instructions to ensure the girl never showed the slightest hint of moral waywardness.
Ada was also afflicted by agonizing ailments, dreadful headaches so intense they blurred her vision. In her teens she contracted a case of measles so severe that it left her paralyzed. She was bedridden for nearly a year, and even once she recovered, she relied on crutches to walk for a considerable time. Her mother’s suspicion was not wholly without cause.
Ada did possess a rebellious streak. At seventeen, she began a clandestine romance with one of her tutors, and the pair intended to elope. When Ada presented herself to the tutor’s family, they instantly identified her as the notorious daughter of Lord Byron and got in touch with her mother, who hauled her daughter back home and buried the entire episode. Fate, however, had other intentions.
On June 5th, 1833, barely recovered from her failed elopement, the seventeen-year-old Ada made her entrance into London high society at an opulent ball, where she crossed paths with a man named Charles Babbage. He was hardly the most striking person in the room. In his early forties and without employment, he scraped by delivering public lectures, publishing rather ordinary scientific papers, and drawing on the considerable fortune he had inherited following the deaths of his father and his wife. Few people found Babbage compelling.
Ada recognized him at once for what he was: a visionary whose concepts would transform the world and her own existence. In their era, a computer meant a person—someone who carried out calculations. Gangs of these human computers would divide a complicated problem, draft each component by hand, and reach the solution through painstaking arithmetic. It was sluggish, laborious, and wasteful.
Babbage reasoned there had to be a superior method. He and Ada started discussing his difference engine, an elaborate device able to execute intricate computations. Ada was captivated, and Babbage quickly came to appreciate her mathematical brilliance, dubbing her his enchantress of numbers. Even so, Ada was in the bloom of youth, and the draw of fashionable society kept summoning her.
She grew into a fixture of the London social whirl, gaining fame as a polished charmer who adored dancing and never hesitated to voice her opinions. Although she had never encountered Lord Byron, his acquaintances could not help but remark on the likeness—not merely in her features, but, as one observer noted, especially the mouth. London’s gossips were eager to learn whom the scandalous daughter of Lord Byron would wed. Ada could be exceedingly guarded, which is how she startled all of England by abruptly declaring her engagement to William, the eighth Baron King, a prosperous English nobleman.
She became Lady King, and the pair divided their time among three lavish residences. William was precisely the kind of man her mother would have endorsed. By every account he was a perfect gentleman, though inflexible and methodical. Like any proper Victorian couple, they promptly began producing children.
The couple wed in 1835, and Ada delivered children in 1836, 1837, and 1839. Before long William inherited the title of Earl of Lovelace, which made Ada the Countess of Lovelace—the title that would secure her lasting fame. During the first years of her marriage, Ada was too occupied to give much thought to mathematics or to Babbage’s machine. Yet once her third child arrived, a restless feeling took hold of her.
Aided by a mathematics tutor, she threw herself back into intricate problems and pondered how they might be put to practical use in the world. In a letter to Babbage, she speculated about whether a mathematical formula might be used to play a card game such as solitaire. Such thinking was almost unheard of in those days, yet it was precisely the sort of notion that would secure Ada her place in the history books. At one point Babbage proposed that Lovelace translate into English an article on the Analytical Engine written by the Italian Luigi Menabrea.
She complied, and appended notes that ran three times the length of Menabrea’s original piece. Among all her notes, note G stood out as the crowning achievement. Lovelace grasped Babbage’s machine better than nearly anyone, and in note G she laid out one of its practical applications: she spelled out in meticulous detail how the Analytical Engine could be used to compute a sequence of Bernoulli numbers. Put simply, note G amounted to the first computer program ever written, which made Ada Lovelace the world’s first computer programmer.
Her translation of Menabrea’s article was, by a wide margin, the finest explanation of the concept produced up to that time, and it brought the notion of the mechanical computer to the wider world. She went so far as to foresee that a computer might be used for purposes beyond mathematics, such as composing music. Yet this brilliant work nearly wrecked her friendship with Babbage. After Lovelace had devoted countless hours to writing and translating, Babbage attempted to attach a preface that consisted of little more than grievances about the government’s failure to support him.
Ada pushed back, and Babbage retorted that if the preface were dropped, she might as well not publish the article at all. Outraged that her friend would discard her work over such a trivial dispute, Lovelace went ahead and published the paper without the preface. Their friendship remained strained for years afterward. Ada knew her own worth, even in a Victorian society that expected women to have no ambitions beyond the household.
In a letter to her mother, she described her insatiable, restless urge to create something of lasting substance. She was hardly modest. She wrote: “I believe myself to possess a most singular combination of qualities exactly fitted to make me preeminently a discoverer of the hidden realities of nature.”
Lady Byron’s reaction to her daughter’s happiness was cruel.
At the very height of Lovelace’s career, her mother disclosed that Ada’s cousin, Elizabeth Medora Leigh—Lord Byron’s niece—was in fact his daughter too, and that Byron had fathered a child with his own half-sister. It was a bombshell, and deliberately so. In a troubling twist, Ada showed no surprise whatsoever. She said she did not hold her father responsible for having been seduced.
Ada Lovelace was far from innocent, and mathematics was not the only questionable pursuit she took up. She gave herself over to gambling, and in time it spiraled out of control. During the 1840s she laid out more than three thousand pounds on horses, then attempted to devise a mathematical model that would beat the system and cheat her gambling companions out of their winnings. The model failed in spectacular fashion.
Ada staked everything and lost. Until that point she had kept her gambling debts hidden from her husband, but now she had no choice but to confess. Possibly because of this and other inclinations, her mother—still deeply meddling in her life—engaged a man named William Benjamin Carpenter to tutor Ada’s children and to act as Ada’s moral guide. Yet although Carpenter was meant to teach Lovelace how to behave as a proper lady, she ended up corrupting him instead.
He fell hopelessly for her bold personality and became increasingly fixated, devoting all his time to her while constantly insisting that, being a married man, his intentions were honorable. Once his advances grew too blatant, Lovelace threw him out of the house. Her life did not grow any easier. Ada had a fraught relationship with her own children, much as she had with her mother.
Her eldest son, Byron, left her to join the Navy but deserted shortly afterward. He never got in touch with his family again. Lovelace clung to the hope that her son had made his way to America and was living well there. She never discovered the truth: after deserting, Byron wound up working at a grimy shipyard in England, where he died unmarried and without children at only twenty-six years of age.
Ada was not especially close to her daughter, Anne, either, though Anne fared better than her brother. Anne relocated to the Middle East, where she became one of the most renowned breeders of Arabian horses in the world. Only the youngest child, Ralph, remained near home and ultimately inherited the family title, becoming the second Earl of Lovelace. While Ada had always carried a strange fixation on her mysterious father, Ralph detested Lord Byron utterly.
In 1905, Ralph brought out a book on his family’s history in which he wrote: “Lord Byron’s life contained nothing of any interest except what ought not to have been told.”
Ada would have very little time with any of her children. In her thirties, the health troubles that had dogged her all her life came back, and she spent months at a stretch going from one doctor to another in pursuit of a cure. This was Victorian England, and medicine was closer to an art than a science.
One of the remedies her mother proposed was the mystical practice of mesmerism. Ada tried everything, yet her health kept deteriorating. She was in constant, terrible pain and was prescribed opiates, a standard Victorian treatment, to dull the agony. By the 1850s, her doctors had exhausted their options and had to confront the truth: Lovelace had uterine cancer, and she was dying.
By 1852 nothing could be done to save the thirty-six-year-old. In one of her final letters, she wrote sorrowfully: “I begin to understand death, which is going on quietly and gradually every minute and will never be a thing of one particular moment.”
Though few people know her today, Ada had made some remarkable friends over the course of her life, and a handful of them tried to visit her on her deathbed. A couple of months before she passed, she received a visit from none other than Charles Dickens.
She begged him to read her a passage about death from one of his books. But Dickens was among the rare few who could truly see her. Lady Byron took complete control during Lovelace’s final months. Ada spent her last days much as she had spent her childhood: almost entirely alone.
Her mother had never accepted any of her friends and barred many of them from seeing her daughter to say a final farewell. All the while, Lady Byron pressed Ada to repent her sinful life and give herself over to God. It may have been these very urgings that drew out Ada’s troubling confession. On August 30th, 1852, Ada summoned her husband William to her bedside and told him something.
When William heard it, he walked out and never came back. After storming from the room, the Earl of Lovelace wrote: “For the past week, I have been prey to the utmost wretchedness of mind. Every cherished conviction of my married life has been unsettled.”
Historians say Ada Lovelace told her husband she had been unfaithful to him throughout their marriage, though her exact words can never be known.
As for who it might have been, she had been close to a man named Andrew Cross for several years, and the two were oddly secretive about their relationship. As Ada lay dying, one of the few people she insisted on seeing, despite her mother’s objections, was Cross. When she finally passed, she left all of her father’s possessions to him. Though her husband had abandoned her and her mother had isolated her, Ada Lovelace held on for three more agonizing months.
She died at last on November 27th, 1852. Her close friend and long-time correspondent Florence Nightingale later wrote: “They said she could not possibly have lived so long were it not for the tremendous vitality of the brain that would not die.”
Lovelace was buried in an extremely small ceremony. Neither Charles Babbage, her long-time friend and collaborator, nor her own mother attended.
One of Ada Lovelace’s final requests was to be buried beside Lord Byron, the father she had never met.