Passage
On these two commandments dependeth the whole law and the prophets.
On these two commandments dependeth the whole law and the prophets.
Matthew 22:38 This is the greatest and the first commandment.
Matthew 22:39 And the second is like to this: Thou shalt love thy neighbour as thyself.
Matthew 22:40 On these two commandments dependeth the whole law and the prophets.
Matthew 22:41 And the Pharisees being gathered together, Jesus asked them,
Matthew 22:42 Saying: What think you of Christ? Whose son is he? They say to him: David's.
The verse centers on "commandments", "dependeth", "whole", and "prophets". It is saying that the verse draws attention to "commandments" and "dependeth", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 39's "And the second is like to this..." into verse 41's "And the Pharisees being gathered together Jesus...", so "commandments" and "dependeth" belong inside that flow. In Matthew context, the local focus is Christ, faith, and discipleship.
A plain takeaway is to answer the verse's own emphasis on "commandments" and "dependeth" with trust shaped by these words, not by a vague optimism outside the passage.