LaTeX Lab

A practice space where NAMSSN UI students can learn LaTeX from scratch, experiment with live maths, and grow into expert writers of integrals, series, matrices, and proofs.

How this lab works

LaTeX is the language mathematicians use to write clearly and precisely. This page is a dojo for mathematical writing:

  • • On the right: a live LaTeX editor and preview.
  • • On the left: structured “modules” with examples and practice prompts.
  • • Copy your best lines into the Problems hub, seminar slides, or assignments.
🌱Foundations Calculus & series 🧮Linear algebra ✒️Logic & proofs 📄Full documents

Students who patiently work through these modules and use LaTeX regularly in their solutions will become very strong, very quickly.

LaTeX Lab path
Choose a stage, study the slower explanations, then come back here to practise in the live editor.

🌱 Foundations & inline maths

For students who have never used LaTeX. Learn how to type symbols, inline formulas, displayed equations, and basic notation that appears in every UI course.

Best place to start Open foundations

Calculus, algebra & structure

A deeper walk through limits, integrals, sums, matrices, vectors, and piecewise definitions. Designed to sit next to your analysis, algebra, and ODE notes.

📄 Documents, theorems & slides

Full-document LaTeX: structuring articles, theorems and proofs, references, and Beamer slides for seminars, projects, and competitions like the ODE–Integration Bee.

For projects & talks Open documents & slides

Module 1 • Foundations Beginner

Start here if LaTeX is new for you. By the end of this module, you should be comfortable writing basic symbols in sentences and on separate lines.

1.1 Inline vs display maths

Use $ ... $ when the maths lives inside a sentence, and $$ ... $$ when the maths should sit on its own line.

Examples:

  • The function $f(x) = x^2$ is continuous.
  • $$f(x) = x^2 + 1$$
1.2 Superscripts & subscripts

Superscripts use ^, subscripts use _. For more than one character, wrap them in curly braces {...}.

  • x^2, \alpha_n, a_{n+1}, x^{2n+1}
1.3 Greek letters & basic symbols

Most Greek letters are written with a backslash and their name: \alpha, \beta, \gamma, \lambda, \pi, \sigma.

Some very common symbols: \infty, \leq, \geq, \neq, \mathbb{R}, \mathbb{N}.

Module 2 • Calculus & series Intermediate

For analysis, ODE, and the ODE–Integration Bee: fractions, limits, integrals, and series.

2.1 Fractions & roots

Fractions: \frac{numerator}{denominator}
Roots: \sqrt{x}, and \sqrt[n]{x}.

  • $$\frac{1}{1+x^2}$$
  • $$\sqrt{x^2+1},\quad \sqrt[n]{1+x}$$
2.2 Limits, derivatives, and integrals

Some standard patterns:

  • $$\lim_{x \to 0} \frac{\sin x}{x} = 1$$
  • $$f'(x) = \frac{d}{dx} f(x)$$
  • $$\int_0^1 x^n\,dx$$ (note the thin space \, before dx)
2.3 Sums & products

Summations and products:

  • $$\sum_{n=0}^{\infty} a_n x^n$$
  • $$\prod_{k=1}^{n} k = n!$$

Module 3 • Linear algebra Intermediate

For vectors, matrices, eigenvalues, and inner products.

3.1 Vectors & norms

Use bold or arrows for vectors, and double bars for norms:

  • $\mathbf{v} = (v_1,\dots,v_n)$
  • $\langle x, y \rangle = \sum_{i=1}^n x_i y_i$
  • $\|x\| = \sqrt{\langle x, x \rangle}$
3.2 Matrices

A common environment is pmatrix (parentheses matrix):

\begin{pmatrix}
a & b \\
c & d
\end{pmatrix}

Module 4 • Logic & proofs Advanced

For writing clean proofs: quantifiers, implication, align, and piecewise definitions.

4.1 Quantifiers & implication

Some useful symbols:

  • \forall x \in \mathbb{R} (for all)
  • \exists \varepsilon > 0 (there exists)
  • A \implies B, \quad A \iff B
4.2 Align environment for multi-line work

Use align to line up equal signs and make derivations easy to read:

\begin{align}
f(x) &= x^2 + 1 \\
     &= (x+1)^2 - 2x
\end{align}
4.3 Piecewise definitions

Piecewise functions are written with cases:

f(x) =
\begin{cases}
  0, & x < 0, \\
  x^2, & x \ge 0.
\end{cases}

Module 5 • Full documents Advanced

For full reports or project texts. This lab page cannot compile full PDFs, but you can copy these templates to Overleaf or your own LaTeX setup.

5.1 Minimal document template
\documentclass[11pt]{article}
\usepackage{amsmath,amssymb,amsthm}

\begin{document}

\title{Sample Notes}
\author{Your Name}
\date{}
\maketitle

\section{Introduction}
This is where your text begins. Inline maths like $f(x)=x^2$ and 
displayed equations like
\[
\int_0^1 x^n\,dx = \frac{1}{n+1}.
\]

\end{document}
5.2 Theorems and proofs (with amsthm)
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}

\begin{theorem}
Let $f$ be continuous on $[a,b]$. Then $f$ is bounded.
\end{theorem}

\begin{proof}
Sketch your proof here, step by step.
\end{proof}

Copy this into a full document to practise writing proper theorem/proof environments.

Live LaTeX editor

Type in the editor. The preview shows the rendered mathematics. Treat this as your sandbox for all problems and solutions.

Load an example:
Quick inserts
Patterns:
Editor
Use $...$ for inline maths and $$...$$ or \[...\] for displayed equations. Write as if you are preparing a solution for the Problems page.
You can copy this text directly into Overleaf, your notes, or a solution on the Problems hub.
Preview (MathJax)
Type LaTeX in the editor above and your maths will appear here.

Quick cheatsheet (most used commands)

Symbols

  • \alpha, \beta, \gamma, \lambda, \pi
  • \leq, \geq, \neq, \approx
  • \in, \subset, \subseteq, \supset
  • \mathbb{R}, \mathbb{N}, \mathbb{Z}

Structures

  • \frac{a}{b}, \sqrt{x}, \sqrt[n]{x}
  • \sum_{n=0}^{\infty}, \prod_{k=1}^n
  • \int_a^b f(x)\,dx
  • \begin{pmatrix} ... \end{pmatrix}

Logic & sets

  • \forall, \exists
  • \implies, \iff
  • A \cup B, A \cap B
  • |A|, \#A (cardinality)

Proof structure

  • \begin{align} ... \end{align}
  • \begin{cases} ... \end{cases}
  • \text{...} for words inside maths
  • Full documents: see Module 5 above.