New York: In a community college classroom here last June, on the first day of the term, the instructor in Jared L. Loughner's basic algebra class, Ben McGahee, posed what he thought was a simple arithmetic question to his students. He was not prepared for the explosive response.
"How can you deny math instead of accepting it?" Mr. Loughner asked, after blurting out a random number, according to Mr. McGahee.
Mr. McGahee, for one, was disturbed enough by the experience to complain to school authorities, who as early as last June were apparently concerned enough themselves to have a campus officer visit the classroom. And what Mr. McGahee described as a pattern of behavior by Mr. Loughner, marked by hysterical laughter, bizarre non sequiturs and aggressive outbursts, only continued.
"I was getting concerned about the safety of the students and the school," said Mr. McGahee, who took to glancing out of the corner of his eye when he was writing on the board for fear that Mr. Loughner might do something. "I was afraid he was going to pull out a weapon."
A student in the class, Lynda Sorenson, 52, wrote an e-mail to a friend expressing her concerns.
"We do have one student in the class who was disruptive today, I'm not certain yet if he was on drugs (as one person surmised) or disturbed. He scares me a bit," Ms. Sorenson wrote in an e-mail in June that was forwarded on Sunday to The New York Times.
"The teacher tried to throw him out and he refused to go, so I talked to the teacher afterward. Hopefully he will be out of class very soon, and not come back with an automatic weapon."
Mr. Loughner's behavior grew so troubling that he was told he could no longer attend the school, and he appeared, given his various Internet postings, to find a sense of community in some of the more paranoid corners of the Internet.
At some point, though it may be impossible to know when or why, Mr. Loughner crossed a border, from being a young man who many acquaintances said seemed mostly just odd to the one who the police say bought a 9 millimeter Glock handgun that he used Saturday to deliberately try to kill Representative Gabrielle Giffords, a Democrat from Arizona's Eighth District.
Robert S. Mueller III, the F.B.I. director, who has personally taken charge of the investigation here, said at a news conference that possible links to extremist groups would be a continued focus.
"The ubiquitous nature of the Internet means that not only threats, but hate speech and other inciteful speech is much more readily available to individuals than quite clearly it was eight or 10 or 15 years ago," Mr. Mueller said. "That absolutely presents a challenge for us, particularly when it results in what would be lone wolves or lone offenders undertaking attacks."
Mr. Loughner's friends and acquaintances said he was left isolated by his increasingly erratic behavior -- apparently exacerbated by drug use, as a military official said Sunday that he had failed a drug screening.
Lydian Ali, a classmate at Pima Community College, said, "He would laugh a lot at inappropriate times, and a lot of the comments he made had no relevance to the discussion topic."
Mr. Ali, 26, continued: "He presented a poem to the class that he'd written called 'Meathead' that was mostly just about him going to the gym to work out. But it included a line about touching himself in the shower while thinking about girls. He was very enthusiastic when he read the poem out loud."
At the local YMCA where Mr. Loughner worked out, he would ask strange questions of the staff, like how often they disinfected the bathroom doors. One time, he asked an employee how he felt "about the government taking over." Another time, he sat in the men's room for 30 minutes, leaving front desk staff to wonder what he was doing. When he emerged, he asked what year it was.
"One day it would be a tie-dye shirt, and the next he'd be dressed like a rapper, with a beanie and everything," said a trainer at the YMCA, Ben Lujan, describing Mr. Loughner. "It was almost like he was trying to be different people."
The exact role of politics in Mr. Loughner's life -- or whether he had a specific political perspective at all -- is harder to pin down. Investigators will have to wrestle with the difficult question of whether Mr. Loughner's parroting the views of extremist groups was somehow more a cause of the shootings or simply a symptom of a troubled life.
Mr. McGahee, the algebra instructor, said that after he went to school officials to complain about Mr. Loughner, he was told by a counselor that Mr. Loughner had caused problems in other classes and had "extreme political views."
But one classmate, Steven Cates, said he had tried on occasion to engage Mr. Loughner in political discussions, with no luck. He instead liked to talk about philosophy, or logic or literature, but not politics, Mr. Cates said. He added that one topic that Mr. Loughner seemed to be obsessed with was the American dollar.
"He had talked about not liking the currency," Mr. Cates said. "And he wished that the U.S. would change to a different currency because our currency is worthless."
Some people who study right-wing militia groups and those who align themselves with the so-called patriot movement said Mr. Loughner's comments on subjects like the American currency and the Constitution, which he posted online in various video clips, were strikingly similar in language and tone to the voices of the Internet's more paranoid, extremist corners.
In the text on one of the videos, for example, Mr. Loughner states, "No! I won't pay debt with a currency that's not backed by gold and silver." He also argues that "the current government officials are in power for their currency" and he uses his videos -- he never appears on screen, just displaying text -- to talk about becoming a treasurer of "a new money system."
The position, for instance, that currency not backed by a gold or silver standard is worthless is a hallmark of the far right and the militia movement, said Mark Potok, who directs research on hate groups for the Southern Poverty Law Center.
"That idea is linked closely to the belief among militia supporters that the Federal Reserve is a completely private entity engaged in ripping off the American people," Mr. Potok said.
But Mr. Loughner also posits in his Web postings the idea that the government is seeking to control people through rules and structure of grammar and language.
This is similar to the position of David Wynn Miller, 62, a former tool and die welder from Milwaukee who describes himself as a "Plenipotentiary-judge" seeking to correct, through a mathematical formula, what he sees as the erroneous and manipulative use of grammar and language worldwide. The Southern Poverty Law Center considers Mr. Miller to be a conspiracy theorist some of whose positions have been adopted by militias in general.
"The government is implying mind control and brainwash on the people by controlling grammar," Mr. Loughner said in a video. He also defiantly asserted, "You control your English grammar structure."
Mr. Miller, in an interview, said the argument sounded familiar. "He's probably been on my website, which has been up for about 11 years," Mr. Miller said. "The government does control the schools and the schools determine the grammar and language we use. And then it is all reinforced by newspapers, magazines, TV, radio and everything we do in society."
Law enforcement officials said they suspected that Mr. Loughner also might have been influenced by such things as American Renaissance, a conservative monthly magazine that describes itself as "America's premiere publication of racial-realist thought."
"We think that white Americans have an entirely legitimate reason to want to remain a majority in the United States because when a neighborhood or a school or an organization changes in demographics and becomes majority black or Hispanic, it is no longer the same institution or neighborhood," said Jared Taylor, its editor.
He added, "It may be shocking to hear something stated so bluntly."
Mr. Taylor said that his organization had searched its subscriber list going back 20 years and lists of those who had attended the group's conferences since 1994, but that there was no record of a Mr. Loughner.
But even as Mr. Loughner was exploring the outer boundaries of extremist philosophy, his life at school, which some acquaintances said was very important to him, was unraveling.
Through the fall, administrators at Pima Community College became increasingly concerned as reports involving Mr. Loughner, like that day in algebra class, continued to come in.
Most of the reports, according to Paul Schwalbach, a school spokesman, were about how Mr. Loughner was "acting out" in disruptive or inappropriate ways. By last fall, officials at the school learned about an Internet video that Mr. Loughner had prepared that cited Pima College, claiming that it was in some way illegal or unconstitutional.
The school had its lawyers review the video and decided at that point to take action, drafting a letter suspending Mr. Loughner, which was delivered to his parents' home in northwest Tucson by two police officers on the same evening that they discovered the video, Sept. 29.
At a meeting in early October at the school's Northwest Campus, where he attended classes, Mr. Loughner said he would withdraw. Three days later, the school sent him a letter telling him that if he wanted to return, he would need to undergo a mental health evaluation. "After this event, there was no further college contact with Loughner," the college said in a statement.
Mr. Cates, the former classmate, said he thought that leaving Pima was probably a major blow to Mr. Loughner.
"He was really into school. He really loved the acquisition of knowledge. He was all about that," Mr. Cates said. "It would make sense that losing that outlet would be a negative thing for him psychologically."
But the blows also kept coming. Mr. Loughner also tried to enlist in the Army, but failed a drug-screening test, Army officials confirmed.
Some people who knew, or at least glimpsed, Mr. Loughner's life at home with his parents, Randy and Amy Loughner, said they found the family inscrutable sometimes and downright unpleasant at others, especially the behavior of Randy Loughner.
"Sometimes our trash would be out, and he would come up and yell that the trash stinks," said a next-door neighbor, Anthony Woods, 19. "He's very aggressive."
Mrs. Loughner has worked for the city's Parks Department for many years, Tucson officials confirmed. Mr. Loughner's employment, if any, is unknown. Mr. Woods and his father, Stephen, 46, said they rarely remembered seeing the older Mr. Loughner go anywhere.
No one was home, or came to the door, at the Loughners' house on Sunday morning. The house itself was mostly obscured by a tree and a huge intertwined cactus in the front.
Kylie Smith, who said she had known Mr. Loughner since elementary school, said she was struggling to reconcile her memories of the boy she knew with the portrait that the police and investigators were painting.
"It just seems so out of character for the Jared I grew up with," she said.