The Japanese saw their first train in 1854 when Commodore Matthew C. Perry of the U.S. Navy arrived in Japan with a working scale model of a steam train as a gift for the ruling Shogun.

Now, 127 years later, the Japanese have come to the United States bearing a rail gift of their own: an offer to help the United States build a high-speed passenger railway using Japan's sophisticated Shinkansen "Bullet Train" technology.

Since its first route opened in Japan in 1964, the Japanese National Railways' Shinkansen, traveling at an average speed of about 100 miles an hour, has carried, at a profit, almost 1.7 billion passengers on the 664-mile line between Tokyo and Hakata, with an unbroken safety record. Two more route segments extending another 456 miles will be completed next year.

A delegation of 10 members of the Japanese Diet join 15 congressmen and senators today for the inaugural meeting of the Japan-United States Rail Congress, an organization created primarily to promote the development of a high-speed American rail system.

The Japanese legislators began their visit yesterday with testimony to the Joint Economic Committee on the development and operations of the successful Shinkansen and on how its technology might be transferred to the United States.

Mitsuki Kato, director of Japan's House Committee on Transportation, told the hearing that a few weeks ago a team of engineers from Japan arrived in Los Angeles to begin a study on the feasibility, potential profitability and effect of a high-speed railway between Los Angeles and San Diego.

Working at the invitation of Amtrak President Alan Boyd, the team will also look at other potential bullet-train routes, including Miami-Orlando-Tampa, Dallas-Houston-San Antonio and one radiating out from Chicago.

"If such a system proves feasible and is actually constructed, we are confident that our 17 years of actual experience in building and operating high-speed railways will enable us to help Amtrak realize a high-speed rail system that will provide excellent service well into the 21st century," Kato said.

The teams of experts who will conduct the engineering feasibility studies of various rail corridors for potential high-speed rail here are being funded by a grant of up to $5 million from Riochi Sasagawa, a Japanese philanthropist and chairman of the Japan Shipbuilding Industries Foundation, according to Lawrence D. Gilson, Amtrak's vice president for corporate development. Gilson said the money has been made available to a technical unit of the Japanese National Railways, which sends the experts here.

Kato yesterday said that the Shinkansen's daily average ridership is 340,000 passengers and on peak days the system carries about 800,000. Although the Japanese National Railways overall has been losing money, the Shinkansen is profitable, contributing $1.35 billion in profit last year, he said.

The 664 miles of route already in operation cost $5.9 billion at the time of construction. With inflation, he added, "I doubt if this could be done today for twice that amount."

Although the cost of building high-speed passenger trains here would run into billions of dollars--and the Reagan Administration has been seeking to reduce the federal role in railroad funding--members of Congress who appeared before the committee yesterday appeared optimistic.

Rep. Edward R. Madigan (R-Ill.), ranking minority member of the House Transportation Subcommittee, said that high-speed rail transportation could play a practical and significant role in U.S. transportation policy. "This is not just a nostalgia thing with me," he said.