Surveying his box supper of a tuna fish sandwich, chewy fruit bar and a package of dried apple bits, the passenger on the Allegheny Airlines flight from Washington to Toronto turned to his seatmate. "I know they call this Agony Airlines," he said resignedly, "but the way I figure it, it must be safe because any airline that serves food like this must spend all its money on equipment and maintenance."

Of such stuff are images made, especially when the medium is the message, but Washington-based Allegheny Airlines, which officially becomes USAir on Oct. 28, is wagering $3 million on the belief that the most basic message is contained in the most basic medium -- the company name. Box suppers aside.

Shapespeare may have asked "What's in a name?" but an advertising executive wouldn't. Remember back in the '50s when Ford hired distinguished poet Marianne Moore to create a name for its new car, then junked poetic suggestions in favor of Henry's brother Edsel?

Five years ago, in fact, "extensive market research" -- the Science of the '70s -- revealed that the public thought that Allegheny was the name of a small commuter airline in the Northeast, a perception that continued despite the company's growth to the sixth largest passenger carrier in the U.S., serving more than 100 cities, and ninth largest in the world. With the Airline Deregulation Act of 1978, the company expanded its service to Texas, Florida, Alabama and Arizona and hopes, says Jack Bell, the company's vice president for longrange planning, to expand further "as facilities and fuel become available." Yet a veteran traveler on that Washington to Toronto route was amazed to learn recently that the company's headquarters are in Washington: "I always thought it was in Pittsburgh," he said. "I mean . . . Allegheny . . . Pittsburgh . . . makes sense, doesn't it?" And Pittsburgh, after all, is not the nation's sexiest city.

In addition to the regional implications of the old name, there was, of course, the epithet. No one knows quite how, or why, Allegheny became Agony. As far as I can tell, it is your basic airline: the standard equipment, nothing luxurious -- no first-class accommodations, no 747s or DC-10s -- just a reasonable way to get from one place to another. But you can hardlyfly on any of Allegheny's jets without hearing at least one passenger mutter "Agony." Just think of it . . . Agony . . . the implication, not of mild, occasional discomfort, but of excruciating pain, bone-crushing disaster. And the butt of jokes:

Question: "How many people does it take to run Agony Airlines?"

Answer: "Three. One to guide the plane, one to spin the propellers and one to hold the air sickness bags."

It was difficult to take a company called "Agony" seriously, unless, of course, you were one of the company's executives, paid to ponder the relationship of image to money. But changing the name of a company that employs 9,000 people and takes in more than half a billion dollars a year is no small matter. In the old days J. P. Morgan would have plucked a name from the air and the change would have been accomplished, but in a graphics-oriented, image -oriented Age of Advertising, things are not so simple. The process by which Allegheny became USAir is a fascinating bit of Corporate Americana unequaled since Esso became Exxon.

First, names had to be tested for public perception -- a process beginning in 1974 that involved bringing together business travelers and pleasure travelers in several key cities to determine what name best conveyed the "national carrier" image the company wanted. USAir consistently came out ahead of the second choice of Sentry Airlines, a name that sounds a little frightening, as though the plane might be called in midflight to intercept a Soviet MIG, and way ahead of such propsosed names as US Skylines, Airmerica, Air Liberty and Union Air. Then the legality of the name had to be researched to be sure that no like-minded company had already claimed it. Even after registering USAir with the Civil Aeronautics Board in 1975, Allegheny had to expand further, according to Bell, "in order to give credibility to the name" and to upgrade the airline's visual appearance with a new design scheme, a process which involved the same kind of extensive research and testing as the name selection

By 1978 further name testing and company expansion "made the time seem right," but the problems were still to come. Implementing the change meant seeing that the new USAir logo appears on the following: 17,00 signs in 53 airports; 17,400 validation cars; 2,300 telephone listings: 9,200 personnsel IDcards (with new photos); 2,446 flight crew wings anc cap devices; 1,319 flight attendant wings; 9,200 employe service pins; 8,746 new seat pocket emergency cards; 4,000 names on ground equipment; 368 aircraft names (four per plane); and thousands of other items from ceramic casserole dishes to kennel stickers.

First, of course, all those items had to located and inventoried and measured and all that information coordinated before anyone could even begin to think about how the various changes were to be accomplished. Among other problems were color standardization -- being sure that the three shades of red in the USAir logo would be exactly the same whether reproduced on plastic or fabric or paper or steel. The sign changes alone involved some 22,000 people.

There were some problems executives hadn't counted on. Theft, for example.

"Suddenly," says Bell, "passenger started stealing us blind. Nobody cared about our blankets or our umbrellas until we announced we were changing our name. Why, the president of the company wanted two umbrellas and I had a lot of trouble finding them."

By Oct. 28, when the new name is in place almost everywere but on the outside of about half the jets in the USAir fleet, the headache will be mostly a memory. Still, the memory of Allegheny may live on until some other changes are made -- and the folks at Allegheny, er, USAir, know it.

For example, there are plans to institute first-class service on longer flights in the near future, a change that may do as much for USAir's image as its name. As one passenger pointed out, "Even if you never, ever buy a first-class ticket, there's something about knowing that you can't ."