Matthew was a Tax Collector, so it is logical to assume he was literate.
Too many ‘modernists’ make the assumption that because BOOKS were in short supply back in the day, that READING was also.
It was mentioned that Jesus wrote in the sand.
WHY? if none could read?