Creating math blocks
You can insert a math block in three ways:- Type
$$followed by a space and press Enter - Type
:::mathand press Enter - Use the slash command menu (
/) and select “Math Block”
Math blocks render automatically as you type. If you see an error message, check your LaTeX syntax.
Basic operations
Arithmetic
Fractions
Use\frac{numerator}{denominator} for fractions:
Superscripts and subscripts
Advanced expressions
Square roots
Calculus
Derivatives:Greek letters
Lowercase:Trigonometry
Matrices and vectors
Vectors
Matrices
Determinants
Common mathematical expressions
- Algebra
- Calculus
- Statistics
- Linear algebra
Quadratic formula:Binomial theorem:
Formatting and styling
Text in equations
Use\text{} to include regular text:
Spacing
Control spacing with these commands:\,- thin space\:- medium space\;- thick space\quad- 1em space\qquad- 2em space
Alignment
For multi-line equations:Special symbols
Relations
Relations
\leq≤ (less than or equal)\geq≥ (greater than or equal)\neq≠ (not equal)\approx≈ (approximately equal)\equiv≡ (equivalent)\sim∼ (similar to)
Operators
Operators
\pm± (plus-minus)\mp∓ (minus-plus)\cdot· (multiplication dot)\times× (times)\div÷ (division)\nabla∇ (nabla/del)\partial∂ (partial derivative)
Set theory
Set theory
\in∈ (element of)\notin∉ (not element of)\subset⊂ (subset)\supset⊃ (superset)\cup∪ (union)\cap∩ (intersection)\emptyset∅ (empty set)
Logic
Logic
\forall∀ (for all)\exists∃ (exists)\neg¬ (negation)\land∧ (logical and)\lor∨ (logical or)\implies⇒ (implies)\iff⇔ (if and only if)
Real-world examples
Physics
Newton’s second law:Computer science
Big O notation:Economics
Compound interest:Engineering
Ohm’s law:Tips for writing equations
Preview as you type: Math blocks render in real-time. Watch the preview to catch syntax errors immediately.
Use brackets consistently: Matching brackets
{} are required for superscripts, subscripts, and fractions with multiple characters.Reference KaTeX documentation: For advanced symbols and commands, check the KaTeX support table.
Common errors and solutions
| Error | Cause | Solution |
|---|---|---|
| Missing closing bracket | Unmatched { or } | Count your brackets carefully |
| Undefined control sequence | Unknown command | Check command spelling or use alternative |
| Extra alignment tab | Wrong alignment syntax | Use \\ for line breaks, & for alignment |
| Missing $ inserted | Incorrect mode | Ensure you’re in a math block |
Exporting equations
When you export your note as Markdown, math blocks are preserved in standard LaTeX syntax:- GitHub (with certain limitations)
- Jupyter Notebooks
- R Markdown
- Academic publishing platforms
- Most LaTeX processors