George Chen and Elliot Rodger were both the older child of families that had relocated to southern California, seeking a better life. Recently, the two young men had left home for the first time, moving to the Santa Barbara area to attend college.
But whereas Mr. Chen, who grew up in Ottawa, was a studious, promising computer science major who had just completed his second year at the University of California, Santa Barbara, Mr. Rodger had seen the California Dream elude him. He was an embittered, alienated loner who was increasingly losing touch with reality.
Their paths intersected on Friday night when Mr. Chen and two of his friends were fatally stabbed by Mr. Rodger, who then went on a shooting rampage in which three other UCSB students were killed.
The mass killing at the campus community of Isla Vista, which ended with the suspect killing himself as police closed in on him, began in the Capri Apartments, where Mr. Rodger was unhappily sharing lodging with two of Mr. Chen's school friends, James Hong and David Wang.
Aside from being sexually frustrated, Mr. Rodger was also angry with his two Asian housemates and vowed in a rambling manifesto that he would kill them first.
Mr. Chen was apparently visiting when the slaying began.
His father, Junan, recalled that he was not initially worried when he first heard of the killings in Isla Vista.
"I said, 'Okay, my son should be safe because he lives inside of the school, in the residence hall,' " Mr. Chen told an ABC News reporter when he and his wife made an impromptu visit to a memorial outside the Capri Apartments on Monday night.
"This is just inhuman. It should not happen to anyone," Mr. Chen's mother, Kelly Wang, said tearfully.
The 19-year-old Mr. Chen was the elder of their two sons.
Like many others, the Chen family had been drawn to the Bay Area by the economic prospects of the Silicon Valley.
The family lives on in the San Jose neighbourhood of Almaden, a middle-class bedroom community of the local technology companies.
Mr. Chen attended middle school and high school in San Jose and was remembered as a friendly, helpful kid. He said on his Facebook page that he had been a camp counsellor for the YMCA.
His father is a software engineer for Juniper Networks, a firm based in nearby Sunnyvale that is the world's second-largest manufacturer of computer-networking gear.
Eduardo Moreno, who lived with George Chen two years ago in Anacapa Hall, a residence dorm for first-year students, said his former roommate was a quiet, hard-working student who didn't have many friends but cultivated a deep bond with them.
"We played a lot of video games together on lonely nights and he enjoyed having the company and experience," Mr. Moreno said in an e-mail interview.
"I never met anyone who was as good at geography in my life. I could quiz him on any random country and he would know the location and capital as well as its status in the world view."
Mr. Chen listed on his Facebook page that his hometown was Ottawa. The family lived at the time in an apartment tower on Fisher Avenue, near the Experimental Farm, in the city's west end.
"He was raised in Canada and had moved to the U.S. during high school before attending UCSB," Mr. Moreno said.
At UCSB, Mr. Chen's closest friend was Mr. Wang, Mr. Moreno said.
Both Mr. Chen and Mr. Wang were juniors at the UCSB college of engineering, according to the university's chancellor.
The Santa Barbara County Sheriff's Office has said Mr. Hong and Mr. Chen shared a lease with Mr. Rodger. However, according to the families of the young men, it was Mr. Wang who was living with Mr. Hong and Mr. Rodger.
Sharing an apartment with the Briton was not easy.
NBC News reported that Mr. Wang had told his parents that he wanted to move out because Mr. Rodger played music loudly at night and was unpleasant.
It wasn't clear if he had a mental illness, but he said in his manifesto that his parents regularly paid for therapists and counsellors and that he had been prescribed risperidone, an anti-psychotic medication.
Mr. Rodger was Eurasian but yearned to be treated as a white person.
The son of a Malaysian-Chinese mother and a British filmmaker, he said in his manifesto that he had had a happy childhood that spiralled downward after his family moved to California and his parents divorced. Socially awkward and a virgin, he had moved to Isla Vista to attend Santa Barbara City College in a last attempt at fitting in.
In his manifesto, he repeatedly mentioned his attraction to blond co-eds, recalled bleaching his hair and expressed frustration when seeing black, Asian or Mexican men having success with white women.
He started plotting what he called the Day of Retribution, which would start with him stabbing his housemates.
"These were the biggest nerds I had ever seen," he wrote, describing his repulsion and adding that "one of them had a very rebellious demeanor about him."
Mr. Rodger didn't identify the roommate he found rebellious, but it appears to have been Mr. Hong. On one occasion, he accused him of stealing candles worth $22 from him and made a citizen's arrest.
"He was a very stern person who did not back down from anything," Mr. Moreno recalled about Mr. Hong.
"George, David and James were the best of friends and had everything going for them and it is sad to discover that they were part of such a tragedy," he said.
Outside the Capri Apartments, where flowers and candles were piled up by the sidewalk in memory of the three young men, Mr. Chen's parents stopped by for an hour.
His mother got on her knees and, among the words of condolences chalked on the street, wrote her own message: "George I love you. Mom and Dad."