Showing unexpected and not wholly welcome strength, the economy recovered in the third quarter all of the ground lost in last spring's slump, the Commerce Department reported yesterday.

The news did not particularly please either the Carter administration or the Federal Reserve, both of which are trying to cool off economic activity to slow down inflation.

The Fed, because of the continued strength in the economy and a surge in the money supply, helped yesterday to push short-term interest rates to new highs. In the process, the stock market went tumbling again.

The Dow-Jones Industrials fell 15.44 points to close at 814.68, the lowest level since Fed. 28. Since the Fed announced a series of major credit-tightening moves Oct. 6, the market has dropped 82.93 points, more than 9 percent.

The Commerce Department said the output of goods and services grew at a 2.4 percent annual rate in the third quarter after adjustment for inflation, fully reversing the 2.3 percent drop in the second quarter.

The GNP fixed-weight price index rose at an annual rate of 9.6 percent in the quarter, up slightly from the 9.5 percent rate in the previous three months. This number is lower than the 13 percent rate of increase in the consumer price index because, among other reasons, the GNP figures do not include price changes for imported products.

With inflation remaining high and interest rates hitting new peaks, most economists believe the economy will resume its decline shortly.

Moreover, the third-quarter gain in GNP is unlikely to be repeated, analysts said. That gain came almost entirely from personal consumption spending by individuals, which rose sharply in the quarter. But it did so only because consumers were willing to lower their savings rate to 4.1 percent of their disposable income.

That was the lowest savings rate since consumers went on a buying spree early in 1951 out of a fear that rationing would be imposed during the Korean war. The rate in the second quarter was 5.4 percent, low by historical standards.

In real terms, most other parts of the economy rose little or declined in the quarter, a pattern likely to be repeated this quarter. Therefore, if consumers revert to a large drop in GNP could be reported for the final three months of the year.

Forecasters generally expect the recession to last until spring, with unemployment, 5.8 percent in September, rising to the neighborhood of 8 percent sometime in 1980.

If the declines are as large as expected, there will be no doubt about whether the economy is in a recession. If the large "plus" now recorded for the third quarter survives the Commerce Department's regular revisions, it may lead to extended debates about the recession's starting date, however.

The Fed, still acting in response to current statistics rather than the predicted downturn, acted decisively late Thursday to extract about $1 billion in ready cash from the banking system, analysts said.

Financial markets reacted yesterday by sending several key interest rates higher. The federal funds rate -- the rate banks charge one another on loans of reserves -- rose to a range of 16 percent to 17 percent, up from the 11 percent to 14 percent range at which such loans had been offered for most of the last two weeks.

Several banks also raised the rate they charge on loans to brokers from 14 1/2 to 15 percent. Usually such a change is a precursor to an increase in a bank's prime rate. The prime is now generally at 14 1/2 percent.

Former Treasury Secretary W. Michael Blumenthal, speaking yesterday in Toronto, said the prime rate could rise to "15 1/2 percent or 16 percent before it is over."

Since the Fedeal Reserve two weeks ago changed its methods of operation in trying to hit its targets for money supply growth, financial markets have been in turmoil. Analysts are far more uncertain of Fed intentions since it abandoned its practice of seeking to control the money supply by pegging the federal funds rate.

But whether it is uncertainty or the actual demand for money, interest rates are now levels that mean that housing construction and business investment spending for plants, equipment and inventories are likely to be reduced.

Nor is the economy going to get much push from spending by either the federal goverment or state and local governments. In the third quarter, after adjustment for inflation, outlays by all levels of government were running below their year-earlier totals.

"Consumers decided to go out and spend everything they had in September," observed Washington economist Michael Evans. "Part of this was due to shopping excursions which were delayed from the days of the gasoline lines. Most of it, however, reflected a worsening of inflationary expectations and an unwillingness by consumers to see the purchasing power of their liquid assets disintegrate."

In other words, people went out and bought before prices went up.

Evans expects real GNP to drop at a 6 percent annual rate this quarter and next, somewhat more than most other forecasters expect.

Meanwhile, Agriculture Secretary Bob Bergland told a meeting of the American Society of Agricultural Consultants that farmers who produce corn and other feed grains would not have to leave any of their land idle next year to qualify for federal price support programs.

Wheat farmers were told the same thing earlier, so farmers next year will be free to go all-out on production.