When you look at the genealogy of Jesus Christ, he is introduced as having two main identities. He's the son of David, a king. And he's the son of Abraham, the promised seed through whom all the nations of the earth would be blessed.
Lots of people think that Matthew wrote his Gospel with a particularly Jewish audience in mind. I tend to agree. Maybe that's why Matthew's genealogy traces back to Abraham, the father of the Jewish nation, instead of taking Luke's approach of tracing Jesus' genealogy back to Adam (Luke 3:38).
Reading this list is like a trip through the Old Testament. You can't help but notice that this is not exactly an honor roll. Tamar had to trick her father-in-law, Judah, into impregnating her by disguising herself as a prostitute (Genesis 38). And the wife of Uriah was Bathsheba, whom David had an affair with, impregnated, and then obtained as a wife by murdering Uriah. Jesus Christ was born without sin and yet he identifies with a family tree of sinners.
Matthew has arranged the generations into three sets of fourteens--or six sevens. Seven, seven; seven, seven; seven, seven. This arrangement draws our attention back to the old creation: God made man in his image on the sixth day, and he rested on the seventh. Yet it also points to the anticipation of a new creation. It is a new "sixth day" because Jesus Christ came to reveal the perfect image of God in himself. And it is a new "seventh day," for he will usher in an eternal Sabbath rest for his people.