A patent protects an invention, which is an idea for an invention that exists on paper. Copyright protects the specific implementation of an idea.
Matthew would not be able to protect his algorithm with copyright alone. Someone else could implement the algorithm with a different program. This would not be a copyright violation, unless it copies the code verbatim from Matthew's program.
A patent, on the other hand, would protect the right to solve a problem in a specific manner. When Matthew obtains a patent on his algorithm, then nobody else is allowed to use that algorithm without Matthew's permission until the patent expired.
The problem, though, is that many jurisdictions do not recognize patents on software algorithms (the European Union, for example). So the patent would only be enforceable in jurisdictions which do.
For further information, check out the Wikipedia article on Software Patents.