In the 1920's, Jan Lukasiewicz developed a formal logic system which allowed mathematical expressions to be specified without parentheses by placing the operators before (prefix notation) or after (postfix notation) the operands. For example, the (infix notation) expression
(4 + 5) × 6
could be expressed in prefix notation as
× 6 + 4 5 or × + 4 5 6
and could be expressed in postfix notation as
4 5 + 6 × or 6 4 5 + ×
Prefix notation also came to be known as Polish Notation in honor of Lukasiewicz. HP adjusted the postfix notation for a calculator keyboard, added a stack to hold the operands and functions to reorder the stack. HP dubbed the result Reverse Polish Notation (RPN) also in honor of Lukasiewicz.
In the years that followed, computer scientists realized that RPN or postfix notation was very efficient for computer math. As a postfix expression is scanned from left to right, operands are simply placed into a last-in, first-out (LIFO) stack and operators may be immediately applied to the operands at the bottom of the stack.