Cody Cousins, who is believed to have targeted Andrew Boldt inside the Electrical Engineering Building, surrendered to a police officer within minutes of the attack, Purdue Police Chief John Cox said.
Investigators were trying to determine a motive for the shooting, which happened around noon on the campus in West Lafayette, about 60 miles northwest of Indianapolis. No one else was injured.
"This appears to be an isolated and intentional act," Cox said.
Boldt, a 21-year-old senior and teaching assistant from West Bend, Wis., died at the scene. Cousins, a 23-year-old senior, who according to police has addresses listed both in Warsaw, Ind., and Centerville, Ohio, was being held on a preliminary charge of murder Tuesday night at the Tippecanoe County Jail.
Students described a chaotic scene on the campus. Sophomore Nick Wieland told the Journal & Courier that he was in a basement classroom adjacent to the one where the shooting occurred.
"I heard a couple (shots) and then I heard a man scream," Wieland said. "Then the last few kind of trailed off as I got under my desk. . (I was) just very scared. That's what I felt the entire time."
Julissa Martinez, a freshman in nursing, told The Associated Press that she was in a psychology class on another part of the campus when she received the text alert from university officials telling students to seek shelter.
She said her professor briefly kept teaching, then stopped lecturing so students could contact people to let them know they were safe.
"He tried to get everything under control because people were freaking out," Martinez said, adding that students were nervous because there was a lot of speculation about the severity of the situation.
The shooting was reported at 12:03 p.m. and Purdue officials issued the campuswide text alert shortly afterward. Cousins was taken into custody outside the engineering building within minutes of the shooting.
Around 1:15 p.m., the university texted students to tell them there was no ongoing threat on campus and that normal operations would resume in all buildings except the engineering facility.
But the university later announced that classes were being suspended through Wednesday. Special counseling services were being offered to students at several sites around campus.
Purdue Provost Tim Sands said the university's president, Mitch Daniels, was on a weeklong school trip to Colombia but would be cutting his travel short. He was expected to return to campus Wednesday.
Sands, who in June will become president of Virginia Tech, where a 2007 campus shooting left 33 dead, said Purdue will offer assistance to those who need it.
"We'll provide whatever services we can to assist our students, our faculty and our staff in coming back to a sense of normality," he said.
Boldt was an Eagle Scout who graduated in 2010 from Marquette University High School, a Jesuit school in Milwaukee. He spent two summers interning for John Deere in Silvis, Ill., according to his LinkedIn profile.
Family members of Boldt could not be reached for comment Tuesday night. Relatives of Cousins also could not be reached.
Jean Morrell, Boldt's high school calculus teacher, recalled that he would frequently stay after class to talk to her about math concepts, robotics and his dreams of attending Purdue, Morrell's alma mater.
"One thing I remember fondly: He was curious. He loved to talk about complicated problems, how these math concepts applied in real life, but also about the beauty of mathematics," she said. "I'm cautious about using the word brilliant because it gets thrown around so much, but as far as mathematics he had a brilliant mind."
The Rev. Warren Sazama, the high school president, remembered Boldt as a likable, kindhearted student who excelled in school and came from a good family. Sazama said the family was especially concerned about how Boldt's youngest brother, a senior at the same high school, would deal with the tragedy.
"The parents are obviously very much in shock," he told AP. "The mother said, 'You don't expect to get up in the morning and expect your son to be one in a million for a tragedy like this to happen.'"
Boldt made such a mark on his teachers that they bestowed upon him one of the school's top honors: They made him a member of the honor society. That means the faculty viewed him as a role model for qualities including intellectual excellence, religiousness and commitment to justice, Morrell said.
"Andrew Boldt was a young man who had the potential to make the world a better place. He was a phenomenal young man," Morrell said, her voice cracking. "He had a great mind but he also had a great heart. I'm just sad he won't get an opportunity to realize his dreams, to make his contribution to the world."