A U.S. District Court judge yesterday formally approved an agreement between Lorton Reformatory inmates and District of Columbia officials to reduce overcrowding and improve conditions at Lorton's central facility.

The agreement between city officials and lawyers representing the inmates in the long-running lawsuit was reached in principle earlier this week. It was approved formally by Judge June L. Green and filed yesterday in the federal court.

Under the terms of the agreement, the city is committed to reducing within 90 days the number of inmates held at Lorton's central or medium-security facility to its rated capacity of about 1,100. That would be a reduction of about 300 inmates from its current population, corrections officials estimated.

The city agreed that if the population in the central facility is not reduced to that figure within 90 days, the city would pay $1,000 a day in penalties for the first 30 days it is not in compliance, $5,000 a day for the next 60 days and $10,000 for every day after that.

The agreement, which applies only to Lorton's central facility and not to other facilities at the complex, also called for the city to adhere to a specific timetable for completing more than 20 other specific improvements in security and living conditions for the inmates or pay up to $250 a day in fines for every day that it fails to meet the deadlines for each item.

Those improvements include the installing metal detectors and security lighting, spending more money on training facilities, constructing new cells and improving plumbing, ventilation and lighting in existing cells, and insuring that sufficient guards are working at the facility at all times.

The city also agreed that if it is not in substantial compliance with the terms of the agreement by January 1984, a special court-appointed master would take over administration of the facility to make sure the improvements were made.

The overall population at Lorton soared last month after corrections officials, faced with disturbances at the D.C. Jail, moved some 450 jail inmates to Lorton.

City officials, citing expanded use of job programs to speed parole for Lorton inmates, continued expansion of Lorton facilities and other measures to reduce overcrowding, have said they believed they would be able to meet the deadlines in the agreement.