Jodie Foster was 12 when she made "Taxi Driver." She was nominated for an Academy Award in 1976 for her portrayal of a pre-teen-aged prositute who excited the protective instincts of a psychotic Vietnam veteran. At the bloody conclusion, Robert De Niro, as Travis Bickle, rescues her from her lot by brutally assassinating three men. The film ends with Bickle hailed as an avenging hero.

It was revealed yesterday that John Warnock Hinckley Jr., 25, accused of wounding President Reagan and three others in Monday's attempted assassination, had written Foster a two-page letter shortly before going to the Washington Hilton Hotel.

In the letter Hinckley wrote that "I will prove my love for you through a historic act." Several photographs of the actress, who is now 18, were found in Hinckley's wallet. The two had never met, but it was reported that Hinckley believed that the president has somehow snubbed Foster in the past.

It was not known yesterday whether Hinckley had seen the film "Taxi Driver," but it is Foster's best known role. She has since made 11 other films, among them ""Alice Doesn't Live Here Anymore," in which she played a loose-limbed juvenile delinquent, "Foxes," a story of sex and drugs in the suburbs, and "Carny," and R-rated 1980 film which aimed five times last month on Home Box Office television.

Foster has shelved her movie career for the moment to attend Yale University, a choice that put her on the cover of People magazine. At Yale, she made her stage debut last week in a college drama production titled "Getting Out." Her role is that of a teen-aged prostitute who has murdered a taxi driver.

John Hinckley is reported to have been obsessed with Jodie Foster, the movie star -- so much so that he may have dedicated an assassination attempt to her.

While most other children were in grammar school, Foster found herself repeatedly cast as a discomfitingly young-old subjects, hard and vulnerable simultaneously. She was part of a growing list of alienated characters that reached younger and younger, so that movie screens presented a steady stream of lost children -- whether Foster in "Taxi Driver" or Tatum O'Neal as the beer-drinking pitcher in "The Bad News Bears," or youthful but incorigible actresses such as Sondra Locke in "The Gauntlet."

Submarine crews in World War II had Betty Grable to pat on the fanny and troops in Korea named a twin-peaked hill after Jane Russell, but today's audiences have much less well-defined images to turn to in times of stress. It is unlikely that a movie star of the 1940s would elicit sympathetic brutality. But in many contemporary scripts there seems to be no other way to get the subject's attention.

Today, a psychotic personality may see himself as stepping onto a set ready made for his performance. The character who rescues Jodie Foster in "Taxi Driver" is a gun nut, an avenger, a lonely figure who longs for a "clean rain" to sweep the skies of his city and wash away the filth.

Psychological profiles of assassins drawn by law enforcement agencies show common characteristics. They are most often single males, intelligent but afflicted with delusions of grandeur and classic symptoms of paranoia, and obsessed with a cause. They also do not generally plan an escape route.

If assassins seek a form of immortality, we are now a society better equipped for immortalizing than ever before. The number of cameras in use by television organizations, for example, has increased greatly in recent years, as has the use of videotape.

The result was apparent on Monday, when the shootings outside the Washington Hilton were recorded by the networks with the clarity and effect of a movie. A skillful assassin, by placing himself in a situation well-covered by cameramen, can insure that his act will be viewed and viewed again by an enormous audience.

But the reality -- the videotape of a wounded president thrust into a limousine and the pathetic, enraged commands of his protectors and the lingering views of three men bleeding on a sidewalk -- is utterly uncinematic, finally. It is devoid of catharsis, and inspires only nausea.

This we know after the fact, but not after the movie. "Taxi Driver" was an exceedingly powerful and disturbing film, and it won first prize at the Cannes Film Festival that year.

Whatever the link between John Hinckley and Jodie Foster, it cannot be explained away with an attack on a single movie or on any offending art form. The Manson Clan was said to be inspired by the song "Helter Skelter." Books have often been accused of inspiring persons -- and nations -- to evil deeds, and there were riots when the ballet "The Rite of Spring" made its debut many years ago in Paris.

We all have a tenuous relation with our stars. Teen-agers choose manners of dress and behavior according to their idols. The rest of us buy tickets and watch television and marvel, too, at the Redfords and Fondas and Taylors and Astaires. Usually, it is benign and harmless and it makes life a little less serious, this belief that there are stars that we love.

But occasionally, the equation goes bad. Jodie Foster, by all accounts, is a well-adjusted woman in her first year at college. Before she was permitted to portray the craven child in "Taxi Driver," she underwent psychological testing to make sure she was up to it.

In a flippant off-to-college piece for Esquire magazine, she wrote:

"Well, you may not be able to rrreally rrelate to this, pal, but I'm trading in my life-guard shades for a taste of that good ol' New Haven grime. See, here's the scoop: college depression is in the cards for me! Yale actually invited me -- little smog ridden me -- to sink my blond teeth into its dusty brick and ivy. Just coat me with some eastern tsuris, grease up my hair for luck, and watch me dive into the depths of academia."

In the gulf between life and art lies madness; when it rears up, both are endangered.