Ada Lovelace’s plan for a machine that did not yet exist

The first published computer algorithm is generally credited to Ada Lovelace, an English mathematician who described a calculation for Charles Babbage’s proposed Analytical Engine in 1843. An algorithm is a precise set of steps for solving a problem. Lovelace’s instructions were designed for a machine that could, in principle, carry out those steps automatically.

The calculation concerned Bernoulli numbers, a sequence of values used in mathematics. Lovelace laid out how the Engine could manipulate numbers through repeated operations, including storing intermediate results and using them later. That structure—specifying operations and the order in which a machine should perform them—is what makes the plan recognizable as a computer program.

From a mathematical design to machine instructions

Babbage had conceived the Analytical Engine as a general-purpose mechanical computer, with a “store” for holding numbers and a “mill” for processing them. Lovelace encountered the design through her work translating an account of the machine by Italian engineer Luigi Menabrea. She added extensive notes of her own, including the Bernoulli-number procedure.

The Engine was never completed in Lovelace’s lifetime, so her algorithm was not run on the machine. Its importance lies instead in how clearly it connected a proposed machine’s parts to a sequence of instructions: the calculation could be described in advance, even before the hardware existed to perform it.

Why the distinction matters

Lovelace also recognized that a machine capable of manipulating symbols according to rules might do more than arithmetic, provided the information could be represented in a form the machine could process. That was a strikingly broad way to think about computing in an era of gears and punched cards.

So the claim is not that Lovelace invented every kind of algorithm, or that no one had ever described a calculation step by step. It is that her published Bernoulli-number procedure is widely regarded as the first algorithm written specifically for a proposed general-purpose computer—a program created on paper for a computer still waiting to be built.