Portland Community College | Portland, Oregon Portland Community College

Essential LaTeX Commands for Mathematics Courses

Scope and Purpose:

This document focuses exclusively on LaTeX commands that can be used in Microsoft Word (with the Toggle TeX feature). Most of them can also be used in the learning management system D2L. The list is not exhaustive, but covers most commands that a student would need for 100- and 200-level mathematics courses. The commands are grouped by a general set of commands relevant to all courses.

Getting started

To type a single line expression in LaTeX, enclose it in dollar signs. For example, if we want to type 5x plus 3, we would type:

$5x+3$

The dollar signs are key, as they distinguish a LaTeX math expression from regular text. Without them, whatever you write is read as regular text.

To type a multiline expression in LaTeX, enclose it in an align environment. The Toggle Tex feature requires that this is itself placed inside dollar signs. Use the ampersand symbol to align each line. Use double backslash (\\) to create a new line. If we wanted to show the steps to solving 5x plus 3 equals 13, we would type:

$\begin{align}

5x+3&=13 \\

5x&=10 \\

x&= 2

\end{align}$

Note: If you turn this into MathType and then back into LaTeX, it might turn it into an array environment, which requires a stated number of columns. But don’t panic, it will change “align” to “array” and be followed by a stated number of columns. The equations can still be edited in the same way and converted back to MathType.

Note: If you use these commands inside an equation editor (either the MathType editor itself or one in D2L), you do not need to use dollar signs.

Symbols versus commands

\ always precedes symbols and commands.

Symbols are standalone, and do not require an argument. An example is \pi. We simply write:

$\pi$

Commands require one or more arguments after them, enclosed in curly braces. Examples are \sqrt. We would write:

$\sqrt{x}$

Symbols and commands relevant to introductory and intermediate algebra

Operation symbols

  • Multiplication: \cdot or \times
  • Division: \div

Exponents

  • Use the carat symbol: ^
  • If what you are placing in the exponent has more than one character, enclose it in curly braces. For 2 raised to the 10th power, we would type:

$2^{10}$

Fractions

  • Use the \frac command with the numerator and denominator enclosed in  curly braces. To type the fraction of a over b, type:

$\frac{a}{b}$

Radicals

  • The main command is \sqrt. To write the square root of 7, type:

$\sqrt{7}$

  • To write the 4th root of 7, type:

$\sqrt[4]{7}

Inequality symbols

  • Less than: <
  • Greater than: >
  • Less than or equal to: \le
  • Greater than or equal to: \ge
  • Not equal to: \neq

Sets

  • The curly braces are used to enclose expressions, and don’t appear as anything if typed directly. To get them to appear, use \{ and \}. To type the set containing the number 8, we would write:

$\{8\}$

  • We use a straight bar, |, for “such that”. To type the set of all x such that x is greater than 8, we would write:

$\{x|x>8\}$

  • The set of all real numbers can be written with \mathbb as:

$\mathbb{R}$

Intervals

  • Infinity: \infty
  • Union: \cup
  • Intersection: \cap
  • Examples:
    • The interval of all real numbers: $(-\infty,\infty)$
    • The interval of all numbers between -4 and 2, not including -4: $(-4,2]$

Stretching Parentheses and Braces:

  • When enclosing a tall expression in either parentheses, square brackets or set brackets, precede these symbols with \left or \right to stretch these to fit the expression inside them. To write the set containing the number one half, we would type:

$\left\{\frac{1}{2}\right\}$

Special characters:

  • Pi: \pi
  • e: e
  • dollar sign: \$
  • Curly brace: \{ or \}
  • Ampersand: \&

Additional symbols and commands for college algebra

Logarithms and exponential functions:

  • Use \log to typeset the log function as a function. If you simply type log, this will be read as the variables l, o, and then g. Use an underscore to denote a different base. To write log base 7 of 5, we would write:

$\log_7(5)$

  • Us \ln to typeset the natural log function.

Function Composition:

  • Symbol: \circ

Additional symbols and commands for trigonometry

Greek letters:

  • Lower case, such as lower case theta: \theta
  • Upper case, such as upper case beta: \Beta

Degree symbol:

  • There are packages that can be used, but more often using a carat and the \circ symbol. To type 75 degrees, we would write:

$60^{\circ}$

Trigonometric functions:

  • Sine: \sin
  • Cosine: \cos
  • Tangent: \tan
  • Secant: \sec
  • Cosecant: \csc
  • Cotangent: \cot
  • To type sine of 75 degrees, we would write:

$\sin(75^{\circ})$