This is a reference to Psalm 110.
This verse plays on the special meaning of the word translated as "lord" when it is applied to the head of a family. Note that Jesus doesn't answer his own question nor does anyone ask him for an answer. Instead, Jesus simply makes it clear that on this central question of authority, the traditional Jewish viewpoints about the Christ and his authority were insufficient because the Christ did not get his authority from David, but the other way around.