The world is not a safe place, and the sovereignty of a country is not a given. It must be defended, sometimes with force. One way to ensure that is building and supporting a strong defensive capability. Military spending, whether viewed in a positive light or a negative one, is considered by most people to be a necessity for any country that wants to remain, well, a country.

That's what makes industry giants Lockheed Martin (LMT 0.29%) and Raytheon Technologies (RTX -0.06%) worthwhile options for long-term investors interested in the defense space, even as they both reported weak third-quarter 2021 sales numbers. Here's why these two defense stocks are worth buying and holding in 2021 and beyond.

Missiles lined up.

Image source: Getty Images.

1. Lockheed Martin: The "giantest" giant

Lockheed Martin has long dominated the military-industrial space. It has an incredibly diverse business, including aeronautics (about 40% of sales), rotary and mission systems (25%), space (nearly 19%), and missiles and fire control (the remainder). The company has its fingers in some of the biggest and most important long-term military contracts around, including the F-35 Joint Strike Fighter and the Patriot missile system. These types of programs provide a solid foundation for long-term revenue, even if the company's top line can wax and wane over shorter periods. It largely works for just the U.S. government (74% of sales) and its allies (25%).

The key here, however, is that with a massive $90 billion market cap, Lockheed Martin has a scale and reach that would be hard for smaller competitors to match. So it can take on big programs, thanks to both its size and long-term relationships, and outsource bits and pieces to smaller players. And if those smaller players become important enough, it has the resources to step in and buy them. Generally speaking, this is how the military-industrial complex works, with a small number of very large and diversified companies using bolt-on acquisitions to maintain their leadership positions over time. 

Lockheed Martin also looks fairly cheap today, with its current price-to-earnings ratio at around 13 times versus a five-year average of 21 times. The same trend holds for the company's price-to-sales ratio, which sits at roughly 1.4 times versus a five-year average of about 1.75 times. The dividend yield is about 3.3%, which is about two and half times what you would get from an S&P 500 Index fund. And the dividend has been increased annually for 19 consecutive years.

In an industry where size is important, Lockheed Martin is the type of company that you buy and hold, even when the business looks like it's facing some strains. And given that the stock appears historically cheap today, it looks like it could be a great time to step aboard.

2. Raytheon Technologies: Military and more

Raytheon Technologies, with a market cap of $137 billion, is actually bigger than Lockheed Martin. It was created via the merger of Raytheon, long a major player in the military space, and United Technologies, which had a much more diverse business. Some of United Technologies' operations were subsequently spun off to help streamline the combined company's operations. Today Raytheon Technologies breaks its business down into segments like Collins Aerospace (27% of segment sales), Pratt & Whitney (about 26%), Raytheon Intelligence & Space (roughly 23%), and Raytheon Missiles & Defense (the remainder). 

LMT Market Cap Chart

LMT Market Cap data by YCharts

The notable thing here is that only about 45% or so of its top line is from the U.S. government. The rest comes from the business community, including aviation giants like Boeing and Airbus. So it's a big player in the military space, but also a major name in the commercial aviation sphere, as well. That diversification helps to balance out the company's risks, but also means that it doesn't have quite the same reach as Lockheed Martin in the defense space. Still, for investors that might not want to focus so tightly on serving just Uncle Sam, it could be a good alternative, and still benefits from being one of the largest military contractors.

The merger of Raytheon and United Technologies was only completed in 2020, so there are still a number of moving parts here. Thus, the P/E and P/S ratios aren't necessarily good indications of valuation today. The dividend yield, at 2.2%, is also historically low. It would be hard to call Raytheon Technologies cheap. However, given its industry strength in the military and consumer areas, it is probably worth paying up for this diversified giant for long-term investors seeking out some defense exposure. Notably, the consumer side of the business should give the company more of a growth orientation than what you'd get from a purer military name like Lockheed Martin.

Go with the giants

The defense industry is driven by the industry's biggest names, and that includes Lockheed Martin and Raytheon Technologies. Lockheed is the pure play and looks historically cheap right now. Raytheon Technologies has notably broadened its business beyond the military space via a major acquisition, but that should probably give it more growth appeal. If you are looking to add some defense exposure to your portfolio, either one would be a good fit.