What does “where two or three are gathered together in My name” mean, Matthew 18:20?

Matthew 18:19-20 states:
Mat 18:19 “Again I say to you that if two of you agree on earth concerning anything that they ask, it will be done for them by My Father in heaven.
Mat 18:20 For where two or three are gathered together in My name, I am there in the midst of them.”
People often quote verse 19 to say that if two people agree on something to ask God, God will give it them. And people often quote verse 20 to say that if just two or three people are gathered together in Jesus’ name, He is there with them.
Is this the meaning of these verses? Let’s take a closer look.
The context of these verses is instruction on how to deal with a brother who sins against you.
Mat 18:15 “Moreover if your brother sins against you, go and tell him his fault between you and him alone. If he hears you, you have gained your brother.
Mat 18:16 But if he will not hear, take with you one or two more, that ‘BY THE MOUTH OF TWO OR THREE WITNESSES EVERY WORD MAY BE ESTABLISHED.’
Mat 18:17 And if he refuses to hear them, tell it to the church [ekklesia]. But if he refuses even to hear the church [ekklesia], let him be to you like a heathen and a tax collector.
The first step is to talk to your brother alone. If that fails, then talk to your brother again but with one or two other brethren, which importantly makes two or three witnesses. If that fails also, then you take the issue to the congregation. The Greek word translated church here is ekklesia, which means an assembly of people, that is, the congregation.
The next verse talks about the decision will be bound or loosed. For more information on this see, “What does “binding and loosing” mean?”
Mat 18:18 “Assuredly, I say to you, whatever you bind on earth will be bound in heaven, and whatever you loose on earth will be loosed in heaven.
The next two verses are the verses in question.
Mat 18:19 “Again I say to you that if two of you agree on earth concerning anything that they ask, it will be done for them by My Father in heaven.
Mat 18:20 For where two or three are gathered together in My name, I am there in the midst of them.”
Based on the context, it is clear that these verses relate to dealing with a sinning brother. Jesus based his instruction on the Old Testament law. In verse 16 Jesus quoted the law regarding witnesses.
Deu 17:6 Whoever is deserving of death shall be put to death on the testimony of two or three witnesses; he shall not be put to death on the testimony of one witness.
Deu 19:15 “One witness shall not rise against a man concerning any iniquity or any sin that he commits; by the mouth of two or three witnesses the matter shall be established.
One witness is not enough as he might lie. So, two or three witnesses are required to settle a matter.
In Matthew 18:19-20, when Jesus said “if two of you agree” and “where two or three are gathered”, it is in the context of requiring “two or three” people to resolve the issue. Either two or three people privately where the sinner acknowledges his sin and repents. Or two or three people (likely a lot more) publicly where the sinner is put out of the church.
So we see that Matthew 18:19-20 is not about two or three people agreeing on something so God can answer their prayer, nor is it about Jesus’ presence when people gather in His name. Nevertheless it is worth discussing it.
Discussion
Matthew 18:19
What about Matthew 18:19? If two people agree concerning anything that they ask, will the Father do what they ask? There are plenty of Scriptures, listed below, in which God promises to hear our prayers and answer them. When listed together it is clear that there are conditions. Note that the condition for answered prayer is not to find someone to agree with you. The conditions for answered prayer are that we keep God’s commandments and obey Him and that the request is according to His will.
Mat 21:22 And whatever things you ask in prayer, believing, you will receive.”
Mar 11:24 Therefore I say to you, whatever things you ask when you pray, believe that you receive them, and you will have them.
Joh 14:13 And whatever you ask in My name, that I will do, that the Father may be glorified in the Son.
Joh 14:14 If you ask anything in My name, I will do it.
Joh 15:7 If you abide in Me, and My words abide in you, you will ask what you desire, and it shall be done for you.
Joh 15:16 You did not choose Me, but I chose you and appointed you that you should go and bear fruit, and that your fruit should remain, that whatever you ask the Father in My name He may give you.
Joh 16:23 “And in that day you will ask Me nothing. Most assuredly, I say to you, whatever you ask the Father in My name He will give you.
1Jn 3:22 And whatever we ask we receive from Him, because we keep His commandments and do those things that are pleasing in His sight.
1Jn 5:14 Now this is the confidence that we have in Him, that if we ask anything according to His will, He hears us.
1Jn 5:15 And if we know that He hears us, whatever we ask, we know that we have the petitions that we have asked of Him.
If two people agree concerning anything that they ask, will the Father do what they ask? Yes, if they are obedient to God and the request is according to His will.
Matthew 18:20
What about verse Matthew 18:20? If two or three people are gathered together in Jesus’ name, will He be there with them? Jesus promised to be with us always—to never leave us. See the Scriptures below. It doesn’t matter how many are gathered together in Jesus’s name—even if it’s just one person—Jesus is there with them or him.
Mat 28:20 teaching them to observe all things that I have commanded you; and lo, I am with you always, even to the end of the age.” Amen.
Heb 13:5 Let your conduct be without covetousness; be content with such things as you have. For He Himself has said, “I WILL NEVER LEAVE YOU NOR FORSAKE YOU.”
If two or three people are gathered together in Jesus’ name, will He be there with them? Yes.
Conclusion
As seen from the context, Matthew 18:19-20, is not about two or three people agreeing on something so God can answer their prayer, nor is it about Jesus’ presence when people gather in His name.
Matthew 18:19-20, is about requiring two or three people to resolve the issue of a sinning brother in accordance with the instructions laid out in the preceding verses.