As far as the official records of Southern California's 27th Congressional District are concerned, it was 106,342 local folks, pure and simple, who elected conservative Republican Robert K. Dornan to a third term. They, after all, cast the ballots that give him a comfortable 4-point margin over liberal Democratic challenger Carey Peck.

But there's a question whether it wasn't nonresidents ineligible to vote in the 27th -- even people clear across the continent -- who decisively shaped the outcome.

Dornan spent $1,806,063, a record for a House race. His receipts were almost as great -- $1,796,100. The figures are for the nearly complete 1979-80 election cycle ended last Nov. 24.

And almost all of Dornan's money came from outside his district.

"He certainly raised less than $100,000 from within the district," Arnold Steinberg, has campaign consultant, told a reporter.

The $100,000 -- 1/18th of Dorman's receipts -- came from only 2,000 to 3,000 in-district contributors, Steinberg estimated. The balance came from about 33,000 contributors in all 50 states.

The contributors were solicited in mass mailings from the suburbs of Washington, and until early this year, they mailed their checks back to the same suburbs.

Peck sent $503,550, bringing the total for the two candidates to $2.3 million. That's an all-time high for combined spending in a House race. It's more than double the 1976 record, which was also set in the 27th by Dorman ($403,675) and Gary Familian, the Democrat he defeated ($637,080). This time, Dornan spent $765,308 more than he and Familian spent together four years ago.

Steinberg made another surprising point: Peck had even fewer in-district contributors than Dorman's 2,000 to 3,000. Peck said the half-million dollars he raised -- more than was gathered by most House candidates -- came largely from nondistrict contributors, even if they were proportionately fewer than Dornan's.

Some who gave substantial sums were celebrities solicited by his actor father, Gregory Peck, who lives a mile outside the district. By contrast, the average check to Dornan was for $17, Steinberg said.

The 27th, an electorally diverse, thin coastal strip with a northern boundary that misses President Reagan's home by a block, runs south from Pacific Palisades to Palos Verdes. It includes a string of beach towns that used to be heavily Republican because of the conservatism of elderly migrants from the Midwest.

"But morality and mobility have produced a sharp shift in recent years," according to the Almanac of American Politics. "The beach towns have filled up with young people -- singles, surfers, freaks . . . ."

Strikingly, both Peck and Steinberg, in separate telephone interviews with The Washington Post, were dismayed about the extent of outside involvement. Dornan was out of the country and unreachable.

Peck worried about the "distortion of the process" caused by heavy outside funding. It makes local residents "feel very cynical . . . makes people want to throw up their hands and walk away," partly because they sense that the focus on their needs is "in real danger of being lost," he said.

Steinberg said, "If I could make a wish, it would be to wish away all of his [Dornan's] out-of-district money and all of Peck's out-of-district money." Although he agrees with Peck's concern about the possibility of the 27th and its 464,000 residents being subordinated, he also was being pragmatic: Dornan proved that he could raise "much more" money within the 27th than Peck could. The "much more," although less than $100,000, probably exceeded the in-district receipts of most people in Congress, he said.

The million-dollar mark had been topped before, in 1978, when Carter Burden spent $1,136,112 in a New York City district -- and then lost by six votes.

Also in 1978, Peck, making his first run against Dornan, outspent him, $308,017 to $291,762 but lost by 51 to 49 percent. Peck, in showing that he could raise such a large sum, inadvertently signaled Dornan to start early to raise cash -- lots of it -- for 1980.

Dornan, an energetic former right-wing television commentator who doesn't rely on fat cats, retained the right-wing fund-raising organization of Richard A. Viguerie of Falls Church. Ultimately, out of the $1.8 million, about $1 million went to Viguerie, according to Steinberg. That was mainly money spent to raise money, as distinguished from money spent to get votes.

Direct mail solicitations -- going eventually to well over 1 million people -- began in August or September of 1979, he recalled. The mailings were of the type known as "prospecting," i.e., letters to persons known to hold views making them reasonably likely to support a candidacy such as Dornan's, even though they had never given to him.

The early receipts financed further prospecting, and the 2 to 3 percent who gave were entered in lists of "house names" -- persons who might contribute again if periodically solicited thereafter.

"If Dornan had to run today, he could run with just the house names lists and do enormously well," Steinberg said.

The contribution checks went to a Viguerie "caging function" here for processing. Peck protested, charging that Dornan's campaign was "run out of Falls Church." Recognizing that "Peck's got a point," Steinberg said he had felt that the return envelopes should have been pre-addressed to a Post Office box in the district. He prevailed early this year, and the caging chore was moved to Santa Monica. CAPTION: Picture, Republican Robert K. Dornan spent $1,806,063 to beat Democrat Carey Peck in '80. By Vanessa Barnes-Hillian -- The Washington Post