Whether you were for her or against her, Margaret Thatcher set the agenda for the past three and a half decades of British politics. All the debates that matter today in the public arena, whether in economics, social policy, politics, the law, the national culture or this country's relations with the rest of the world, still bear something of the imprint she left on them in her years in office between 1979 and 1990. More than 20 years after her party disposed of her when she had become an electoral liability, British public life is still defined to an extraordinary degree by the argument between those who wish to continue or refine what she started and those who want to mitigate or turn it back. Just as in life she shaped the past 30 years, so in death she may well continue to shape the next 30. These are claims that can be made about no other modern British prime minister. She was in many ways the most formidable peacetime leader this country has had since Gladstone.

The fact that Mrs Thatcher was Britain's first and so far only woman major party leader, chosen entirely on merit, and then Britain's first woman prime minister, were of course huge landmarks. But her gender, though fundamental to her story, was in the end secondary. It was at least as significant, in the evolution of the late 20th-century Tory party, that she came from a petit-bourgeois background, a shopkeeper's daughter, though the man she overthrew in 1975, Ted Heath, had similarly middling origins and John Major an even humbler start. There was something of the rebel and outsider about her, as well as much that was stultifyingly conventional.

Mrs Thatcher's transcendent quality, however, was that she was a political warrior. She had a love of political combat, a zealotry for the causes she believed in, a reluctance to listen to advice, a conviction that she was always right and never wrong, and a scorn for consensus that set her apart from almost all her predecessors and, with the occasional exception of Tony Blair, from those who came after.

Mrs Thatcher was proof positive that personality matters in politics. As a young minister she did not seem destined for greatness. Even her election as Tory leader was something of a surprise, though her audacity in going for the top job while so many more senior figures hesitated was an indication of what was to come. Early on in her leadership, she was much patronised by male colleagues and adversaries. But as the social democratic consensus faltered in the 1970s and then cracked in the 1980s she rode the wind of history with an opportunist's brilliance. A Britain led by Willie Whitelaw or Michael Heseltine would have faced most of the same challenges that the one led by Mrs Thatcher faced. But the response would have been completely different. For good or ill, she made a difference.

The late Guardian columnist and Thatcher biographer Hugo Young, reflecting on her overthrow in 1990, identified five large events that would not have happened the way they did without her.

The first was the Falklands war of 1982, which Young described as "a prime example of ignorance lending pellucid clarity to her judgment". Surrounded by sceptical men who had fought in the second world war and knew what combat involved, she went for it. The result was an astonishing and absurd military triumph followed by an electoral one, which elevated Mrs Thatcher from the ordinary to the extraordinary.

A second, which would not have been possible without the authority conferred by the first, was the dethroning of trade union power. Once again, against the instincts of ministers – and the grandest of grandees, Harold Macmillan – who all preferred compromise to confrontation, she fought the miners' strike to the bitterest of finishes, in a contest that was always about industrial strategy rather than just coal.

Arguably even more important than these headline events was the third example, the conduct of economic policy. There had been a New Right before Mrs Thatcher, but it was the ideas of Friedrich von Hayek, as articulated to her by a series of domestic rightwing ideologues, on which she seized. It was Mrs Thatcher, abetted by her chancellors Sir Geoffrey Howe and Nigel Lawson, who drove the policy that the public sector was an unproductive burden on the wealth-creating sector and on taxpayers, and must therefore be reduced and privatised. It was she who insisted that the chief aim of government economic policy should be price stability, and that it should not give priority to reducing unemployment or to stimulating demand.

And it was she again who seemed to believe, far more than those around her, that the market economy required not a minimal state to protect it but a strong state, marked by everything from the abolition of local government autonomy to the enhancement of police powers, intolerance towards gay rights, the broadcasting ban on Sinn Féin, and increased defence spending. She made enemies without flinching, and they reciprocated. Her rule was marked by the most serious urban riots of the 20th century, one of the most divisive strikes in recent times, and the century's most audacious prime ministerial assassination attempt, which thankfully she survived.

Mrs Thatcher's unique mark was also felt in the two confrontations that ultimately undid her. The first was the poll tax, which was disastrous, unjust and was her policy alone. The poll tax came to embody a prime minister who ruled from conviction not sense, and who did not care about, indeed gloried in, a confrontation that destroyed the Tory party in Scotland and may indirectly come to destroy the union she otherwise championed. Similarly, and less easily disposed of after her fall, was Europe. Mrs Thatcher began her prime ministership as a pragmatic, if often acerbic, European. But as she became a bigger figure on the world stage, feted both by Mr Reagan and by Mikhail Gorbachev, she became increasingly strident and disruptive towards Europe. Her style became the policy, cementing the love affair with an already overmighty press but with disastrous effects for her leadership (which was ended by Sir Geoffrey's resignation over the issue), her party (which became obsessed with the subject) and for Britain. Except for Mr Blair in his early years, every British leader since has felt Mrs Thatcher at his shoulder in dealings with Europe, to the lasting national loss.

When she arrived in Downing Street in 1979 she talked about replacing discord with harmony. She may briefly have meant it, but the harmony she sought in the long term was one whose terms were set overwhelmingly in the interests of the British business class as she perceived them. She disdained the public realm and presided over the growth of the cult of marketplace success as the foundation of a good society – a low-tax, home-owning, privatised, high-carbon, possessive, individualist, winner-takes-all financial model whose failure haunts the choices still facing this country today. Much was wrong with the Britain she inherited in 1979, undemocratic union power among them, and many things, though not wrong in themselves, were unsustainable without radical change, including some nationalised utilities. Britain would have had to alter radically in the 1980s and 90s, and the process would have been hard and controversial. But, as Germany and other northern nations have shown, economic dynamism has been possible without the squandering of social cohesion that Mrs Thatcher promoted.

In the last analysis, though, her stock in trade was division. By instinct, inclination and effect she was a polariser. She glorified both individualism and the nation state, but lacked much feeling for the communities and bonds that knit them together. When she spoke, as she often did, about "our people", she did not mean the people of Britain; she meant people who thought like her and shared her prejudices. She abhorred disorder, decadence and bad behaviour but she was the empress ruler of a process of social and cultural atomism that has fostered all of them, and still does.

The governments that followed have struggled to put a kinder and more cohesive face on the forces she unleashed and to create stability and validity for the public realm that yet remains. New Labour offered a first response. The coalition is attempting a second draft in grimmer circumstances, and there will be others. There can certainly be no going back to the failed postwar past with which Margaret Thatcher had to wrestle. But there should be no going back to her own failed answer either. She was an exceptionally consequential leader, in many ways a very great woman. There should be no dancing on her grave but it is right there is no state funeral either. Her legacy is of public division, private selfishness and a cult of greed, which together shackle far more of the human spirit than they ever set free.