What is the meaning of Matthew 1:2-4?

2 Abraham begat Isaac; and Isaac begat Jacob; and Jacob begat Judas and his brethren; 3 And Judas begat Phares and Zara of Thamar; and Phares begat Esrom; and Esrom begat Aram; 4 And Aram begat Aminadab; and Aminadab begat Naasson; and Naasson begat Salmon; (Matthew 1:2-4 KJV)

William Burkitt’s Commentary

Both the Evangelists, St. Matthew and St. Luke, make mention of our Savior’s pedigree; the former by his reputed father’s side, the latter by his mother’s side: the design of both was to present us with a general draught of our Lord’s pedigree and descent, and not to be strict and accurate in enumerating every individual person. This should teach us, not to be over curious in scanning the parts of this genealogy, much less capaciously to object against it. For if the evangelists were not critical and exact in composing this genealogy, why should we show ourselves so in examining of it?

Rather let us attend to the design of the Holy Ghost in writing of it, which was twofold; first, For the honor of our Savior, as man, showing who were his noble and royal progenitors according to the flesh.

Secondly, For the confirmation of our faith, touching the reality of our Redeemer’s incarnation. The scripture making mention of all his progenitors, from the first man Adam to his reputed father Joseph, will not suffer us to doubt either of the truth of his human nature, or of the certainty of his being the promised Messiah.

Learn hence, That he wisdom of God hath taken all necessary care, and used all needful means for satisfying the minds of all unprejudiced persons, touching the reality of Christ’s human nature, and the certainty of his being the promised Messiah; for both these ends is our Savior’s genealogy and descent recorded in the holy scriptures.