Protecting the sovereignty of a nation isn't something that happens by itself; countries need to have the machinery and technology to actually defend themselves. Like it or not, that means buying the weapons and services provided by defense companies. With world peace nowhere on the horizon, investors looking for long-term investments will probably like giant defense names such as Lockheed Martin (LMT -0.20%), Northrop Grumman (NOC -0.02%), and General Dynamics (GD -3.97%). Here's a quick look at each company and the subtle but important differences between them.

1. The global giant

Lockheed Martin, with a $95 billion market cap, is one of the largest aerospace and defense companies on the planet. It has four main divisions: aeronautics (about 40% of sales), rotary and mission systems (25%), space (18%), and missiles and fire control (17%). It has its fingers in just about every aspect of the defense sector, playing key roles in major long-term projects like the F-35 Joint Strike Fighter, Patriot Missiles, and Trident II Ballistic Missiles. These are massive government programs that have very long lives, and are just a small sample of the products and services that Lockheed Martin offers. But the really exciting thing here is that they support a nearly $135 billion backlog of work. And that helps create a clear path for future profits.

A military drone flying in the air.

Image source: Getty Images.

To be fair, Lockheed Martin just announced that 2022 would be a relatively weak year, with sales dropping slightly from 2021 levels. There are a number of factors behind that, including moderating defense budget expectations and supply chain constraints, but growth is expected to pick up between 2023 and 2026 as the company adjusts to changing market conditions. This is an opportunity for long-term investors to get into one of the defense industry's biggest names at a reasonable price, noting that the stock's 3.2% dividend yield is near the higher end of its historical yield range. It's price-to-sales ratio, price-to-earnings ratio, price-to-book value ratio, and price-to-cash flow ratio are all below their five-year averages, as well.

2. A little bit of business

General Dynamics is another of the defense industry's big players, with a market cap of $57 billion. Its business spans across four main divisions: technologies (34% of sales), marine systems (27%), aerospace (20%), and combat systems (19%). The company's major projects include the Abrams tank, Electric Boat (which is a key player in running all of the U.S. nuclear submarine shipyards), and providing IT services to the military. The company's backlog is $88 billion. That said, there's a slight twist here because the aerospace division is largely tied to business jets, not military jets. That means that there's a little bit of diversification in the mix away from the defense sector. Notably, General Dynamics experienced the highest order flow in its aerospace division in the third quarter of 2021 since 2008, as companies and individuals avoided traveling on commercial airlines.

The stock's yield is currently around 2.3%, which is toward the high side historically but not quite as compelling as what Lockheed Martin is offering. Its valuation metrics are mixed as well, with price-to-sales roughly in line with its five-year average and price-to-earnings above that longer-term figure. Price-to-cash flow and price-to-book value are both below their five-year averages. It's probably best to consider General Dynamics as fairly priced, but that's not a bad thing if you are looking for a long-term defense stock with a bit of diversification outside of the sector.

LMT Chart

LMT data by YCharts

3. Heavy on space

The last name up is Northrop Grumman, which has a $58 billion market cap. The company's business segments are aeronautics (30% of segment sales), space systems (28%), mission systems (27%), and defense systems (15%). The really interesting division is space, which makes up a bigger piece of the pie than at the other two names on this list. Although Northrop Grumman is hardly alone in supporting the U.S. government's efforts beyond our planet, if you think space is the next frontier it gives you more relative exposure. Note that Russia just tested a system to destroy objects like satellites in space, suggesting that space is likely high on the priority list at the Pentagon. Northrop Grumman's backlog is nearly $75 billion.

The stock's dividend yield is a bit miserly, at just 1.7%. However, its price-to-sales, price-to-earnings, and price-to-book ratios are all below their five-year averages. Price-to-cash flow is the lone ratio that's above its longer-term average. It's perhaps not as attractive as Lockheed Martin valuation wise, but it looks as if Northrop Grumman is at least reasonably priced. That's especially true if you want exposure to U.S. space efforts. 

Buy and hold

These defense sector names aren't stocks you should use to time the market. They are industry giants that have entrenched themselves in the U.S. government's defense efforts and they would be difficult to unseat. They are long-term holdings that will ebb and flow over time, but should be solid investments -- so long as world peace doesn't suddenly break out.

Lockheed Martin is the value play, although 2022 could be a tough year. General Dynamics offers a mix of military exposure with some commercial aerospace for diversification. And Northrop Grumman gets a material amount of revenue from its space division, which is likely to be an increasingly important defense niche.