Martin Marietta Corp. announced a $406 million capital expansion program yesterday for 1980, the largest such investment the diversified aerospace firm has undertaken.

About $100 million of the funds will go to maintain and upgrade existing facilities. But most of the remaining $300 million will be used for a variety of expansion projects, including construction of a $125 million addition to an aluminum smelting plant at Goldendale, Wash.

Martin Marietta also said it would begin construction of an $85 million cement plant in Leemington, Utah, that will have a 650,000-ton annual capacity.

The company also is allocating more than $50 million to expand its aerospace business, which the company predicted would top $1 billion in sales next year.

In a letter to stockholders, J. Donald Rauth, the company's chairman, said the aerospace part of the firm is diversifying into new weapons systems so Martin Marietta can reduce its "vulnerability to adverse effects of program cancellations or stretchouts."

Rauth also said that in the next four years the company also will allocate an additional $1 billion for capital expenses.

For the five years ending in 1979, Martin Marietta had a total capital investment of $816 million. The largest single previous allocation was $310 million in 1979.

Rauth noted that the company's growth prospects "are quite substantial" and pointed out that Martin Marietta's "future earnings growth might not occur on a steadily rising curve" but "could be affected by economic considerations beyond industry's control."

Rauth's letter stressed the importance of the company's expansion in the aluminum business. The expansion at the Goldendale facility, combined with the 1980 opening of an aluminum recycling plant in Kentucky, will increase its capacity for metal production by almost 74 percent, he said.

Rauth also emphasized that the national economic picture will shape the direction of Martin Marietta's businesses. At the same time, however, the aerospace industry "reacts primarily to national requirements for defense and space systems. The strength of our aerospace business then, should provide a buffering effect to some extent if our other businesses are slowed down by recession," Rauth wrote.

But Rauth also said that Martin Marietta "will build confidently . . . believing that the long-term profitability trend lines will be rising."