A LaTeX math cheat sheet
Superscripts and subscripts. ^ raises and _ lowers the one character or {group} right after it. x^2 is x squared and a_n is a sub n, but anything longer needs braces: x^{10}, e^{-x}, a_{ij}. You can put both on one symbol, as in x_i^2, and nest them, as in e^{x^2}.
Fractions and roots. \frac{a}{b} puts a over b, and each group can hold anything, including another fraction. Inside a line of text fractions shrink; \dfrac keeps them full size. \sqrt{x} is a square root and \sqrt[3]{x} a cube root. The quadratic formula the editor opens with, x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}, is a fraction holding a square root, with \pm for plus or minus.
Greek letters. Type the letter's name after a backslash: \alpha, \beta, \theta, \lambda, \pi, \sigma, \omega. Capitalize the name for the capital letter, as in \Delta or \Sigma. Capitals that look like Latin letters, such as capital alpha, have no command in standard LaTeX, so type A. Two letters have a second shape you may know better: \varepsilon and \varphi.
Sums, integrals and limits. \sum_{i=1}^{n} i^2 is a sum with its range, \int_{0}^{1} x^2 \, dx a definite integral, and \lim_{x \to 0} \frac{\sin x}{x} a limit. In display mode the range sits above and below the sum; inline, it moves to the side to save height. Write \sin, \cos, \log and \ln with their backslashes so they print upright, the way function names should, instead of as italic letters multiplied together.
Matrices, cases and aligned working. Inside an environment, & separates columns and \\ ends a row. \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} is a 2 by 2 matrix in parentheses; bmatrix uses square brackets and vmatrix vertical bars for a determinant. A piecewise function uses cases: |x| = \begin{cases} x & \text{if } x \ge 0 \\ -x & \text{if } x < 0 \end{cases}. For working shown line by line, put & before each equals sign so they line up: \begin{aligned} 2x + 3 &= 11 \\ 2x &= 8 \\ x &= 4 \end{aligned}.
Words and spacing. Math mode ignores the spaces you type and sets letters in italics, so words go inside \text{}, with any space you want inside the braces: \text{if }. To add space yourself, use \, for a thin space (the one before dx), \: and \; for medium and thick spaces, \quad and \qquad for one and two em, and \! to pull two things a thin space closer.
Getting equations into Word, Google Docs, PowerPoint and Notion
Word. Click Copy MathML and paste into your document. Word recognizes MathML on the clipboard and turns it into a native equation you can click into and keep editing. Word for Microsoft 365 can also take LaTeX directly: press Alt+= to start an equation, choose LaTeX on the Equation tab, paste, then pick Convert, Professional. Microsoft's LaTeX mode doesn't support \begin and \end environments, though, so for matrices, cases and aligned working, MathML is the route that keeps the structure.
PowerPoint. PowerPoint takes the same MathML paste, so copy MathML and paste it onto the slide. Microsoft's documentation says Word is the only Office app that accepts LaTeX input, which is why pasting the LaTeX itself into a PowerPoint equation gets you nowhere. If you won't need to edit the equation later, the PNG works too.
Google Docs and Slides. Neither turns pasted LaTeX or MathML into an equation, so add yours as a picture: download the PNG and use Insert, Image, Upload from computer, or click Copy image and paste. The PNG is drawn at four times its on-screen size, so it stays sharp when you resize it. Keep the background transparent on a white page; switch it to white if the slide behind is dark or colored, so the black math stays readable.
Notion and Overleaf. Both read LaTeX, so copy the LaTeX itself. In Notion, type /math for a block equation and paste it in, or wrap it in double dollar signs inside a line of text. Notion renders math with KaTeX, the same library this editor uses, so commands that work here should work there too. In Overleaf or any .tex file, paste it between \[ and \] for a displayed equation, or between single dollar signs inside a sentence. Environments such as pmatrix, cases and aligned need \usepackage{amsmath} in the preamble, and \mathbb needs amssymb.
Six mistakes that break LaTeX math
Most broken equations come down to a handful of mistakes. The editor explains each in plain words and marks where it happened, so you fix the cause rather than the symptom.
Unbalanced braces. Every { needs a }. Type \frac{1}{2 and the editor marks the { at character 9, the one that never closes, rather than the end of the line where KaTeX gave up. A stray } with no opening brace is the same mistake the other way round.
A missing backslash. frac{1}{2} isn't an error, which makes it worse: it prints the letters f, r, a and c in italics. sin x has the same problem and should be \sin x. The editor flags common command names typed without their backslash and offers a one-click fix. A misspelled command, like \alpah, does stop the render, with the error "Undefined control sequence". The editor suggests the closest real one, \alpha.
Exponents longer than one character. x^10 renders as x to the first power followed by a 0, because ^ takes only the next character. Write x^{10}. The same rule catches e^-x, which raises only the minus sign; you want e^{-x}. Neither raises an error, so the editor points them out instead.
An & outside an environment. The ampersand only means something inside aligned, cases, a matrix or an array, where it separates columns. Anywhere else it's an error. Wrap your lines in \begin{aligned} ... \end{aligned}, or, if you meant the symbol itself, type \&.
Unmatched pairs. \left( needs a \right), and \begin{pmatrix} needs \end{pmatrix} with exactly the same name. If you want a bracket on one side only, close with \right. (a full stop), which draws nothing. When an environment is left open, the editor names it and marks where it began.
Double superscripts. x^2^3 is ambiguous, so LaTeX refuses it. Braces say which you mean: {x^2}^3 is x squared, then cubed, which is x to the 6th, while x^{2^3} is x to the 8th.