(a) What led to the selection of Matthias as one of the apostles (Acts 1:15-22)
After the ascension of Jesus, about a hundred and twenty believers gathered in Jerusalem. Peter stood up among them and reminded them of Judas Iscariot, who had been numbered among the twelve and had shared in their ministry, but who had guided those who arrested Jesus. Judas had bought a field with the reward of his wickedness and there met a terrible death, falling headlong so that his body burst open; the field became known as Akeldama, the Field of Blood.
Peter explained that the Scriptures had to be fulfilled, quoting the Psalms: "Let his habitation become desolate, and let there be no one to dwell in it," and "His office let another take." Because the number of the twelve apostles had been broken by Judas's betrayal and death, it was necessary to choose a replacement so that the full number would be restored to bear witness to Jesus. Peter set the qualification: the man must be one who had accompanied them during all the time the Lord Jesus went in and out among them, beginning from the baptism of John until the day He was taken up, so that he could be a witness with them to the resurrection.
(b) How the selection was conducted (Acts 1:23-26)
The assembly put forward two men who met the qualification: Joseph called Barsabbas, who was also known as Justus, and Matthias. They then prayed, saying, "Lord, you know the hearts of all; show which one of these two you have chosen to take the place in this ministry and apostleship from which Judas turned aside." After the prayer they cast lots, and the lot fell on Matthias. He was therefore enrolled with the eleven apostles, completing the number of the twelve.