Upvote:7
This anecdote is quite common, many versions do not have "expel him", and it is more frequently associated with Euclid rather than Plato. Which is more natural. After all Plato did not teach mathematics, and no mathematical discoveries are credited to him. He discussed mathematics in some of his dialogues, like Theaetetus. "Platonic solids" are named after him, but it was Theaetetus who classified them.
It is not possible to tell whether the story was invented or Euclid or Plato or some other mathematician really said something like this. In fact we know next almost nothing about Euclid, except a couple of anecdotes like this.