You're likely thinking of Matthias, not Mathen.
The account of Matthias being chosen to replace Judas Iscariot is found in the Book of Acts, specifically in Acts 1:15-26.
In this passage, after Jesus' ascension, Peter addresses the believers in Jerusalem and explains the need to replace Judas, who had betrayed Jesus and then died. He quotes from the Psalms to show that this was prophesied.
Two candidates are proposed: Joseph called Barsabbas (also known as Justus) and Matthias. They pray and then cast lots, and the lot falls to Matthias. He is then enrolled with the eleven apostles.