Acts 1:12-2:16
The Apostles needed to replace Judas, who had betrayed Jesus, and that he had to be one of the men who had been with them during the time that Jesus was among them. So, they cast lots and Matthias was chosen, and was added to the eleven.