Locke's mentor was Robert Boyle, the leader of the Oxford scientific group. Boyle's mechanical philosophy saw the world as reducible to matter in motion. Locke learned about atomism and took the terms "primary and secondary qualities" from Boyle. Both Boyle and Locke, along with Newton, were members of the English Royal Society. Locke became friends with Newton in 1688 after he had studied Newton's Principia Mathematica Philosophiae Naturalis. It was Locke's work with the Oxford scientists that gave him a critical perspective when reading Descartes. Locke admired Descartes as an alternative to the Aristotelianism dominant at Oxford. Descartes' "way of ideas" was a major influence on Locke's An Essay Concerning Human Understanding.
Locke studied medicine with Sydenham, one of the most notable English physicians of the 17th century. His skills in medicine led to an accidental encounter with Lord Ashley (later to become the Earl of Shaftesbury) in1666, which would mark a profound change in his career. Locke became a member of Shaftesbury's household and assisted him in business, political and domestic matters. Locke remained at Shaftesbury's side when the Earl was made Lord Chancellor in 1672, making presentations to benefices,