These two chapters, both giving genealogies of Jesus, at first appear to be contradictory. Actually, however, they complement each other.
The genealogy in Matthew 1 is clearly that of Joseph, Mary's husband. Matthew records it for legal purposes. He is writing to prove to the Jews that Jesus is the Messiah, and the Jews' custom in keeping records is to trace descent through the father. Legally, the Jews of Jesus' day looked on Jesus as a son of Joseph (John 6:42). Also, Joseph's lineage is given to emphasize the fact that Jesus had been born of a virgin. Because of a curse that God placed on one of Joseph's ancestors, Jesus could never sit upon the throne of David if Joseph had been His natural father.
Jechonias (Matthew 1:11-12), called Coniah in Jeremiah 22:24-30, was so evil God cursed him and his descendants, saying, "Write this man down as childless, . . . for none of his descendants shall prosper, sitting on the throne of David, and ruling anymore in Judah" (verse 30). Jeconiah, as his name is spelled in the Old Testament, had children (I Chronicles 3:17), but he was childless insofar as none of his descendants ruled as king over Judah.
How, then, could Jesus be a descendant of David and qualify to sit on the throne? Enter the genealogy in Luke 3, which is Mary's. According to Jewish usage, Mary's ancestry is given in her husband's name. The original Greek merely says Joseph was "of Heli" or Eli (verse 23). In fact, since Joseph's father is said to be Jacob in Matthew 1:16, Heli is most probably Mary's father. Joseph, then, is his son-in-law.
Unlike Joseph's lineage, there was no block in Mary's genealogy to Jesus sitting on the throne of David. Mary's descent from David comes through his son Nathan, not Solomon or one of David's other children (Luke 3:31). To fulfill His promise to establish David's throne forever, God honored Nathan by making him the ancestor of the promised King who would sit on David's throne throughout eternity (Luke 1:31-33).
But how could Mary transmit David's royal inheritance—the right to the throne—to her Son, since all inheritances had to pass through the male line? According to Israel's law, when a daughter is the only heir, she can inherit her father's possessions and rights if she marries within her own tribe (Numbers 27:1-8; 36:6-8). There is no record that Mary had any brothers to inherit her father's possessions and rights. Thus, Joseph became Heli's heir by marriage to Mary, inheriting the right to rule on David's throne, even over Judah. This right then passed on to Jesus.
Both genealogies had to be recorded to establish Christ's right to rule on David's throne. Joseph's genealogy shows that Christ was a legal descendant of Jeconiah and thus legally could not sit on the throne of David in the nation Judah by inheriting the right solely through Joseph.
Further, the genealogies prove the virgin birth: The curse on Jeconiah's line would have passed on to Christ if He were Joseph's natural son, but He was not—He was the Son of God the Father, begotten by the Holy Spirit.
Jesus was Mary's son descended from Nathan. Jesus can inherit rule over Judah because of Mary's marriage to Joseph, whose genealogy shows he was Heli's son-in-law.