Facebook has confirmed that it has acquired about 750 patents from IBM as it girds itself for litigation, including a lawsuit by Yahoo, and prepares a war chest of what one patent lawyer says are an essentlal tool in any sizeable company's defences.

Patents have become so essential to any technology company, says Dr Alex Frost of the UK patent practice Boult Wade Tennant, that "whatever size you are, if you threaten someone's business, they will use [their patents]. It's as true of software as it is of television makers or electronics components." (Boult Wade Tennant acts in the UK for clients including Yahoo, Motorola and Samsung.)

The patents are believed to cover various technologies to do with software and networking, and apply in the US, where software can more easily be patented than Europe. Yahoo is suing Facebook there, claiming that the giant social network – which is preparing an initial public offering on the US stock market – has infringed 10 patents Yahoo has been awarded since it was set up in 1995 relating to advertising, privacy controls and social networking. Facebook was set up in 2004.

At the time, Facebook – which has already passed Yahoo in advertising income and profitability – said Yahoo's actions have been "puzzling".

But for Yahoo, with a new chief executive who is trying to re-establish the company's lost primacy in online advertising, the move against Facebook is logical. And it is the same action that has been done by technology companies for years around Silicon Valley. Although it is almost certain to be concluded with a financial settlement – either a royalty or licensing deal – it shows Facebook's weakness as a young, fast-growing company to the power of patent portfolios. At the end of 2011, Facebook had just 56 US patents, a relatively small number compared with other big tech companies; Yahoo owns more than 1,000. IBM has tens of thousands of active patents.

The essential elements of a patent are that it should be "non-obvious" to a person in the field where it is created, and contain an "inventive step" which makes it work. That doesn't preclude young software companies from creating patentable ideas; but they are often not set up to harness their own creativity effectively in the way that older companies, with legal departments, are.

Young companies are thus frequently a target for patent litigation. In 2002 Google, then an upstart search engine which had only just become the largest online, was sued by Overture, then an independent company, which claimed that the now-famous AdWords system for showing "relevant" text adverts against search results infringed on its patent. Google insisted it hadn't. But in August 2004, with its own IPO looming and Overture now owned by Yahoo, Google licensed exactly those Overture patents and gave Yahoo 2.7m shares to settle the case.

Even for companies which do nothing except software – such as Facebook or Yahoo – patents are still useful, and can be awarded in the US. But Frost points out that the European Patents Office (EPO) interprets patents differently from the US Patents and Trademarks Office. The latter has been criticised for awarding patents too easily, though if they are used in a court case then the defendant can seek to have them re-examined and potentially struck off. In the US, patents can be awarded for software that does little more than provide a different interface.

The key difference, says Frost, is that in Europe a "software" patent must be shown to have a "material effect" - that is, something measurable clearly happens as a result of using it. "It might be a more efficient computer, or a more effective user interface," he says. That makes it unlikely that the Yahoo-Facebook battle will spread from the US to Europe, even though the majority of Facebook's users are outside the US.

Even so, the struggle between the two could be slow to reach a result. The Google-Overture case, which took more than two years to be resolved, was comparatively quick. Another famous software law battle, between SCO Group and IBMbegan in March 2003 with SCO Group claiming $1bn in damages because, it said, IBM had "devalued" its version of the Unix operating system. The case was put on pause in September 2007 when SCO went into bankruptcy; if it ever emerges, the case will begin again.

More broadly, the fact that software can be patented at all is a source of great frustration to some activists, who argue that software is not like a physical invention, and so should not be patentable. While they have had some success – notably in getting the EPO to include the "material effect" clause - the overwhelming weight of commercial acceptance is still that creating software involves work, and that innovative work deserves to be rewarded.

Frost says: "there's a judge's saying relating to copyright, which was that it is the result of 'the sweat of the brow'. There's a feeling with some software patents that people are getting something valuable – a patent – for virtually nothing. But companies like Microsoft, Yahoo and Adobe have developed software which involves the creation of huge amounts of intellectual expenditure. What comes out isn't physical like a mousetrap, but conceptually it is a 'thing'. If it does something, and it's different and better than what's gone before, then the argument is that it deserves to be patented."