The gospel of Matthew is full of stories, parables, and events that help lead to an understanding of who Jesus is. The first chapter gives his genealogy. He does miracles, makes claims of divinity, and teaches his disciples until Peter finally admits in Chapter 16 that “You are the Christ, the Son of the living God.”
Even though very few could figure out Jesus’ identify, one expects that John the Baptist would know – he was there at his cousin’s momentous baptism; he had leapt in his mother’s womb when Mary showed up at his house. But in chapter 11, John sends a message from prison, asking if Jesus is REALLY the One.
Jesus response is very instructive about his view of scripture. He implicitly asks John what he expected to see and hear based on his reading of the Old Testament. His quote from Isaiah 8 says “this is what the Word said would happen, and your boys can tell you what is going on. Pretty good signs, heh?”
Then Jesus quotes additional scriptures in telling the crowd who John the Baptist is – a prophet, the messenger from Malachi, and the one who is pointing to the Kingdom of Heaven that Jesus is proclaiming.