Peter Leithart suggests that Jesus’ five discourses in Matthew not only parallel the five books of the Torah but also the five books into which the Psalms are divided. His main illustration is comparing the first and last parts of the Sermon on the Mount with Psalm 1:
Psalm 1 describes a man who take delight in Yahweh’s Torah, who meditates on it day and night, and who clearly produces a righteousness that surpasses that of the scribes and Pharisees. He does not annul the least of God’s commandments, but keeps and teaches them.
More specifically, Psalm 1 begins with a “blessing” on the man who walks faithfully with Yahweh. Jesus too begins with a series of eight beatitudes on those who live out the righteousness of God. Psalm 1 compares the righteous man to a well-watered tree bearing fruit in season and never withering. Jesus too compares the obedient to trees with fruit: “You will know them by their fruits.” The Psalm contrasts the fruitful tree of the righteous man to the useless chaff that the wicked become; Jesus too contrasts the righteous and wicked (false prophets) using botanical analogies – if the righteous are good trees bearing good fruit, the wicked are thorns and thistles that bear not fruit but only harm.
Psalm 1 concludes with a contrast between the ends of the righteous and wicked. The wicked are blown away like chaff and cannot stand in the judgment; but Yahweh knows the way of the righteous. Jesus also contrasts two ways that begin with two gates (Matthew 7:13-14). He warns those who hear but do not do what He says that they will not stand in the judgment. In fact, He will declare to them “I never knew you” (7:23, followed by a quotation from Psalm 6). In the parable of the two builders, Jesus lays out with an architectural metaphor what the Psalm says using the imagery of chaff and wheat. ”Winds blew” against the house on sand, and it fell (Matthew 7:27), the winds that also blow away the chaff of the wicked.
He thinks that there are other parallels too.