A study of 5.1 million workers who lost long-term jobs because of plant shutdowns and industrial shifts between 1979 and 1984 shows that 3.1 million had jobs in January 1984, the Labor Department reported yesterday.

Another 1.3 million were looking for work, and 700,000 had left the labor force. About half of those no longer seeking work were 55 and older, and many might have retired anyway, said Paul Flaim, who directed the study for the Bureau of Labor Statistics.

The study is the first comprehensive survey of what happens to workers who are displaced because a company shut down, abolished a division or work shift, or moved.

It showed that black, Hispanic, female and older workers were the most likely to remain unemployed, that the heaviest concentrations of displaced workers were in the industrial Midwest and Middle Atlantic states, and that many of those who did get new jobs reported lower earnings.

A displaced long-term worker, as defined in the study, was one who had lost a job that he or she had held for at least three years because of the shutdown or relocation of a plant or company, slack work or the abolition of a position or shift.

The study found there were 5.1 million such workers aged 20 and over, and that half had lost the job because a company or plant closed or moved. About half the lost jobs were in manufacturing, particularly metals, autos, machinery and transportation equipment.

The study found that in January 1984, when a special survey was conducted by the Census Bureau for the Labor Department as part of the monthly Current Population Survey, 3.1 million of the 5.1 million workers had new jobs. But of these, 360,000 who had formerly held full-time positions now were working part-time.

The survey said that of about 2 million who got new jobs, about 55 percent were earning at least as much in January 1984 as in their previous jobs, while 45 percent were making less.

The survey showed that 63.6 percent of male displaced workers were employed in January 1984, compared with 53.4 percent of female workers.

It also showed that 62.6 percent of white displaced workers were in new jobs, compared with 41.8 percent of black and 52.2 percent of Hispanic workers.

New jobs were obtained by about two-thirds of the workers from 20 to 54 years old, 40.8 percent of workers 55 to 64, and 21 percent of those 65 and over.

About 42 percent of those who previously had worked as laborers, helpers and equipment cleaners had new jobs by the time of the survey. But about three-quarters of those who previously had managerial jobs or worked in professional specialties had obtained new positions.

The study said that not all of the displaced workers who were not employed in January 1984 had been continuously jobless since first losing their jobs; some had found new jobs, only to have lost them again by January 1984.