Introduction to LaTeX

Learning LaTeX is something every undergraduate mathematics major should do early in their career.

LaTeX is a typesetting system for mathematics (and other things), universally used in graduate school and beyond. Forget equation editors in word processors, with their infuriatingly incomplete symbol lists and click-through menus! Forget having to scratch out wrong answers, or having your grader complain about your handwriting. LaTeX is the fastest and prettiest way to produce typeset PDF math homework, once you tough out the short but steep learning curve right at the beginning. It takes one hour, and I’m here to show you how.

To use LaTeX you have many options, but the easiest quick start is Overleaf. At the end of this post you’ll find the source for the tutorial, in case you are installing it on your own computer.

This tutorial is aimed at an undergraduate discrete mathematics or introduction to proofs course (in terms of the examples in the document), but could be used anywhere in the undergraduate curriculum.

Get Started!  (Open the tutorial on Overleaf and watch the accompanying video)

Open up this interactive LaTeX lesson/document and then watch the video below to accompany your exploration!

Further Details and Guide

Here’s a quick reference guide to have handy along with the intro above, once you’ve got yourself into some latex editing software and have a document open.

To add an equation to your latex document, as a separate line, you surround your math with a double $ at the beginning and at the end. So, you write


You can use symbols like + x – and for exponents you can write ^. For subscripts you can use _. So for example,

$$ x^2y_3+6=z_2^7 $$



You can also write fractions this way:

$$ \frac{a}{b} $$



You can make an integral like this:

$$ 2\pi \int_a^b f(x) dx $$


2 \pi \int_a^b f(x) dx

You can make a sum, and limits, like this:

$$ \lim_{N \rightarrow \infty} \sum_{i=1}^{N} \frac{1}{i} = \infty $$


\lim_{N \rightarrow \infty} \sum_{i=1}^{N} \frac{1}{i} = \infty

Here’s a real pro tip: if you want your math inline, use $ and $ (single dollars) to surround it. So for example,

I was trying to evaluate $ \lim_{N \rightarrow infty} \sum_{i=1}^{N} \frac{1}{i} = \infty $ when a pig flew.


I was trying to evaluate \lim_{N \rightarrow \infty} \sum_{i=1}^{N} \frac{1}{i} = \infty when a pig flew.

Finally, you can make a matrix this way:

$$ \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix} $$

and you’ll get

\begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}

If you have a symbol in mind and want to know the latex for it, draw it in the “deTexifyer”:

For a browsable list of lots of math symbols you can use, see

If you install LaTeX yourself (the internet can help you do this), you may want the PDF and source (tex) files for my tutorial, which are here: