In a $27.4 million transaction between two of Washington's biggest businesses, Fairchild Industries Inc. yesterday agreed to purchase Martin Marietta Corp.'s interest in Bunker Ramo Corp. of Oak Brook, Ill.

Faircheld said it would pay $23.50 cash for 1,166.667 shares of Bunker Ramo -- 20.6 percent of the firm's common stock -- and "desires to explore the possibility of a mutually beneficial business combination with Bunker Ramo."

The Martin Marietta block is the largest single holding of Bunker Ramo shares, said James Wilson, vice presidint and treasurer of Fairchild Industries.

Martin Marietta had been seeking for some time to sell its interest in Bunker Ramo, and last September announced an agreement in principle to sell the stok to U.S. Filter Corp. That agreement was terminated by mutual consent late year.

Wilson said the acquisition and potential merger reflected Fairchild's desire to broaden the base of its business.

Bunker Ramo had sales of $341 million in fiscal 1977 and profits of $10.3 million. Its three principal lines of business are electrical lines information systems and deep-pile fabrics.

Bunker Ramo's computerized information systems operation links are compatable with Fairchild's communecations and data transmission buseness, Wilson noted.

The link between Fairchild and Bunker Ramo was Fairchild's chairman and chief executive, Edward G. Uhl, who has been a Bunker board member.

Also on the Bunker board -- and expected to eemain there -- are Joseph E. Muckley, a Martin Marietta board member, and George M. Bunker, retired chairman of Martin Marieta.

Bunker, the chairman of Bunker Ramo, founded the company in 1964 as a joint spinoff from Martin Marietta and Thomson Ramo Wooldridge Inc., which is now snown as TRW Inc.

The purchase of Martin Marietta's stock by Fairchild cannot be complete until the transaction receives the approval of federal antitrust and securities officials.

In their joint annpuncement of the sale, Fairchild and Bunkert Ramo said the agreement provides that for three years Fairchild will not increase its ownership of Bunker Ramo of dispose of its stock without Bunker Ramo's consent, except through a public offering or a broker transaction permitted by Securities and Exchange Commission rules.

The announcement said Fairchile has not discussed terms of a possible merger.

The $23.50 price to be paid by Fairchild for the Bunker Ramo shares represents about a 30 percent premium over the $18 price at which the shares have traded recently on the New York Stock Exchange.

Wilson said the purchase of the stock by Fairchild is not expected to produce an immediate change in Bunker Ramo's management or operations.

Fairchild Industries, which has its headquarters in Germantown, reported earnings of $17.24 million ($3.61 a share) for the first nine months of 1978, more than double the $6 million ($1.29) earned in the same period in 1977. Sales for the nine months were $383 million, up from $287 million.

Martin Marietta earned $102 million ($4.03 per share) last year on revenues of $1.44 billion.