Algebraic Expressions

1 min read Last updated Mon May 25 2026 17:06:29 GMT+0000 (Coordinated Universal Time)

An algebraic expression XYX \ast Y is represented as a binary tree with:

  • Root: operator \ast
  • Left child: XX
  • Right child: YY

Unambiguous (unlike infix form without parentheses).

Forms

There are 3 common forms of algebraic expressions.

Infix form

The symbol is written in-between the operands. The form we usually use.

Example: xyx*y

Prefix form

Aka. Polish form. The symbol is written before the operands.

xyx*y’s prefix form is: xy* x y

Parentheses are not required. Start solving from right end.

Postfix form

Aka. reverse Polish form. The symbol is written after the operands. Used commonly when parsing algebraic expressions in calculators.

xyx*y’s prefix form is: xyx y *

Start solving from left end.

Was this helpful?