Write Math Equations
You can write equations in a note with LaTeX syntax. There are two kinds: inline equations that sit inside a sentence, and block equations that take a full line.
- Inline equation: for variables or short expressions inside a sentence.
- Block equation: for important or multi-line equations shown large and centered.
The fastest way
Wrap an expression in $ while typing and it turns into an equation right away.
- For an equation inside a sentence, use one
$on each side, such as$x^2$. - For an equation on its own line, use
$$, such as$$E = mc^2$$.
💡 Tip: If you type a
$$equation after some text, the text stays where it is and the equation goes into a block below it.
✋ Note: An inline equation is not created when there is a space just inside the
$. That is why prices such as$5 and $10stay as plain text.
Insert an equation from the menu
- Type
/mathon an empty line. - Choose
Equation (TeX)for a block equation, orInline equationfor one inside a sentence.
You can also insert an inline equation with Ctrl+Shift+E (⌘+Shift+E on Mac). If text is selected, the selected text becomes the equation.
Edit a block equation
- Type LaTeX in the box on the left. The result appears on the right as you type.
- Click the eye icon to close the box and show only the equation.
- Click the pencil icon to edit it again.
Edit an inline equation
- Click the equation to open its input box and preview.
- Change the LaTeX and press
Enterto save. - Press
Escto discard your changes and close.
Turn existing text into an equation
- Select the text written in LaTeX.
- Click
Turn intoin the top toolbar. - Choose
Convert to inline equationto convert only the selected text. - Choose
Convert to block equationto turn the whole paragraph into a block equation.
Common LaTeX
Copy any of these and place it between $ signs.
- Fraction:
\frac{a}{b} - Superscript and subscript:
x^2,x_{ij} - Root:
\sqrt{x},\sqrt[3]{y} - Greek letters:
\alpha,\beta,\theta,\pi - Sum and integral:
\sum_{i=1}^{n} i,\int_0^1 x^2 \, dx - Limit:
\lim_{x \to 0} f(x) - Comparison:
a \leq b,a \neq b,a \approx b - Multiply and divide:
a \times b,a \div b,\pm - Percent:
30\% - Plain text:
\text{speed} = \frac{\text{distance}}{\text{time}}
💡 Tip: Use braces when a superscript or subscript has more than one character. Type
x^{10}, notx^10.
Multi-line equations
Use a block equation for multiple lines. Use \\ for a new line and & to align columns.
- Cases:
f(x) = \begin{cases} x & (x \geq 0) \\ -x & (x < 0) \end{cases} - Matrix:
\begin{pmatrix} a & b \\ c & d \end{pmatrix} - Aligned equals signs:
\begin{aligned} (a+b)^2 &= (a+b)(a+b) \\ &= a^2 + 2ab + b^2 \end{aligned}
Frequently Asked Questions (FAQ)
My equation appears in red.
When the LaTeX is not valid, what you typed is shown in red. Check for an unclosed brace or a misspelled command.
Can I use equations inside a table?
No. Inside a table, typing $ or using the shortcut does not create an equation.
Can I use every LaTeX command?
No. Equations are displayed with KaTeX, so some commands are not supported. For example, the chemistry command \ce is not available, and \tag{1} for equation numbers works only in block equations.
Can I use equations on mobile?
Yes. You can wrap an expression in $ or use the /math menu, and tap an inline equation to edit it.