Isaac Asimov's Robot3 books in series
The Caves of Steel Summary
Like most people left behind on an over-populated Earth, New York City police detective Elijah Baley has little love for either the arrogant Spacers or their robotic companions. But when a prominent Spacer is murdered under mysterious circumstances, Baley is ordered to the Outer Worlds to help track down the killer. Then he learns that he has been assigned a partner: R. Daneel Olivaw. Worse, the R stands for "robot" - and his positronic partner is made in the image and likeness of the murder victim!