It is easy for people to imagine a contradiction in the Bible when they read the accounts of Jesus lineage in Matthew and Luke’s Gospels.
I believe there are no contradictions in the Word of God.
What we have here is double occurrence of the Jewish law designed for the continuance of inheritance.
Deuteronomy 25:5-6 ” her husband’s brother shall go in unto her, and take her to him to wife, and perform the duty of a husband’s brother unto her. And it shall be, that the first-born that she beareth shall succeed in the name of his brother that is dead, that his name be not blotted out of Israel.” ASV.
Matthew 1:15-16 “Eliud begat Eleazar; and Eleazar begat Matthan; and Matthan begat Jacob; and Jacob begat Joseph the husband of Mary, of whom was born Jesus, who is called Christ.”
Luke 3:23-24 “And Jesus himself, when he began to teach, was about thirty years of age, being the son (as was supposed) of Joseph, the son of Heli, the son of Matthat, the son of Levi, the son of Melchi,”
Smith’s Bible Dictionary explains Mat’that, (gift of God) is another form of the name Matthan.
I recently came across the writings of Solomon of Akhlat, a bishop of Basrah, Iraq during the thirteenth century.
His ‘Book of the Bee’, was a collection of Jewish records and teachings. In the 33rd chapter discussing the Messianic Generations, he explains the Genealogies of Mary and Joseph .
“Mattan the son of Eliezer–whose descent was from the family of Solomon–took a wife whose name was Astha (or Essetha) and by her begat Jacob naturally. Mattan died, and Melchi, whose family descended from Nathan the son of David, took her to wife, and begat by her Eli (or Heli); hence Jacob and Heli are brothers, the sons of one mother.
Joseph’s Father and Mary’s Father were Cousins
Eli (or Heli) took a wife and died without children. Then Jacob took her to wife, to raise up seed to his brother, according to the command of the law; and he begat by her Joseph, who was the son of Jacob according to nature, but the son of Heli according to the law; so whichever ye choose, whether according to nature, or according to the law, Christ is found to be the son of David. It is moreover right to know that Eliezer begat two sons, Mattan and Jotham. Mattan begat Jacob, and Jacob begat Joseph; Jotham begat Zadok, and Zadok begat Mary. From this it is clear that Joseph’s father and Mary’s father were cousins.”
Mattan was the grandfather of the Virgin Mary. She and Joseph were also second cousins. So when someone tells you there are contradictions in the Bible, take time to look deeper than the surface, and you will find there is an explanation, that is sometimes not apparent at the first glance. You really can trust the Word of God.