The purpose of a patent is not to "reward inventors for their work". The purpose of patents is "To promote the Progress of Science and useful Arts". The do this by creating time-limited monopolies. If you create a new widget-building-machine, people who make widgets the old fashioned way are not affected. They can continue to do so, although at a disadvantage (less efficient, more costly, whatever). If you patent an abstract mathematical idea, like division, or sum, no one else can use that until the patent expires, hurting "the Progress of Science"