This is from
Wikipedia. The sections in red are the ones that don't match up. Yes, I've heard the ideas that one depicts Mary's genealogy and the other Joseph's. The fact of the matter is, however, that Mary is simply not mentioned here. And, strangely, Luke presents Shealtiel as the son of Neri, not Jeconiah. Both, by the way, skip Pedayah.
If we're to discuss this seriously, then it's important to establish whose line is depicted in each of the two Gospels.
There can be little doubt that Matthew's genealogy is that of Joseph's ancestors in the royal line, from David through Solomon. Mary is only mentioned in the genealogy as being the wife of Joseph; it is Joseph who is the subject of verse 16: '
And Jacob begat Joseph the husband of Mary, of whom was born Jesus, who is called Christ.
Interestingly, Joseph then becomes the subject of Matthew ch.1, verses 18-25.
Are we agreed that Matthew's genealogy must relate to Joseph?
Then we move to Luke. Luke's genealogy only diverges from Matthew's after David. It's quite clear that there is no inconsistency up until that point. We know, however, that David had a number of sons [2 Samuel 5:14]; Solomon and Nathan being just two. We also know that Solomon was the son who became king, and belonged to the royal line.
Now, the divergence at this point is clearly no mistake. It is quite evident that a different son of David is followed in Luke's Gospel. This son, Nathan, was not of the royal line, although he was a son of David.
This is not a minor point. It means that the subject of the genealogy in Luke is not the same subject as in the genealogy of Matthew. Luke is not providing us with the genealogy of Joseph, whose royal line is clearly depicted in Matthew.
So, the conclusion must be that Luke is providing us with Mary's genealogy. And this fits with the manner in which Luke recounts the events. In Luke 1 and 2 the whole focus is upon Mary, with the concluding words of Luke 2:51 being, 'but his mother kept all these sayings in her heart'.
Can we, therefore, proceed in the knowledge that Luke is referring to Mary's genealogy?