Formula guide

Markdown Math Formulas: LaTeX Syntax, Symbols, and Examples

Type formulas in MarkIOY’s source pane and check the result immediately in the visual pane. Start with the two delimiters, then build up LaTeX commands, structure, and a dependable way to debug them.

MarkIOY Team · August 10, 2026 · 15 min read

Need headings, lists, links, and the rest of the format first? Read the Markdown guide.

Remember two forms: $...$ for inline math and $$...$$ for a standalone formula. Math is a Markdown extension, so display depends on the renderer. MarkIOY previews common LaTeX expressions with KaTeX: edit the source, then confirm the result in the visual pane.

Choose the right math delimiters and layout

Inline math belongs inside a sentence, so it works well for variables, short equations, and a few symbols. Block math occupies its own paragraph, which makes fractions, integrals, matrices, and multi-line content easier to read. Put each block delimiter on its own line and leave a blank line around the block when you can.

Markdown source
The area of a circle is $A = \pi r^2$.
MarkIOY preview

The area of a circle is .

Markdown source
$$
\int_a^b f(x)\,\mathrm{d}x = F(b) - F(a)
$$
MarkIOY preview

Do not put a formula inside backticks or a fenced code block; that displays the source literally. MarkIOY reliably recognizes $...$ and $$...$$. It does not treat \(...\), \[...\], or a bare \begin{...} as math.

Build expressions with exponents, fractions, and roots

PurposeWriteWhat it does
Superscriptx^2, x^{n+1}Use braces whenever the exponent has more than one character
Subscripta_i, a_{i,j}_ creates a subscript; group multi-character indexes
Fraction\frac{a}{b}One braced group for the numerator and one for the denominator
Root\sqrt{x}, \sqrt[n]{x}Put an optional root index in brackets and the radicand in braces
Binomial coefficient\binom{n}{k}Shows the conventional choose notation
Markdown source
$$
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$
MarkIOY preview

Braces {} group multiple characters. Think of x^n+1 as (x^n)+1; write x^{n+1} when the whole n+1 must be the exponent.

Use symbols, functions, and sets semantically

A backslash \ starts a LaTeX command. If another letter immediately follows a command name, insert a space or braces when needed so it is not read as one longer command.

CategoryUseful commandsTypical use
Greek letters\alpha \beta \gamma \theta \lambda \pi \sigmaParameters, angles, probabilities, and sums
Uppercase Greek\Gamma \Delta \Theta \Lambda \Pi \Sigma \OmegaSets, changes, and matrices
Operators and relations\times \cdot \div \pm \ne \le \geArithmetic, signs, and comparisons
Sets and logic\in \notin \subseteq \mathbb{R} \forall \existsMembership, real numbers, and quantifiers
Arrows and reasoning\to \Rightarrow \iffLimits, implication, and equivalence
Functions and operators\sin \cos \log \ln \max \operatorname{Var}Upright function names and custom word operators
Markdown source
$$
\sum_{i=1}^{n}\alpha_i = 1, \qquad
\lim_{x\to0}\frac{\sin x}{x} = 1, \qquad
\int_0^1 x^2\,\mathrm{d}x = \frac{1}{3}
$$
MarkIOY preview

Prefer semantic commands such as \sin rather than typing sin. For a multi-letter operator of your own, use \operatorname{Var}(X) to preserve upright letters and natural spacing.

Control brackets, text, and spacing

Plain parentheses are fine for small content. When an expression grows vertically, pair \left and \right to stretch the delimiters. Braces are grouping characters in LaTeX, so write \{ and \} when you want visible braces.

Markdown source
$$
\left(\frac{a}{b}\right), \qquad
\left\{x \middle| x > 0\right\}, \qquad
\langle u, v \rangle
$$
MarkIOY preview

Use \text{if } for short prose in a formula, and \mathrm{d}x for an upright unit or differential. These spacing commands cover most situations:

CommandEffectCommon use
\,Small spacex\,\mathrm{d}x in an integral
\;Wider spaceA light separation inside an expression
\quad, \qquadLarge spacesPlace several expressions side by side
\!Negative spaceFine adjustment only; use sparingly

Write matrices, cases, and aligned equations

Put larger structures inside $$...$$. In matrices and cases, & separates columns and \\ starts a new row; keep the same column count in each row. For several lines of algebra, use aligned and place &= at each equals sign.

Markdown source
$$
A = \begin{bmatrix}
a & b \\
c & d
\end{bmatrix}
$$
MarkIOY preview
Markdown source
$$
f(x) = \begin{cases}
x^2, & \text{if } x \ge 0 \\
-x, & \text{if } x < 0
\end{cases}
$$
MarkIOY preview
Markdown source
$$
\begin{aligned}
y &= mx+b \\
  &= m(x-x_0)+y_0
\end{aligned}
$$
MarkIOY preview

Use aligned rather than align: align does not render in current MarkIOY. Break long equations and wide matrices into readable parts, then check them again on mobile and in exported PDF.

Handle escaping, compatibility, and current limits

Both Markdown and LaTeX assign special meanings to characters, so distinguish ordinary text from formula content. Braces usually group content inside a formula, while a dollar sign in prose can accidentally form math when it is paired with a later $.

You need to showRecommended sourceWhy
A literal priceThe price is \$100$100$ is interpreted as math
Visible braces\{x \in \mathbb{R}\}{} normally groups formula content
Percent, hash, ampersand\%, \#, \&LaTeX commands display the literal characters
A backslash\backslashAvoids starting an unintended command
A dollar sign inside math$\text{USD }100$The dollar-delimited parser cannot handle a $ inside formula content, even \$
MarkIOY does not currently provide automatic equation numbers or cross-formula references. Do not rely on \tag, \label, \ref, or \ce as portable features. A \newcommand can work within the formula that defines it, but it is not retained by the next formula. For sharing, export HTML/PDF or preview again in the final destination.

Use a stable workflow and fix errors quickly

  1. Wrap the smallest possible expression in $...$ or $$...$$, then add commands gradually
  2. Group multi-character exponents, indexes, numerators, denominators, and radicands with braces
  3. Use aligned for long equations; give every matrix row the same number of & separators
  4. Check the visual preview after each change, then verify the exported HTML/PDF or final publishing platform
  5. Keep the Markdown source instead of preserving the formula only as an image

The formula is displayed as plain text

Make sure it is enclosed by $...$ or $$...$$, not backticks or a code fence. \(...\) and \[...\] are not parsed as math in MarkIOY.

The preview is incomplete or red

Check that dollar signs, braces, and \begin{...}/\end{...} pairs all match. In matrices and cases, make sure each row has the same number of & separators. MarkIOY keeps an invalid formula visible instead of interrupting editing, so you can fix the source directly.

The formula works in MarkIOY but not where I share it

Math is a Markdown extension, and renderers vary by platform and configuration. If the destination has no math support, send the exported HTML/PDF or verify the syntax there first.

Try a formula in MarkIOY

Open source view and paste any example from this guide. The visual document updates immediately. When you are done, download Markdown or standalone HTML, or print and save as PDF.

Open MarkIOY Web →