The formula (a + b)2 = a2 + b2 + 2ab is in inline mode.
The same formula
(a + b)2 = a2 + b2 + 2ab
is in display mode.
The mark-up commands for various mathematical symbols can be found in the below links,
Remember: If you are using a mathematical symbol, do not forget to use an environment. If a symbol is used outside an environment, some undesired errors might be received.
University of Cincinnati Libraries
PO Box 210033 Cincinnati, Ohio 45221-0033