See this subject explained in the notes at Matthew 22:37-40.
Related Commentaries of Luke 10:27
Luke 10:27-28
27 And he answering said, Thou shalt love the Lord thy God with all thy heart, and with all thy soul, and with all thy strength, and with all thy mind; and thy neighbour as thyself.
28 And he said unto him,Thou hast answered right: this do, and thou shalt live.