Typing Mathematics Online

You may wish to enter mathematical expressions in some of your comments on this website, on other websites, or a variety of supported applications. This is often possible if you use a variation of the \(\LaTeX\) mathematical typesetting commands to enter your equations. For example, to enter the fraction \(\frac{a}{b}\) you can type


\(\LaTeX\) commands for mathematical expressions are always inserted between starting and ending tags (here they are \( and \), respectively). Mathematical expressions can be entered in two different “modes”: inline mode is used for expressions that are the same height as a normal line of text, and display mode is used to create larger expressions that usually appear on a separate line. To enter expressions in display mode, use the tags \[ and \] instead.

\(\LaTeX\) is a very powerful typesetting language, so there’s a lot to learn! Here are a few basic commands.

  • Superscripts are entered using ^ and subscripts with _, so \(x^2\) is entered as x^2. Be careful, though, if you want items to be grouped. Typing x^3y produces \(x^3y\), not \(x^{3y}\). To get \(x^{3y}\) you need to use brace brackets, { and }, to indicate your intended grouping. So, \(x^{3y}\) is created using x^{3y}.
  • Integrals are entered using \int, and the upper and lower limits are entered using ^ and _ respectively. So, \int_0^\infty produces \(\int_0^\infty\). Similarly, sigma notation is entered using \sum, so \sum_{n=1}^\infty produces \(\sum_{n=1}^\infty\). Notice that brace brackets were needed here.
  • As seen in the first example, fractions are entered using \frac{}{}, with the numerator entered in the first set of brace brackets, and the denominator in the second. So, \frac{1}{n^2} produces \(\frac{1}{n^2}\).

\(\LaTeX\) commands for mathematical expressions are supported on a number of different websites, so it’s useful in other places as well. For example, to enter \(\LaTeX\) in Edmodo use

[math] … [/math]

instead of

\( … \).

Be careful, though, when you’re entering \(\LaTeX\) commands between these math tags—\(\LaTeX\) commands always involve the backslash (\) rather than the forward slash (/)!

If you want to know how to enter any other mathematical symbols or expressions, just let me know in a comment below.

Installing \(\LaTeX\) on Your Computer

While there are some online websites that allow you to create \(\LaTeX\) documents, the best way to start working with \(\LaTeX\) is to install it on your computer (which then gives you access to the full set of features \(\LaTeX\) provides).

\(\LaTeX\) is a typesetting system, and to create and edit \(\LaTeX\) documents, you’ll need to use a \(\LaTeX\) editor.

Mac Installation

If you’re on a Mac, everything you need is included in the MacTeX distribution, which you can download here (with installation instructions included on the linked page). This installation includes the \(\LaTeX\) editor TeXShop, which is what you’ll use to create your \(\LaTeX\) documents.

Windows Installation

If you’re on Windows, you can use the MiKTeX distribution, which you can download here (with installation instructions provided here). This installation contains the \(\LaTeX\) editor TeXworks, which is what you’ll use to create your \(\LaTeX\) documents.

Next Steps

Once you’ve got  \(\LaTeX\) installed and running, many of your next questions are likely to be answered in this introductory document.

5 Replies to “Typing Mathematics Online”

  1. Here’s a comment that contains some mathematics! \[\sum_{n=1}^\infty \frac{1}{n^2}\]

    The code used to produce this is \[\sum_{n=1}^\infty \frac{1}{n^2}\]

  2. If you need to enter a vector equation, something like \[\vec{r}=\lambda \begin{pmatrix} 1\\2\\-3\end{pmatrix} +\begin{pmatrix}2\\-2\\1\end{pmatrix}\]

    The code used to produce this is \[\vec{r}=\lambda \begin{pmatrix} 1\\2\\-3\end{pmatrix} +\begin{pmatrix}2\\-2\\1\end{pmatrix}\]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.