A jump in oil imports widened the nation's trade deficit last month, but the year as a whole still showed an improvement over 1979, the Commerce Department said yesterday.

The trade gap rose to $2.98 billion after seasonal adjustment in December, from $1.66 billion the previous month. Oil imports leaped by $1.4 billion as a result of both price and volume increases.

But "December's high deficit should not be allowed to disguise the fact that the U.S. deficit in merchandise trade was reduced by $5 billion from 1979 to 1980," new Commerce Secretary Malcolm Baldrige said yesterday.

Last year's improvement in the trade balance left a deficit for 1980 of $32.3 billion. The overall current account -- which includes services, royalties and other "invisibles" -- was probably in surplus for the year, Baldrige said, although the final figures are not yet available.

Oil imports are fairly erratic from month to month, and it is possible that some of the December rise will be reversed. Shipments rose from 172 million barrels costing $5.7 billlion in November to 209 million barrels costing $7.2 billion last month. A Commerce Department economist said he could give no clear reason for the jump, but he speculated that oil companies had increased imports "in an attempt to beat a price increase."

During 1980 sharp rises in oil prices led to a $17.8 billion increase in payments for imported oil, despite a drop in the volume of oil imports of more than one-fifth. Higher prices contributed to a 16 percent rise in imports in the year as a whole to $252.8 billion. But exports rose by 21 percent to $220.5 billion in the year.

This rise "was paced by a dramatic increase in exports of manufactured goods," Baldrige said. He pointed out that manufactured trade improved from a deficit of $2.2 billion in 1979 to a $12.5 billion surplus last year. "This is due in part to the increased exporting efforts of U.S. industries in world markets," he said but added that "this favorable performance must not cause us to relax our efforts to maintain a strong competitive position in the future."

In December exports rose by 2.6 percent to $19 billion, while imports in total went up by 8.9 percent to reach $22 billion. For the four-month period from September to December, exports were up by 3 percent on average from the preceding four months. Imports averaged $20.9 billion, a rise of about 1 percent on average from the May-to-August period.

The agricultural trade balance improved last month from $2.2 billion to $2.6 billion with export rises for most goods, particularly wheat and soybeans. $2For the year agricultural products showed a surplus of $23 billion.

Manufactured exports rose by $125 million last month, while imports jumped by $426 million. The surplus for the month was just over $1 billion, compared with $1.4 billion in November.