The genealogies of Jesus
The two genealogies of Joseph diverge in names, structure and depth — legal and natural lines, Joseph's and Mary's, or different theological selections (Matthew's three fourteens; Luke's descent to Adam).
Matthew 1:1-17
1The book of the genealogy of Jesus Christ, the son of David, the son of Abraham.
2Abraham became the father of Isaac. Isaac became the father of Jacob. Jacob became the father of Judah and his brothers.
3Judah became the father of Perez and Zerah by Tamar. Perez became the father of Hezron. Hezron became the father of Ram.
4Ram became the father of Amminadab. Amminadab became the father of Nahshon. Nahshon became the father of Salmon.
5Salmon became the father of Boaz by Rahab. Boaz became the father of Obed by Ruth. Obed became the father of Jesse.
6Jesse became the father of King David. David became the father of Solomon by her who had been Uriah’s wife.
7Solomon became the father of Rehoboam. Rehoboam became the father of Abijah. Abijah became the father of Asa.
8Asa became the father of Jehoshaphat. Jehoshaphat became the father of Joram. Joram became the father of Uzziah.
9Uzziah became the father of Jotham. Jotham became the father of Ahaz. Ahaz became the father of Hezekiah.
10Hezekiah became the father of Manasseh. Manasseh became the father of Amon. Amon became the father of Josiah.
11Josiah became the father of Jechoniah and his brothers, at the time of the exile to Babylon.
12After the exile to Babylon, Jechoniah became the father of Shealtiel. Shealtiel became the father of Zerubbabel.
13Zerubbabel became the father of Abiud. Abiud became the father of Eliakim. Eliakim became the father of Azor.
14Azor became the father of Zadok. Zadok became the father of Achim. Achim became the father of Eliud.
15Eliud became the father of Eleazar. Eleazar became the father of Matthan. Matthan became the father of Jacob.
16Jacob became the father of Joseph, the husband of Mary, from whom was born Jesus, who is called Christ.
17So all the generations from Abraham to David are fourteen generations; from David to the exile to Babylon fourteen generations; and from the carrying away to Babylon to the Christ, fourteen generations.
Luke 3:23-38
23Jesus himself, when he began to teach, was about thirty years old, being the son (as was supposed) of Joseph, the son of Heli,
24the son of Matthat, the son of Levi, the son of Melchi, the son of Jannai, the son of Joseph,
25the son of Mattathias, the son of Amos, the son of Nahum, the son of Esli, the son of Naggai,
26the son of Maath, the son of Mattathias, the son of Semein, the son of Joseph, the son of Judah,
27the son of Joanan, the son of Rhesa, the son of Zerubbabel, the son of Shealtiel, the son of Neri,
28the son of Melchi, the son of Addi, the son of Cosam, the son of Elmodam, the son of Er,
29the son of Jose, the son of Eliezer, the son of Jorim, the son of Matthat, the son of Levi,
30the son of Simeon, the son of Judah, the son of Joseph, the son of Jonan, the son of Eliakim,
31the son of Melea, the son of Menan, the son of Mattatha, the son of Nathan, the son of David,
32the son of Jesse, the son of Obed, the son of Boaz, the son of Salmon, the son of Nahshon,
33the son of Amminadab, the son of Aram, the son of Hezron, the son of Perez, the son of Judah,
34the son of Jacob, the son of Isaac, the son of Abraham, the son of Terah, the son of Nahor,
35the son of Serug, the son of Reu, the son of Peleg, the son of Eber, the son of Shelah,
36the son of Cainan, the son of Arphaxad, the son of Shem, the son of Noah, the son of Lamech,
37the son of Methuselah, the son of Enoch, the son of Jared, the son of Mahalaleel, the son of Cainan,
38the son of Enos, the son of Seth, the son of Adam, the son of God.
What each tradition says
Rabbinic / Midrashic
The Jewish Encyclopedia says that, in support of the Messianic claim, two different genealogies were compiled. Matthew 1:1-16 traces Joseph's pedigree through forty-two generations to Abraham, stressing sinners and heathen ancestresses of David's house; Luke 3:23-38 traces it to Adam as "the son of God" to include the non-Abrahamic world.
Joseph Jacobs, Kaufmann Kohler, Richard Gottheil, Samuel Krauss, The Jewish Encyclopedia (Funk & Wagnalls, 1901-1906), s.v. 'Jesus of Nazareth' — section 'Legends Concerning His Birth'
Patristic
Augustine holds that Luke’s genealogy names Joseph’s father not as the one who begat him, but as the one who adopted him. Luke then traces this adoptive line of ancestors upward until he reaches David.
Augustine of Hippo (354-430), The Harmony of the Gospels (trans. S. D. F. Salmond), in NPNF ser. 1, vol. 6 (ed. Philip Schaff; T&T Clark, Edinburgh, 1888) — Book II, ch. 3 ('A Statement of the Reason Why Matthew Enumerates One Succession of Ancestors for Christ, and Luke Another')
Catholic
Aquinas calls this last motive the truest. Jerome also gives it commenting on Matthew 1:16, and Eusebius of Caesarea, citing Africanus, says Mathan and Melchi at different times each begot a son of one and the same wife, named Estha.
Thomas Aquinas (1225-1274); trans. Fathers of the English Dominican Province (1920), Summa Theologiae, Second and Revised Edition (New Advent) — III, q.31, a.3 ('Whether Christ's genealogy is suitably traced by the evangelists'), reply to objection 2
Orthodox
Chrysostom says Matthew, writing to Hebrews, sought only to show that Christ was from Abraham and David. Luke, speaking to all generally, traces the account higher, even to Adam. Matthew begins with Christ’s generation because telling Jews He was Abraham’s and David’s offspring was soothing; Luke mentions other things first, then the genealogy.
John Chrysostom (c. 349-407), Homilies on the Gospel of St. Matthew, in NPNF ser. 1, vol. 10 (ed. Philip Schaff; T&T Clark, Edinburgh, 1888) — Homily I, on Matthew i. 1
Reformed / Protestant
Calvin says Matthew treats the legal descent, permits some omissions in the ancestors, and arranges them under three fourteens to help memory, while Luke follows the natural descent more exactly. He also notes that when the two speak of the same persons, they sometimes give them different names.
John Calvin (1509-1564), Commentary on a Harmony of the Evangelists, Matthew, Mark, and Luke, vol. 1 (trans. William Pringle; Calvin Translation Society, Edinburgh, 1845) — comment on Matthew 1:1-17 and Luke 3:23-38 (the four points of difference)
Evangelical
Wesley holds that “the son of Heli” means son-in-law, since Heli was Mary’s father. Matthew records Joseph’s genealogy, descended from David through Solomon, while Luke records Mary’s, descended from David through Nathan. In Matthew’s genealogy of Joseph, Mary’s line is implied, because Jews commonly married within their own families.
John Wesley (1703-1791), Explanatory Notes upon the New Testament (1755; CCEL's 'Wesley's Notes on the Bible') — Note on Luke 3:23 (on 'the son of Heli')