Math Equations
Write beautiful mathematical equations using LaTeX/KaTeX notation in MD Editor.
Overview
MD Editor uses KaTeX for fast, high-quality mathematical rendering. You can write inline equations and display (block) equations using LaTeX syntax.
Inline Math
Use single dollar signs for inline equations within text.
Example syntax:
Display Math
Use double dollar signs for display equations (centered on their own line).
Example syntax:
Common Mathematical Notation
Superscripts and Subscripts
Fractions
Square Roots
Greek Letters
Operators
Complex Equations
Quadratic Formula
Matrix
System of Equations
Integral
Summation
Try writing math equations →Advanced Features
Aligned Equations
Multi-line Equations
Matrices with Different Brackets
Parentheses:
Brackets:
Braces:
Vertical bars:
Mathematical Symbols
Comparison Operators
Set Notation
Logic Symbols
Arrows
Text in Math Mode
Use the text command for text within equations:
Spacing in Math
Control spacing with these commands:
- Thin space:
\, - Medium space:
\: - Thick space:
\; - Quad space:
\quad - Double quad space:
\qquad
Example:
Special Functions
Accents and Decorations
Large Operators
Tips for Writing Math
- Use display mode for important equations - Makes them stand out
- Keep inline math simple - Complex expressions work better in display mode
- Use proper notation - Follow mathematical conventions
- Add context - Explain variables and symbols
- Test rendering - Preview your equations as you write
Common Pitfalls
Escaping Special Characters
If you need to use literal dollar signs in text, escape them with a backslash.
Example: The price is \$100
Curly Braces
Use backslash-escaped braces for literal braces in math.
Example: $\{x : x > 0\}$
KaTeX Support
MD Editor uses KaTeX for fast math rendering. Most LaTeX math commands are supported. For a complete reference, see the KaTeX documentation (opens in a new tab).
Examples from Different Fields
Physics - Newton's Law of Universal Gravitation
Statistics - Standard Deviation
Calculus - Fundamental Theorem of Calculus
Quick Reference
Common LaTeX commands for math:
- Superscript:
^ - Subscript:
_ - Fraction:
\frac{numerator}{denominator} - Square root:
\sqrt{x}or\sqrt[n]{x} - Sum:
\sum_{lower}^{upper} - Integral:
\int_{lower}^{upper} - Product:
\prod_{lower}^{upper} - Limit:
\lim_{x \to value} - Partial derivative:
\frac{\partial f}{\partial x} - Infinity:
\infty - Greek letters:
\alpha,\beta,\gamma, etc.