Indian Prime Minister Rajiv Gandhi, the country's first prime minister who was not part of India's independence movement, brings to his task a political perspective and impatience with bureaucracy more akin to the modern computer age than the 19th century socialism of his predecessors.

At 40, the Cambridge-educated successor to the mantle of Jahawarlal Nehru and Indira Gandhi is India's youngest prime minister. He arrives in Washington on Tuesday for a visit.

While considerably younger than President Reagan, with whom he meets on Wednesday, Gandhi shares with the American leader a beginning in a field other than that of politics.

A former Indian Airlines pilot who stayed out of politics until four years ago, he appears to take a more pragmatic, hands-on approach to government than his late mother, Indira Gandhi, who was steeped in the socialist economics of her father Jawaharlal Nehru, India's first prime minister.

Gandhi entered politics reluctantly, giving up his pilot's job and quiet life with his Italian wife Sonia and their two children after his younger, more politically ambitious brother, Sanjay, was killed in a stunt plane crash in 1980. Last October's assassination of his mother, Indira Gandhi, thrust him into the leadership of 750 million Indians.

Since then, the soft-spoken Gandhi has moved in the direction of political and economic reform and appears to have inspired popular support for it, Western diplomats and Indian observers have said.

He has reaffirmed India's adherence to socialism but has said the private sector -- backed by new technology -- has the capacity to enhance the productive potential of the economy. He has targeted corruption and streamlined government, and is fond of saying that his administration will be "result-oriented."

As one indication of his new style, Gandhi receives reports on technical questions directly from experts at cabinet meetings rather than having them relayed through ministers. Ministers are being held accountable to produce and are moving out of their offices to make checks in the field, the Indian observers say.

For example, the Gandhi-appointed governor of the Punjab, Arjun Singh, staged surprise midnight checks of security arrangements during last week's threat of violence by Sikh extremists on the anniversary of the storming of the Golden Temple, the holiest shrine of Sikhdom. He awarded $80 -- more than a month's salary -- to a team of police constables who showed unusual vigilance at a key crossroads post.

Born on Aug. 29, 1944, Gandhi grew up in his grandfather's official residence when Nehru was prime minister. He went to the prestigious Doon School in India, followed by two years at the Imperial Scientific and Technical College in London and two years at Cambridge University, where he received a degree in mechanical engineering in 1965. In India, he trained to be a commercial pilot and joined Indian Airlines, where he worked for nearly 10 years.

His visit to Washington, his first as head of state, has been widely anticipated as an opportunity to put relations between the two countries on a new and smoother plane.

After his selection as prime minister, Gandhi was expected by some outsiders to shift India slightly away from its traditional socialist path and friendship with Moscow in favor of policies more amenable to Washington. But a domestic backlash has forced the prime minister to back off slightly from some of his free market economic policies and a paring down of regulations and red tape. On the eve of his trip to Washington, he turned up the anti-American rhetoric by attacking the Reagan administration's Strategic Defense Initiative, commonly called Star Wars, and aid to the contras, or rebels, in Nicaragua.

But despite this recent emphasis on Indian opposition to some of Reagan's favored policies, and Gandhi's visit to the Soviet Union last month, the prime minister also said in Moscow that relations with Washington were "good" and he is expected to use the visit to continue to strengthen Indian-American ties.

While he holds many of the same views as his late mother, Indira Gandhi, he states them in a less strident manner. During a press conference last week, he showed a greater willingness to compromise than previous Indian leaders.

It is too early to tell, however, how well his domestic economic policies will fare. Gandhi has not resolved the problem of the alienation of India's Sikhs from mainstream India and their push for greater autonomy for the Punjab, their home state and the breadbasket of India that lies on its strategic western border with Pakistan. Caste unrest is also growing in the western state of Gujarat.

Since his liberalized budget was presented in mid-March, wholesale prices and the retail cost of staple foods have risen even higher.

Questions are being raised, moreover, on how attuned Gandhi's business school-educated and computer-oriented advisors are to the pace of and problems in rural India, where three-fourths of the Indian people live in conditions more akin to the 19th century.