The world's No. 1 and No. 2-ranked tennis players met in Madison Square Garden in the semifinals of the Masters today.

No. 1 John McEnroe, 22, was coming off one of the greatest years in the history of his sport in which he had won singles and doubles at Wimbledon, singles and doubles at the U.S. Open and singles and doubles matches in the Davis Cup.

This Masters was to be the culmination of McEnroe's great '81 season.

No. 2 Ivan Lendl, 21, arrived in the midst of one of his sport's longest winning streaks, 34 matches, which has marked him a superstar.

This Masters was to be Lendl's announcement that while McEnroe might have owned '81, the 1982 season was going to be his.

In a match that was all the more dramatic for its shocking onesidedness, Lendl dismantled McEnroe from the very first game, 6-4, 6-2.

" . . . I did whatever I wanted," said Lendl, who has beaten McEnroe three straight times in recent months and thinks he has Mack the Knife dulled.

"I got my butt kicked," said McEnroe after an embarrassing 74-minute blowout that had one fan screaming at the resigned McEnroe, "Where's your pride, Mack?"

Now, Lendl, who has won $1.3 million in the past two seasons, but never a prestige championship, will face Vitas Gerulaitis in Sunday's 3 p.m. final.

And who was the last player to beat Lendl--four months, 35 matches and seven tournaments ago?

Gerulaitis, of course.

As a nice twist on a rich day, Gerulaitis, who beat Eliot Teltscher, 7-5, 4-6, 6-2, in the other semifinal, would not even have been invited to this eight-man Masters party except that his buddy Bjorn Borg withdrew as part of his six-month sabbatical from tennis. That made Gerulaitis, No. 9 in Grand Prix points, eligible.

"This is the first time Bjorn's ever let me win any money," quipped Gerulaitis, who has lost 20 straight matches to the Swede.

Lendl, who trumped McEnroe by breaking his vaunted serve in the first game of each set, won with almost contemptuous ease. As Lendl's coach Wojtek Fibak says, "Once Ivan learns how to beat you, he never forgets."

For now, Lendl thinks he's found the key that unlocks McEnroe.

"In matches before, he got 15 or 20 aces . . . unbelievable in a two- or three-set match," said Lendl, referring to defeats in his first three pro meetings with McEnroe. "Now, I am returning his serve much better. Once I return, I hit it harder (than McEnroe) from the base line, then I can come in and do whatever I want."

Whatever he wanted, indeed. Lendl owned McEnroe's mind today much as McEnroe controlled Borg's at the U.S. Open. Lendl was so confident in his new-found ability to return McEnroe's serve, that he elected to receive in the first game of the match. McEnroe served three double faults in that initial game, broke himself, and never thereafter seemed to be in the match.

Although Lendl was superb this day, the dominant mood of this match was the profound gloom in which McEnroe seemed sunk. If ever a player seemed to drip with self-reproach, it was McEnroe. And with good reason.

McEnroe has always prided himself on his integrity. In his own eyes, it's his central virtue. It's also part of the reason that he acts so vain and childishly superior when he points out all the "injustices" around him.

On Friday, McEnroe, by a bizarre set of events, suffered a significant blow to his self-esteem. It's a bit complex, but still seems a bona fide study in sports psychology.

First, McEnroe was mistakenly told by officials after his victory on Thursday that he was champ of his half of the draw, thus winning a $30,000 bonus as well as avoiding Lendl, already the champ of the other half, in the semifinals.

So, McEnroe celebrated, staying out until 3 a.m. at a rock concert. Then, 30 minutes before his Friday match with Teltscher, officials told McEnroe they'd figured wrong. If he lost, and Roscoe Tanner then beat Connors, Teltscher, not McEnroe, would win the $30,000 and also avoid meeting Lendl in the semis.

McEnroe, ill-prepared, annoyed and halfhearted, lost. Tanner won. And the whole nightmare for McEnroe fell in place like a corny moral parable on why you should always try your hardest.

McEnroe's Masters was unraveling fast. Had he paid attention to business and beaten Teltscher, this is what tennis percentages say probably would have happened.

First, Connors would have made the semis, not Teltscher. And Connors would have beaten Lendl today, because Connors is the only player who owns Lendl, having won all eight of their matches and all 17 sets.

Next, McEnroe would have played and beaten the less-tough Gerulaitis today.

Finally, McEnroe would have met Connors on Sunday. Had he repeated the licking he laid on Jimbo on Thursday, McEnroe would have taken home $130,000 this week. As is, he'll have to settle for $30,000.

"There's nothing good I can say about myself," said McEnroe. "He was eager, he controlled the whole match. I didn't deserve to win . . . I'm not going to use the stuff that happened the day before as an excuse. It's part of my job to get that out of my head. If I don't, it's may fault."

Nonetheless, many watching this match felt McEnroe was, in some corner of his brain, punishing himself for dereliction of tennis duty. None of McEnroe's critics are tougher than McEnroe.

What McEnroe knows, and fears, is that all this may cost him far more than cash. By playing lamely against Lendl, he's expedited the Czech's project of ascending to the throne that McEnroe so recently took from Borg.

Between McEnroe and Lendl, there is, at this moment, little difference. Lendl, who speaks six languages and thinks "topspin" is the nicest word in all six, is already McEnroe's superior on clay and now may claim at least a temporary edge on medium speed surfaces such as the one here.

"Once you have proved that you can win the big points from a player, then it is always easier to win those points in the future," said Lendl.

And how will that apply to Sunday's final? Lendl was asked.

"Well," said Lendl, "I beat Gerulaitis on Wednesday."

Few things in sport are more precariously held than the No. 1 ranking in tennis. You're only the king until somebody figures you out, until you let that mysterious balance of confidence tilt into the other man's court.

"When you're No. 1," said McEnroe, "your ranking is threatened every time out."

So much so, that a young man can't even steal one night to rock, lest he awake to find his crown in danger of being stolen.