Preview
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}Structures
Environments
Greek
Relations & operators
Type LaTeX math and watch it render as you go. Insert symbols and structures with a click, then copy the code or download the equation as an image.
Preview
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}Structures
Environments
Greek
Relations & operators
Maths inside a sentence goes between dollar signs: $E = mc^2$. A formula on its own line goes between \[ and \]. Use the equation environment when you want it numbered, and give it a \label so you can refer to it with \eqref.
The editor's Display switch shows the formula the way each form typesets: displayed maths uses larger operators and puts limits above and below sums and integrals.
The energy is $E = mc^2$.
\[
\int_0^1 x^2 \, dx = \frac{1}{3}
\]
\begin{equation}
e^{i\pi} + 1 = 0
\label{eq:euler}
\end{equation}
As \eqref{eq:euler} shows, ...\frac{a}{b} makes a fraction and \sqrt{x} a root (\sqrt[3]{x} for a cube root). Superscripts use ^ and subscripts _; wrap anything longer than one character in braces, as in x^{10}.
Sums, products, integrals and limits take their bounds as sub- and superscripts: \sum_{i=1}^{n}, \int_{0}^{\infty}, \lim_{x \to 0}. Write \, before dx for the thin space mathematicians expect.
Matrix environments come from amsmath: pmatrix uses parentheses, bmatrix brackets and vmatrix vertical bars for determinants. Separate entries with & and rows with \\.
cases builds a piecewise definition, with the condition after & on each line. Use \text{if } for words so they're set upright with normal spacing.
A = \begin{bmatrix}
1 & 0 \\
0 & 1
\end{bmatrix}For a derivation over several lines, use align in a document (or aligned inside a single formula, as here). Put & before the sign each line should line up on and end lines with \\. Every line of align is numbered; align* numbers none.
\begin{align}
(a + b)^2 &= (a + b)(a + b) \\
&= a^2 + 2ab + b^2
\end{align}Download the formula as SVG for a sharp result at any size (PowerPoint, Keynote, Google Slides and most design tools accept it), or as a high-resolution PNG where SVG isn't supported. Pick the colour first if your slides use a dark background.
amsmath and amssymb, which nearly every document loads. If you paste a formula into a document and get “Undefined control sequence”, add \usepackage{amsmath, amssymb} to the preamble.Samskrift is a collaborative LaTeX editor in your browser: these tools are built in, the PDF compiles next to your source, and your co-authors can type in the same file.
Create a free account