He sat there, a lone figure, at the very end of the row of 140 presidential scholars seated on the south lawn of the White House. Tall and thin, his handsome features impassive, sweating in his dark flannel suit while a military band pulsed merrily along like a steam engine on this hot afternoon, Richard Shaw, 18, was feeling even hotter inside.

He's from Silver Spring, he's black, and he's a top graduate of Bethesda-Chevy Chase High School. He scored 1310 on his SATs. This fall he'll attend Yale University to study chemistry. He is one of the nation's best and brightest. Yet Richard Shaw, sitting on the White House lawn in the last seat with this year's high school presidential scholars yesterday afternoon, had questions in his mind. He looked around at the faces of the nation's selected high school achievers and saw few like his own. There were only seven. None other than Shaw was from the Washington area. "I feel there should be more," he said.

But as he took his place in line to receive a presidential medallion, just yards from where a group of black waiters in tuxedos and bow ties trod a path into the White House, the tears jumped into his face. It hit him. He was proud. "It really got to me," he says.

It got to a lot of the 23rd annual group of students, selected by a special presidential commission as academic and artistic standouts and who receive $1,000 stipends. The group of parents and teen-agers sat and stood under the glaring sun, sipping White House lemonade and leaning over one another with still cameras and home-video get-ups to get a glimpse of President Reagan. The president told the young adults to take their time about deciding a life course, using himself as an example: "When Eureka College gave me that degree, I still didn't know what I wanted to do," he said. "You see what happened.

"And it's not true that Abe Lincoln was my guidance counselor, or I his."

Gags and jokes aside, the White House social corps was at its best yesterday. The military social aides led the way with smiles and warm greetings, and even a grim Secret Service man managed a smile. The parents were thrilled, the kids enthusiastic. "Terrific," said Mary Jane Ingram, the pride of the El Paso, Tex., public school district, who plans to attend Rice University next year. Her ambition: "I'd like to find a way to make nuclear fusion possible as an energy resource." Along the way, she'll "seek a method to shorten the half-lives of radioactive wastes so that they're no longer dangerous."

The president's remarks were bright and brief, lasting barely five minutes, but the kids got a thrill anyway. "I was worried at first, because we've been going to so many events, people have been falling asleep," said Laura Brooks, 18, of Kwajalein High School in the Marshall Islands. But Brooks, who plans to study literature at Colgate University in the fall, didn't fall asleep yesterday. "I was so excited, I don't know what he said. It went in one ear and out the other. I was in such a state, I could barely listen."

The president's remarks were followed by a few words from Education Secretary William J. Bennett, and the medallions were awarded by Lois Bowman, principal deputy assistant secretary for elementary and secondary education.

The parents and teachers at the ceremony were beaming with pride: "Just bursting," said William Brooks, 43, an RCA engineer who brought his wife and other two children 8,000 miles from their home in the Marshall Islands to see Laura receive the nation's highest high school honor. "I can't believe I'm here. I'm proud of my children -- in any case, whatever they might do -- but this is overwhelming. I really appreciate the opportunity this has given them -- and us."

So did the rest of the kids. "It was a unique experience," said Vachel W. Miller of Dickinson, N.D., who kept a White House paper napkin as a souvenir. "I'm in shock. It was very exciting, very beautiful. We'll never do it again."