It is unnecessary in the sense that you could say: "a friend of Matthew". But it's not wrong, either.
Note that, to a native speaker, "a friend of Matthew" sounds unnatural; this construction is not normally used with animate beings. We would normally say, "Matthew's friend" or "one of Matthew's friends". Or, indeed, "a friend of Matthew's".