Etymology and history
The term "ideology" was born during the Reign of Terror of French Revolution, and acquired several other meanings thereafter.
The word, and the system of ideas associated with it, was coined by Antoine Destutt de Tracy in 1796, while he was in prison pending trial during the Terror. The word was created by assembling the words idea, from Greek ἰδέα (near to the Lockean sense) and -logy, from -λογία.
He devised the term for a "science of ideas" he hoped would form a secure foundation for the moral and political sciences. He based the word on two things: 1) sensations people experience as they interact with the material world; and 2) the ideas that form in their minds due to those sensations. He conceived "Ideology" as a liberal philosophy that would defend individual liberty, property, free markets, and constitutional limits on state power. He argues that among these aspects ideology is the most generic term, because the science of ideas also contains the study of their expression and deduction.
The coup that overthrew Maximilien Robespierre allowed Tracy to pursue his work.
Tracy reacted to the terroristic phase of the revolution (during the Napoleonic regime) by trying to work out a rational system of ideas to oppose the irrational mob impulses that had nearly destroyed him.
Napoleon Bonaparte came to view 'Ideology' a term of abuse, which he often hurled against his liberal foes in Tracy's Institutional. According to Karl Mannheim's historical reconstruction of the shifts in the meaning of ideology, the modern meaning of the word was born when Napoleon used it to describe his opponents as "the ideologues". Karl Marx adopted this negative sense of the term and used it in his writings (he described Tracy as a "fischblütige Bourgeoisdoktrinär", a fishblooded bourgeois doctrine).
Tracy's major book, The Elements of Ideology, was soon translated into the major languages of Europe, and in the next generation, when post-Napoleonic governments adopted a reactionary stance, influenced the Italian, Spanish and Russian thinkers who had begun to describe themselves as "liberals" and who attempted to reignite revolutionary activity in the early 1820s (these included the Carlist rebels in Spain, the Carbonari societies in France and Italy, and the Decembrists in Russia).
In the century after Tracy, the term ideology moved back and forth between positive and negative connotations.
(Perhaps the most accessible source for the near-original meaning of ideology is Hippolyte Taine's work on the Ancien Régime (the first volume of "Origins of Contemporary France"). He describes ideology as rather like teaching philosophy by the Socratic method, but without extending the vocabulary beyond what the general reader already possessed, and without the examples from observation that practical science would require. Taine identifies it not just with Destutt De Tracy, but also with his milieu, and includes Condillac as one of its precursors. (Destutt de Tracy read the works of Locke and Condillac while he was imprisoned during the Reign of Terror.))
The term "ideology" has dropped some of its pejorative sting, and has become a neutral term in the analysis of differing political opinions and views of social groups. While Karl Marx situated the term within class struggle and domination, others believed it was a necessary part of institutional functioning and social integration.