Yes, he was from the house of David.
Matthew 22:41-42
While the Pharisees were gathered together, Jesus asked them, Saying, What think ye of Christ? whose son is he? They say unto him, The son of David.
"There is some dispute about Jesus' genealogy in Luke. Some Christians believe it is Mary's genealogy. Others believe it is Joseph's legal genealogy as opposed to his biological genealogy, since there was an adoption in Joseph's ancestry.
In any event, since Joseph was a faithful Jew, his marriage to Mary indicates that she also was of the house of David, since there was a law prohibiting marriage to a person from another ancestry. So Jesus was descended from David through both parents, fulfilling the requirement for inheritance of the throne through Joseph, and fulfilling the prophecy of being the seed of David through Mary."
WikiAnswers - Why was Jesus called Son of David
"Since the custom was of using male genealogies only, then how could an ancestral line of Jesus be shown through Mary?
--------------------------------------------------------------------------------
It appears that GOD left a convenient loophole in this law that would allow women to be included in the ancestral line if they met two stringent conditions...
1. Num 27:8, "Therefore, tell the Israelites; If a man dies without leaving a son, you shall let his heritage pass on to his daughter."
2. Num 36:6-7, "This is what the Lord commands with regard to the daughters of Salphahad: They may marry anyone they please, provided they marry into a clan of their ancestral tribe, so that no heritage of the Israelites will pass from one tribe to another, but all the Israelites will retain their own ancestral heritage."
--------------------------------------------------------------------------------
So now, all we have to show is that:
1. The father of Mary had no sons.
2. Mary married within her own tribe of Judah. Gen 49:8-12
--------------------------------------------------------------------------------
Regarding the first condition, did Mary have brothers?
We have no record of it. The Bible does not mention brothers, but it does say she had a sister.
John 19:25, "Now there were standing by the cross of Jesus his mother and his mother's sister, Mary of Cleophas, and Mary Magdalene." It is thought that the sister of Mary was Salome, the wife of Zebedee and the mother of James and John (Matthew 20:20, Mark 15:40)."
"Saint Matthew addressed his Gospel to the Jews, who followed the Law of Moses (Mosaic Law). He wrote the genealogy of Jesus Christ in Matt 1:1-17, and he was careful to meet the legal requirements of the Mosaic Law. His was of the Public Record as explained earlier. In it he begins with Abraham and shows the line going through David and then Solomon and all the way down to Jesus Christ. Remember in verse 16, "And Jacob begot Joseph, the husband of Mary, and of her was born Jesus who is called Christ." Matthew depicts Jesus Christ as "The Messiah".
Clearly Matthew said that the blood father (begot) of Joseph was Jacob. Matthew had satisfied the Mosaic Law by showing the male ancestry of Jesus by going through Joseph instead of Mary. Keep in mind that this genealogy shows the legal, or royal, or public record, of descent and not the human descent. "
Genealogy of Jesus through Mary