LaTeX & MathJax basic tutorial – Symbols & Cases

Symbols

In general, you have to search in long tables about a specific symbol you’re looking for, things like $\Psi$, $\delta$, $\zeta$, $\ge$, $\subseteq$ … And it turns out that this operation can be frustrating and time consuming, which can cause the buddy to abandon writing the complete $\LaTeX$ sentence in his answer, or in some cases, the complete answer itself.

That’s why the tool that I will present you in this post was conceived. Basically, it is a $\LaTeX$ handwritten symbol recognition. Example in image:

enter image description here

Here is the website: Detexify²
No more frustration.

Definitions by cases (piecewise functions)

Use \begin{cases}…\end{cases}. End each case with a \\, and use & before parts that should be aligned.

For example, you get this:

$$f(n) =
\begin{cases}
n/2, & \text{if $n$ is even} \\
3n+1, & \text{if $n$ is odd}
\end{cases}$$

by writing this:

The brace can be moved to the right:
$$
\left.
\begin{array}{l}
\text{if $n$ is even:}& n/2\\
\text{if $n$ is odd:}& 3n+1
\end{array}
\right\}
=f(n)
$$
by writing this:

To get a larger vertical space between cases we can use \\[2ex] instead of \\. For example, you get this:

$$f(n) =
\begin{cases}
\frac{n}{2}, & \text{if $n$ is even} \\[2ex]
3n+1, & \text{if $n$ is odd}
\end{cases}$$

by writing this:

(An ‘ex’ is a length equal to the height of the letter x; 2ex here means the space should be two exes high.)

Leave a Reply

Your email address will not be published. Required fields are marked *