It is important to answer three questions in the teaching of Jesus. When Jesus says :“you have heard that it was said to those of old”, I need to ask who said that in olden times? The first question is: Who said, ”Thou shalt not kill.” The answer is - God said that. The second question is : Who said “Thou shalt not commit adultery.” The answer is the same. God said that. The third question is: Who said: “An eye for an eye and a tooth for a tooth”? The whole meaning of the passage is that God said that!! (c.f. Ex 21:14). When people were fighting and their resentment and wish for revenge was out of control, God tried to placate them by setting limits. If they poke you in the eye, do not go and blow up the village. Just an eye for an eye! Jesus is now making new rules. On the mountain of the Beatitudes, Jesus is claiming the authority of God.
This is important to illustrate that Jesus is proclaiming a New Law that does not destroy the old Law but fulfils it. The New Law is not about revenge and getting square. The New Law is about Love. Jesus legislates for loving our enemies. All of the Commandments are in the Beatitudes, and very much more.
Let us look at the last verse. You must therefore be perfect as your heavenly Father is perfect. This is a big clue to the Sermon on the Mount. To be as perfect as the Heavenly Father is surely an impossibility. To be poor in spirit, pure in heart, love the enemy are likewise impossible dreams for any of us. We will always be short of that. But the Law of the New Covenant is that we should aim for that. We are promised the Holy Spirit’s help. We will be canonised for trying.
You can keep the ten commandments by will power on a good day! You can never live the Beatitudes without the grace of God!! You will live them fully in Heaven.