Luigi Menabrea studied engineering and mathematics at the University of Turin, then became an engineer in the army. His career was a remarkable one in which he made very significant contributions to science, yet also reached the highest levels in military and political life. In order to understand the background to his life we need to look briefly at the political situation in Italy.

The aims of most Italians was a unified Italian state, but there were different ideas as to how to approach this. Some favoured a unified Italy ruled by a king, others looked for a republic. Austria controlled parts of the country which aspired to become part of the unified Italy while France played an important role, yet their position was not as well defined. Then of course there was the 'problem' of the Papal States which were ruled by a religious leader, namely the Pope. The end of Napoleon's control of much of Europe saw the Congress of Vienna (1814-15) establish a political order in Italy that lasted essentially through the first 60 years of Menabrea's life. It created states such as that of Nice, Savoy, and Piedmont ruled by King Victor Emmanuel I of Savoy. Francis I of Austria also became king of Lombardy-Venetia and Austrian troops stationed at Ferrara were there to intervene in the Papal States if necessary. Austria also had the right to intervene in the Kingdom of the Two Sicilies, and Venetia and Lombardy became part of the Austrian empire. In 1831 Charles Albert became king of Savoy. He was strongly anti-Austrian and wanted to drive the Austrians from the Italian peninsula. Another who wished to drive out the Austrians was Cavour who, like Menabrea, was at this time following a military career. The authorities became suspicious of his motives and he was sent to the Alpine fortress of Bardo where he was out of the way. Cavour resigned and he was replaced in 1831 by Menabrea.

Menabrea soon moved from the fortress of Bardo to become professor of mechanics and construction at both the Military Academy of the Kingdom of Sardinia and at the University of Turin. In August 1840 Charles Babbage gave a series of lectures on his Analytical Engine at the Academy of Sciences in Turin. The occasion was the second congress of Italian scientists, and the invitations had come in the name of King Charles Albert. He had been invited to give the lectures by Giovanni Plana and expected that Plana would write up the lectures for publication. However, Menabrea was assigned to the task, something which must have disappointed Babbage since Plana was a distinguished scientist whereas he had almost certainly never heard of Menabrea. However the congress was a great success and in addition to Babbage's lectures there were discussion sessions on the Analytical Engine which involved Babbage, Menabrea, and the Italian astronomer Ottaviano Mossotti. Menabrea wrote up the lectures, modified with ideas from the discussions, in the paper Notions sur la Machine Analytique de M Charles Babbage which was published in French in Bibliothèque Universelle de Genève in October 1842.

This was the paper which Lord Byron's daughter Ada Lovelace published a translation of with extensive notes and further illustrations of the working of the analytic engine.

Not long after the publication of this article Menabrea began his political career. By 1848 he became a trusted helper of King Charles Albert who sent him on a number of important diplomatic missions. Now 1848 was the year in which revolutions took place in many countries in Europe, with people protesting against their rulers. Francis Ferdinand V was temporarily expelled from Modena but was restored by Austrian troops. Menabrea was sent on a diplomatic mission to Modena to make sure that it remained part of the Kingdom of Sardinia. On 20 August 1859 Modena declared itself part of the Kingdom of Italy. He was also sent on a similar mission to Parma. After this Menabrea entered the Parliament of Piedmont and was attached to the Ministry of War, then later to the Ministry of Foreign Affairs.

During this period of politics he continued to do excellent scientific work, giving the first precise formulation of methods of structual analysis based on the principle of virtual work first presented in 1857. He also studied elasticity and the principle of least work in Nouveau principe sur la distribution des tensions dans les systèmes élastique published in Comptes rendus in 1858. The principle of Menabrea states that the elastic energy of a body in perfect elastic equilibrium is a minimum with respect to any possible system of stress-variation compatible with the equations of the statics of continua in addition to the boundary conditions. In 1868 he published an improved demonastration of his principle in Études de Statique Physique - Principe général pour déterminer les pressions et les tensions dans un système élastique. He published, jointly with J L F Bertrand, the first completely correct proof of this principle in 1870. Castigliano, with whom Menabrea was in dispute regarding this principle, became better known for the concepts of work and energy in analytical mechanics. Menabrea later published two further papers answering the criticisms of Castigliano.

This scientific work by Menabrea took place at a time when he was still more heavily involved in politics and military work. He had always worked for a compromise solution to the Italian unification question and up to 1859 believed that a compromise between the Vatican and the state was possible. However in 1859 there was a war which Cavour and Napoleon III of France organised against the Austrians in north Italy. Menabrea resumed a leading military role as major-general and commander-in-chief of the engineers in the Lombard military campaigns. Peschiera, at the southeast end of Lake Garda, was one of the four fortified towns of the Austrians and Menabrea organised the siege works against it. He also used his engineering skills to flood the plains through which the Austrian army was advancing. Menabrea was present at Palestro when Manfredo Fanti scored a brilliant victory against Austria. He was also involved at Solferino on 24 June 1859 - the battle against the Austrians there being the last engagement of the second War of Italian Independence. The nothern part of Italy had now been unified as the Kingdom of Italy.

In 1861 Menabrea was appointed lieutenant-general and was involved in conducting the seige of Gaeta. Gaeta's capitulation to the Kingdom of Italy in 1861 marked the end of the Bourbon Kingdom of the Two Sicilies. Menabrea now turned again to politics and was appointed Naval Minister in the cabinet of Bettino Ricasoli from June 1861 to May 1862. He then served in the cabinet of Farini Minghetti as Minister of Public Works from December 1862 to September 1864. The year 1866 saw another war with Austria in which the Kingdom of Italy captured Venetia from the Austrians. Menabrea was given full authority by the Kingdom of Italy to negotiate with Austria the hand over of Venetia at the Treaty of Prague at the end of the war. In fact he had to contend with a trick from the Austrians who gave Venetia to the French on 12 October in an attempt to keep the territory out of Italian hands. However one week later Napoleon III ceded Venetia to Italy.

On 27 October 1867 Menabrea succeeded Urbano Rattazzi as Prime Minister of Italy. He served until 14 December 1869 when he resigned since a new chamber had been elected in which he did not hold a majority; he was replaced by Giovanni Lanza. Not only did Menabrea hold the position of Prime Minister during this period (during which there were three cabinets), but he also held the position of Foreign Minister. It was not an easy period in which to be Prime Minister. During his office Garibaldi led an army on Rome in an attempt to capture the Papal States. France supported the Pope and French troops defeated Garibaldi's volunteers at Mentana. Although Menabrea had secretly supported Garibaldi, and the government had put up money for the failed venture, he had to issue a proclamation on 27 October 1868 starting legal proceedings against Garibaldi. Certainly this was playing politics for Menabrea strongly believed that the Pope should lead the Roman Catholic Church, not be head of a country. He also strongly supported Rome becoming part of the Kingdom of Italy. This was not achieved during his period of office but one of his successes as Prime Minister was to scrap unpopular taxes on items such as flour.

After Giovanni Lanza took over as Prime Minister he was aware that Menabrea might still keep substantial power through his close contacts with King Victor Emmanuel II. Lanza, therefore, thought it better to remove Menabrea from the centre of events and he did this by appointing him ambassador to London. He was made Marquis of Valdora in 1875. In 1882 he was appointed as ambassador in Paris, replacing General Cialdini, and he continued in this role until he retired from public life in 1892.