Some argue that Matthew and Luke’s genealogies are contradictory. The argument is that Matthew 1 says that David was the father of Solomon and Jacob was the father of Joseph, but Luke 3 says that David was the father of Nathan and Joseph was the father of Heli. However, there are several reasonable explanations for this apparent contradiction in the Bible.
David was the father of Solomon by the wife of Uriah…Matthew 1:6
Jacob the father of Joseph the husband of Mary, of whom Jesus was born, who is called Christ.Matthew 1:16
Jesus, when he began his ministry, was about thirty years of age, being the son (as was supposed) of Joseph, the son of Heli…Luke 3:23
the son of Melea, the son of Menna, the son of Mattatha, the son of Nathan, the son of David…Luke 3:31
It is likely that Matthew and Luke would have used similar sources, and perhaps even been in communication with one another, and therefore would not have written anything that would truly be contradictory to what the other wrote.
Because of this, it is reasonable to give Matthew and Luke the benefit of the doubt and to believe that they had a good reason for writing their respective genealogies in the specific way that they did.
It is significant to note that Matthew and Luke have different goals for their respective genealogies. This is clearly the case because Matthew begins his genealogy with Abraham and his genealogy is at the very beginning of his writing, while Luke begins his genealogy with Adam and his genealogy does not occur at the very beginning of his writing.
This seems to suggest that Matthew’s primary audience is the Jews, since they would be familiar with God’s promise to Abraham, and that Luke’s primary audience is the Gentiles, since Adam is the ancestor of the entire human race.
Furthermore, Luke probably had a reason for beginning his genealogy later in his writing. One suggestion has been that since Luke spends some time before his genealogy writing about Mary, Luke’s genealogy traces Jesus’ lineage through Mary, rather than through Joseph.
One explanation for the difference between Matthew 1 and Luke 3 is that Luke traces Jesus’ lineage through Mary, while Matthew traces Jesus’ lineage through Joseph.
According to this view, since there is no Greek word for “son-in-law,” it is possible that when Luke says that Joseph was the son of Heli, Luke is saying that Joseph was the son-in-law of Heli, who was actually Mary’s father.
Some argue that it would have been unusual to trace a person’s genealogy through the mother. However, Mary was unique as the mother of Jesus, and Luke has already spent time introducing and describing who Mary was, so it is reasonable to believe that Luke could indeed be tracing Jesus’ lineage through Mary.
Church historian Eusebius offered another possibility for the difference between Matthew 1 and Luke 3. He said that perhaps Matthew’s genealogy is a biological genealogy, while Luke’s genealogy is a legal genealogy.
Jewish tradition stated that if a man died without having any sons, his brother would marry the widow and have a son who could carry on the family name. Based on this, it is possible that Melchi in Luke 3:24 and Matthan in Matthew 1:15 were both married to the same woman at different times, making Heli in Luke 3:23 and Jacob in Matthew 1:15 half brothers.
After this, if Heli died without a son, then his half-brother Jacob would marry Heli’s widow, which would make Joseph the ”legal” son of Heli and the ”biological” son of Jacob.
If this was the case, then Jacob would have been the descendent of Solomon (Matthew 1:6) and Heli would have been the descendent of Nathan (Luke 3:31)
There are some foundational principles that apply to all alleged and apparent contradictions in the Bible. To read more, see Bible Difficulties: Foundational Principles.
To read more answers to alleged and apparent contradictions in the Bible, see “Contradictions” in the Bible Answered.
These books are also excellent resources: