Basic Math Symbols

We will begin our adventures in math mode with some objects which require only a single character or command.

We saw some of these symbols in the Pythagorean Theorem and in Euclid's Division Lemma.

As with text, most math can be typed "as usual" - that is the numbers, letters, and symbols found on your keyboard can all be used in math mode. However, using LaTeX makes a few more tools available to us, which we will see below.

Operations

Addition and subtraction symbols with commands.

Addition and subtraction

The plus sign (+) and the minus sign (-) can be typed as usual.

The "plus or minus" sign (±) is obtained with the command \pm (plus or minus).

Multiplication and division

A dot to represent multiplication can be obtained with the command \cdot (center dot).

The division symbol can be obtained with the command \div.

Multiplication and division symbols with commands.
LaTeX offers a variety of dot arrangements.

Exercise 4.2.1

Add a dot for multiplication to the equation from the Division Lemma that you typeset in the previous section, a = bq + r.

Solution 4.2.1

Add the command \cdot between b and q,

\[a = b\cdot q + r\]

Note in particular that you must include a space between \cdot and q. Otherwise, q will be read as part of the command, you will get an error message, and neither a dot nor the variable q will display in the preview.

Exponents.

Exponents

The caret symbol, ^, puts the character immediately following in superscript.

What if we need more than one character in an exponent?

For example, try typing x to the tenth power by adding the code

\( x^10 \)

to your project. What happens when you compile the preview?

The exponent only includes the first character after the caret, in this case the number 1. The number 0 remains down on the main line.

In order to include more than one character in an exponent, we must group them together using curly braces.

Exercise 4.2.2

Correct the code given above, so that x to the tenth power displays properly.

Solution 4.2.2

Add curly braces around 10:

\( x^{10} \)

Note that while it is possible to skip the braces when your exponent is a single character, it is good practice to always use them. This can make the code itself more readable.

Relations

Equality and friends

The "equals" sign (=) can be typed as usual.

The "does not equal" sign (≠) can be rendered with the command \neq (not equal).

The "approximately equals" sign (≈) can be obtained with the \approx command.

equality, non-equality, and approximation signs with commands.

Comparisons

Comparison symbols with commands.

The strictly less than (<) and strictly greater than (>) signs can be typed as usual.

Non-strict inequalities are typeset with similar commands.

"Greater than or equal to" (≥) can be obtained with the command \geq (greater or equal).

"Less than or equal to" (≤) is obtained with the command \leq (less or equal).

Greek letters

Finally, we come to another set of symbols often used for variables and constants - the Greek alphabet.

Any lowercase Greek letter is rendered by a backslash followed by the letter name (in all lowercase). For example, the constant π is typeset with \pi.

The uppercase version of a Greek letter is obtained by capitalizing the first letter of the letter name in the command. For example, the uppercase Π would be typeset with \Pi.

Uppercase and lowercase pi, with commands.

Exercise 4.2.3

Typeset the Greek letter sigma in lowercase (σ) and uppercase (Σ).

Solution 4.2.3

Lowercase sigma is typed as

\sigma

and uppercase sigma is typed as

\Sigma

Remember, only the first letter of the letter name should be capitalized. Capitalizing all of the letters in the command will result in an error message.

Detexify

If you forget the command for a particular symbol, the website Detexify (http://detexify.kirelabs.org/classify.html) can help.

Draw the symbol in the box provided, and a list of potential matches is generated on the right, along with their commands and (if needed) any special package the symbol belongs to.

The commands we have learned so far are summarized in the table below.

On the next page, we will review what we've learned about math mode with a short quiz.