In the summer of 1981 the bidding for the best thoroughbred yearlings started to go absolutely wild.

Prices had been rising steadily for years, of course, but they made a quantum leap when Arabs entered the market and challenged the domination of Robert Sangster and his British associates. Two colts were sold for more than $3 million--shattering the old record of $1.7 million. Twenty-one yearlings cost $750,000 or more.

That was only the beginning of a trend. At the 1982 auctions, almost all the records of the previous year fell. The sales this summer in Lexington and Saratoga will almost surely set more records and evoke more incredulity. When they are over, people will be asking as usual: Why would a buyer pay millions of dollars for a 1-year-old horse who has never seen a racetrack? How could this possibly be a sound investment?

People ask these questions often but seldom get proper answers because the results are so hard to obtain. The horses sold at auction will be scattered from Arcadia, Calif., to Chantilly, France; some will seem to disappear completely. They won't prove themselves for two or three years. Moreover, it is difficult to measure the value of the successful horses, because their winnings on the track may be inconsequential compared with what they can earn at stud.

The Washington Post asked the industry newsletter Racing Update to help trace the horses who were sold in 1981 and estimate their present worth to judge just what sort of an investment high-priced yearlings are. Despite all the ambiguities involved in such an analysis, the answer was unequivocal.

John Finney, who runs the Saratoga Yearling Sales, once said that buying expensive yearlings was like drilling for oil. If you drill one hole, he said, you can go boom or bust. But if you drill all the oil wells in Texas, you'll be a rich man. He was right.

Of the 21 yearlings who sold for $750,000 or more in 1981, only five have won stakes and three others have shown stakes-caliber ability. These successful horses, however, have more than compensated for the failures. The 21 yearlings cost a total of $36,850,000. Mike Brown, managing editor of Racing Update, conservatively estimates the present value of the eight successful horses at $57 million. The horses who flopped on the track still retain some value because of their regal pedigrees, so the current worth of those 21 animals may be somewhere around $70 million. Even at the prices that seemed astonishing two summers ago, they were cheap.

Shareef Dancer, who sold for $3.3 million at Keeneland, won the Irish Derby for Sheik Maktoum al Maktoum. Brown estimates the colt's value at $15 million. The most expensive yearling, the $3.5 million Ballydoyle, has won only one minor race, but owner Sangster isn't grieving. In 1981 he also bought Danzatore, the Irish 2-year-old champion last season; Solford, the unbeaten winner of the prestigious Eclipse Stakes in England, and Caerleon, the winner of the French Derby. Each of them is now worth more than $10 million.

The high-priced yearlings of 1981 who went from the American sales to Europe were far more successful than the ones who stayed at home--possibly because so many are descendants of Northern Dancer, who ran well on grass. Of the seven horses who raced in this country, the only star is Sabin, a brilliant grass-running 3-year-old filly.

The performance of the sales graduates of 1981 is no fluke. The horses who were sold in 1980 had a similarly impressive record. This is a great change from the 1960s and most of the 1970s, when high-priced yearlings seemed to flop with amazing regularity. But what has changed?

For one thing, the people buying expensive horses now have turned this risky business into as much of a science as possible; the days are gone when a yearling could sell for a record price because one buyer had too much to drink at the Keeneland bar. "The presale evaluation is much more intensive than it used to be," said Ted Bassett, president of Keeneland. "People come to Kentucky as early as May to see the yearlings on the farm. There's more in-depth computer analysis of pedigree. Sangster has a whole coterie of advisers; he brings his own vet from Ireland to inspect the yearlings. And the people who buy the yearlings are taking greater care to see that they are placed with experienced, successful trainers."

Not only are the modern-day buyers more sagacious, but also the horses they are buying are more reliable--thanks to the genes of a stallion in Chesapeake City, Md. People who paid record prices in the past for the offspring of Secretariat or Sea-Bird were engaged in wishful thinking. But those who are paying millions for the progeny of the great Northern Dancer and his sons, Nijinsky and Lyphard, are dealing with proven commodities.

These stallions beget a remarkable percentage of stakes horses. In fact, of the five high-priced 1981 yearlings who have won stakes, two are by Northern Dancer, two by Nijinsky, and one by Lyphard. The reliability of these sires is making the business of buying expensive yearlings--which once looked like the riskiest gamble in the world--look almost safe and easy.