The Algorithm That Started It All

Ada Lovelace published the first algorithm explicitly designed for a computing machine in 1843, a full century before the first modern computer was built. She was Augusta Ada King, Countess of Lovelace, an English mathematician born in London on 10 December 1815 and dead by 36. What she produced in those years was not an accident of circumstance but the result of a specific, unusual mind applied to a problem most people around her could not even see.

The algorithm, known as Note G, was published in Taylor's Scientific Memoirs in August 1843. It describes a method for computing Bernoulli numbers, a complex rational number sequence used in number theory, using Charles Babbage's proposed but never-built Analytical Engine. The algorithm runs 25 arithmetic operations and uses a recursive logic that Lovelace had to unroll by hand because the Analytical Engine's design at the time could not execute loops automatically.

Note G is the artifact that earns Lovelace the "first programmer" designation, though the title is not without challengers. That debate is addressed directly below. What is not in serious dispute: Ada Lovelace saw something in the Analytical Engine that its own inventor, Charles Babbage, had not fully articulated, and she wrote it down 180 years ago.

The Daughter Lord Byron Never Knew

Lord Byron left his wife and infant daughter when Ada was one month old. Byron died in Greece in 1824, when Ada was eight. She never met him.

Her mother, Annabella Milbanke, was a mathematician herself. Milbanke drew a straight line between Lord Byron's erratic genius and a threat she intended to prevent. She steered Ada rigorously toward mathematics and science, specifically to counteract what she called her fear of inherited poetic instability. The strategy was to build a mind of order and precision, not imagination.

Ada Byron had a difficult childhood physically. Around age thirteen, she was partially paralyzed for several years, spending long periods bedridden. The illness forced her into an interior life, and the mathematics Annabella Milbanke had assigned became the terrain of that life.

The irony her mother never noticed: the effort to suppress Byron's influence produced something neither science nor poetry alone could have generated. Lovelace later described her own approach as "poetical science," a phrase that captures exactly the hybrid Annabella Milbanke had tried to prevent. The attempt to block Byron's legacy created it.

How Ada Lovelace Met Charles Babbage and His Unbuilt Computer

In 1833, at seventeen, Ada was introduced to Charles Babbage through Mary Somerville, the Scottish science writer who was one of her tutors. At a demonstration in Babbage's salon, Ada Lovelace saw a prototype section of the Difference Engine, a mechanical calculator designed to compute polynomial functions automatically. Most visitors saw a curiosity. She grasped the underlying principle.

Babbage's more ambitious successor design, the Analytical Engine, was a different machine entirely. It had a "mill" (a calculating unit equivalent in concept to a modern CPU), a "store" (memory, capable of holding 1,000 fifty-digit numbers in design), punched card input borrowed from Jacquard loom technology, and a printed output mechanism. In conceptual terms, the Analytical Engine was what computer scientists would later call Turing-complete, though that vocabulary was a century away.

ComponentBabbage's TermModern Equivalent
Calculating unitMillCPU (Central Processing Unit)
Memory unitStoreRAM / primary memory
Program inputPunched cardsSoftware instructions
Results outputPrinterOutput device

The Analytical Engine was never built. Babbage's shifting specifications, the engineering limits of the Victorian era, and a persistent lack of government funding all contributed. The Science Museum in London finally assembled a working section based on Babbage's original plans in 1991, 139 years after Lovelace's death.

Ada Lovelace saw the machine's potential before it existed and before the language to describe that potential had been invented.

Note G: The Step-by-Step Breakdown

In 1842, Charles Babbage traveled to Turin to deliver a lecture on the Analytical Engine. The Italian mathematician Luigi Federico Menabrea attended and wrote up the proceedings in French. Babbage asked Lovelace to translate the Menabrea article for Taylor's Scientific Memoirs.

Lovelace translated the article, then added seven sets of notes, labeled A through G, that ran to approximately three times the length of Menabrea's original. All seven notes were published in Taylor's Scientific Memoirs in August and September of 1843.

The seventh note, Note G, is the one that changed history. Note G contains a step-by-step procedure for computing Bernoulli numbers, a rational number sequence with deep connections to number theory and calculus. Lovelace chose this particular calculation deliberately. She wrote that the object was not simplicity of calculation but illustration of the engine's powers, and Bernoulli numbers were elaborate enough to make the demonstration meaningful.

The algorithm is recursive: each new Bernoulli number value depends on all previously computed values. Because the Analytical Engine could not, in its then-current design, execute loops automatically, Lovelace manually unrolled each iteration, laying out 25 arithmetic operations in tabular form and tracking variables step by step across the entire computation.

Note G was never physically executed in 1843. No machine existed to run it. The algorithm's logic was computationally verified in the modern era, which is when the transposed variables were identified. That transposition is, in all likelihood, the world's first documented software bug.

She Saw What Babbage Missed: Symbolic Computing and "Poetical Science"

Note G is the most cited of Lovelace's seven notes. Note A may be the most important.

In Note A, Ada Lovelace drew a distinction that Charles Babbage had not made explicit. The Analytical Engine, she wrote, could operate on any object whose fundamental relations could be expressed symbolically. The engine was not confined to numbers. It could, in principle, process musical notes, linguistic structures, and logical relationships, operating on anything that could be represented as symbols with defined rules of manipulation.

She wrote that the Analytical Engine "might compose elaborate and scientific pieces of music of any degree of complexity or extent." This was 1843. The stored-program computer would not arrive for over a century. The conceptual separation between hardware and software had not been articulated. Yet Ada Lovelace described a general-purpose symbol-manipulation machine clearly enough that the passage reads today as a direct anticipation of modern computing.

Lovelace called herself an "Analyst (& Metaphysician)" and named her method "poetical science." The label was precise, not decorative. She was arguing that mathematical imagination, not just mathematical rigor, was required to see what a machine like the Analytical Engine could become.

That leap from number-crunching to symbolic reasoning defines computing's most consequential contributions. It is the same category of mathematical imagination that would eventually produce the first woman to win the Fields Medal more than a century after Lovelace died.

Was She Really the First? The Honest Answer

Three serious challenges complicate the "first programmer" title:

1. Babbage's unpublished working sketches. Charles Babbage created worked examples of what the Analytical Engine would do, and some historians argue these constitute programs that predate Lovelace's note. The counter-argument: Babbage's sketches were unpublished working notes, not formal algorithms, and they lacked the systematic rigor of Note G.

2. Menabrea's 1842 article. The article Lovelace translated included a simpler program for solving systems of linear equations, published a year before Note G. However, the Bernoulli number algorithm appears nowhere in Menabrea's original. Lovelace originated it independently.

3. The question of Babbage's influence. Babbage and Lovelace corresponded extensively during the nine months she worked on the notes. Some letters suggest Babbage contributed ideas. Stephen Wolfram's 2015 analysis of the full Babbage-Lovelace correspondence concluded that while Babbage was deeply involved, the algorithmic thinking in Note G was Lovelace's own work.

The scholarly consensus as of 2025 is cautious but settled on a specific formulation. The ACM's position grants Lovelace "primary authorship of the first algorithm intended for a computing machine." The Computer History Museum identifies her as the person who "saw further than Babbage" in recognizing the machine's symbolic, non-numerical potential.

The strongest claim the evidence supports: Note G is the first published, complete, detailed algorithm explicitly designed for a computing machine, and Ada Lovelace is its originator.

The critics raise legitimate points. The title holds.

What Ada Lovelace's Work Became

The Ada programming language was approved on December 10, 1980. The date was chosen deliberately. December 10 was Ada Lovelace's birthday.

The Ada language's military standard designation is MIL-STD-1815. The number 1815 was chosen to honor her birth year. The U.S. Department of Defense mandated Ada for all safety-critical embedded systems, and the institutional effect was measurable: the number of high-level programming languages in use across DoD embedded systems dropped from more than 450 in 1983 to 37 by 1996. Ada is also an international standard, ISO/IEC 8652.

Ada Lovelace Day, founded in 2009 by Suw Charman-Anderson, is held annually on the second Tuesday of October. The event began as an online "day of blogging" and grew into multi-national conferences and in-person celebrations of women in science, technology, engineering, and mathematics (STEM). The British Computer Society awards an Ada Lovelace Medal. The Royal Society includes her portrait among its honored scientists.

Her Legacy in the Age of Artificial Intelligence

The NIST Blog describes Ada Lovelace as "the world's first computer programmer who predicted artificial intelligence." That framing is not hyperbole. Her 1843 statement that the Analytical Engine might compose elaborate and scientific pieces of music is now happening, with AI music generators producing compositions on demand. The symbolic manipulation she described in Note A, operating on relationships rather than numbers, is the conceptual foundation of machine learning and modern artificial intelligence.

Lovelace accomplished all of this between meeting Babbage at seventeen and dying at thirty-six. Three children, a gambling problem serious enough that she pawned the family jewels twice and owed roughly £2,000 at death, and a mathematical correspondence that produced the first computer algorithm. The biography has texture. The work stands separately from it.

Her insight about symbolic computation was not confirmed in her lifetime. No machine ran Note G in 1843. The Analytical Engine was not built. Only as electronic computing developed into the field she had partly imagined did the significance of what Lovelace had written become clear. That is a distinct kind of achievement: being precisely right before anyone had the tools to confirm it.

Women across the sciences have carved similar paths, making foundational claims that only later generations could fully recognize. The first woman to win a Nobel Prize was also working at the edges of what her contemporaries could see, in a field that would not fully reckon with her contribution for decades.

Lovelace did not invent the computer. She wrote the first program for one. The distinction matters, and she would have insisted on it.

Frequently Asked Questions

Who was Ada Lovelace?

Ada Lovelace (1815-1852) was an English mathematician and writer who worked with inventor Charles Babbage on his proposed Analytical Engine. In 1843, she published an algorithm for computing Bernoulli numbers, the first published algorithm explicitly intended for a computing machine. She is widely credited as the world's first computer programmer.

What did Ada Lovelace actually write?

Lovelace translated an 1842 French article about the Analytical Engine by Italian mathematician Luigi Federico Menabrea, then added seven sets of notes, labeled A through G, that were approximately three times longer than the original. The seventh note, Note G, contains her 25-step algorithm for computing Bernoulli numbers using the Analytical Engine. That is the artifact that earns her the "first programmer" designation.

Was Ada Lovelace really the first computer programmer?

The claim is the dominant scholarly view but not universally accepted. Critics point to Charles Babbage's earlier unpublished working sketches and Menabrea's 1842 article, which included a simpler program. The strongest defensible statement is that Note G is the first published, complete, detailed algorithm explicitly designed for a computing machine. The ACM credits Lovelace with primary authorship. Stephen Wolfram's 2015 analysis of the Babbage-Lovelace correspondence concluded the algorithmic thinking in Note G was Lovelace's own.

What is the Ada programming language?

Ada is a structured, statically typed programming language developed for the U.S. Department of Defense and approved on December 10, 1980, a date deliberately chosen as Ada Lovelace's birthday. Its military standard number, MIL-STD-1815, was chosen to honor her birth year. The DoD mandated the Ada language for all safety-critical embedded systems, making her name part of military infrastructure for decades. Ada is also an international standard: ISO/IEC 8652.

What is Ada Lovelace Day?

Ada Lovelace Day is an annual celebration of women in science, technology, engineering, and mathematics (STEM), held on the second Tuesday of October. Founded in 2009 by Suw Charman-Anderson, Ada Lovelace Day has grown from an online "day of blogging" into multi-national in-person events and conferences.