The U.S. trade deficit narrowed in the second quarter of this year to a seasonally adjusted $7.77 billion, according to figures released by the Commerce Department yesterday.

The trade deficit totaled $10.88 billion in the first three months of the year, the Commerce Department reported.

The original estimates for the firstquarter trade gap were considerably larger at $12.22 billion. All the figures are on a balance-of-payments basis. The Census Bureau also collates trade figure, but on a slightly different basis.

The improvement between the first andsecond quarters of the year is even more marked on the census figures. These show the deficit shrinking from $10.08 billion in the first three monthsof the year to $4.94 billion in the second quarter.

The improvement was because of "a reduction in the physical volume of imports of some importance" and pretty good growth of manufactured exports." said Courtenay M. Slater, chief economist at Commerce.

Yesterday's report confirmed the trend shown by the monthly trade figures published last week. The first trade figures published include the import cost of insurance and freight, so the trade deficit looks large. The second set differs from yesterday's balance-of-payments basis because of some adjustments for private gold transactions, a different treatment of military sales and adjustment forunder estimating U.S. exports to Canada.

The recession has helped improve the balance of trade by reducing demand for imports. Although the worst of theeconomic slowdown is probably now over "we will continue to see the impactof recession" on the trade balance later this year, said Slator.

She added that the U.S. share of world trade is likely to increase a little more this year. However the trade deficit for the year as a whole is expected to be somewhat larger than lastyear's $29.47 billion deficit.

For the first six months of this year the deficit was running at an annual rate of $37.29 billion, on a balance-of-payments basis. But this was swelled by the bad first-quarter performance. The gap for the year as a whole is forecast to be smaller.

Reduction in oil imports has been a major factor in narrowing the trade gap.

Slator commented that "substantial progress in reducing oil imports" this year has led the Commerce Department to lower slightly its estimate of this year has led the Commerce Department ot lower slightly its estimate of this year's likely deficit.

In the second quarter imports droppedby 4.8 percent to $62.46 billion. This compares with a rise of 10.3 percent, to $65.58 billion, in the first three months of the year.

Imports of petroleum dropped by 12 percent in volume terms between the first and second quarters, to reach 7.44million barrels a day. The average price of oil rose by 10 percent.

Exports slipped by less than 0.1 percent overall in the second quarter, to $54.69 billion. During the first threemonths of the year they rose by 8.9 percent.

The second-quarter deficit was about the same as that third quarter of 1979, Slater said, and was smaller than the fourth-quarter gap of $9.23 billion.