Rhizome
NotesArticlesTagsGraphEditor

Built with Rhizome — A static personal notes system

  1. Home
  2. /Notes
  3. /Mathematical Notation

Mathematical Notation

2026-02-12· 3 min read· 557 words

Write mathematical equations using LaTeX syntax with KaTeX rendering.

#guide#math#latex#diagrams

Table of Contents

  • Inline Math
  • Block Math
  • Common Formulas
  • Calculus
  • Linear Algebra
  • Probability
  • Physics
  • Greek Letters
  • Syntax Reference
  • Practical Examples
  • Compound Interest
  • Machine Learning - Gradient Descent
  • Shannon Entropy
  • Fourier Transform
  • Commutative Diagrams
  • CD Syntax Reference

Mathematical Notation

Rhizome supports mathematical notation using LaTeX syntax, rendered with KaTeX. Both inline and block math are supported.

Inline Math

Wrap LaTeX in single dollar signs for inline equations:

The famous mass-energy equivalence E=mc2E = mc^2E=mc2 shows that energy and mass are related.

Other examples:

  • The quadratic formula: x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}x=2a−b±b2−4ac​​
  • Euler's number: e=lim⁡n→∞(1+1n)ne = \lim_{n \to \infty} \left(1 + \frac{1}{n}\right)^ne=limn→∞​(1+n1​)n
  • The golden ratio: ϕ=1+52≈1.618\phi = \frac{1 + \sqrt{5}}{2} \approx 1.618ϕ=21+5​​≈1.618
  • The area of a circle: A=πr2A = \pi r^2A=πr2

Block Math

Use double dollar signs for centered block equations:

The Gaussian integral:

∫−∞∞e−x2dx=π\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}∫−∞∞​e−x2dx=π​

Euler's identity, combining five fundamental constants:

eiπ+1=0e^{i\pi} + 1 = 0eiπ+1=0

Common Formulas

Calculus

Derivative definition:

f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h}f′(x)=limh→0​hf(x+h)−f(x)​

Integration by parts:

∫u dv=uv−∫v du\int u \, dv = uv - \int v \, du∫udv=uv−∫vdu

Taylor series expansion:

f(x)=∑n=0∞f(n)(a)n!(x−a)nf(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x-a)^nf(x)=∑n=0∞​n!f(n)(a)​(x−a)n

Linear Algebra

Matrix multiplication:

(AB)ij=∑kAikBkj(AB)_{ij} = \sum_{k} A_{ik} B_{kj}(AB)ij​=∑k​Aik​Bkj​

The determinant of a 2×2 matrix:

det⁡(abcd)=ad−bc\det\begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bcdet(ac​bd​)=ad−bc

Probability

Bayes' theorem:

P(A∣B)=P(B∣A)P(A)P(B)P(A|B) = \frac{P(B|A)P(A)}{P(B)}P(A∣B)=P(B)P(B∣A)P(A)​

Expected value:

E[X]=∑i=1nxiP(xi)E[X] = \sum_{i=1}^{n} x_i P(x_i)E[X]=∑i=1n​xi​P(xi​)

Physics

Newton's second law:

F=maF = maF=ma

Schrödinger equation:

iℏ∂∂tΨ=H^Ψi\hbar\frac{\partial}{\partial t}\Psi = \hat{H}\Psiiℏ∂t∂​Ψ=H^Ψ

Maxwell's equations (differential form):

∇⋅E=ρϵ0\nabla \cdot \mathbf{E} = \frac{\rho}{\epsilon_0}∇⋅E=ϵ0​ρ​

∇⋅B=0\nabla \cdot \mathbf{B} = 0∇⋅B=0

∇×E=−∂B∂t\nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}}{\partial t}∇×E=−∂t∂B​

∇×B=μ0J+μ0ϵ0∂E∂t\nabla \times \mathbf{B} = \mu_0\mathbf{J} + \mu_0\epsilon_0\frac{\partial \mathbf{E}}{\partial t}∇×B=μ0​J+μ0​ϵ0​∂t∂E​

Greek Letters

LowercaseUppercaseCode
α\alphaαAAA\alpha, A
β\betaβBBB\beta, B
γ\gammaγΓ\GammaΓ\gamma, \Gamma
δ\deltaδΔ\DeltaΔ\delta, \Delta
ϵ\epsilonϵEEE\epsilon, E
θ\thetaθΘ\ThetaΘ\theta, \Theta
λ\lambdaλΛ\LambdaΛ\lambda, \Lambda
π\piπΠ\PiΠ\pi, \Pi
σ\sigmaσΣ\SigmaΣ\sigma, \Sigma
ϕ\phiϕΦ\PhiΦ\phi, \Phi
ω\omegaωΩ\OmegaΩ\omega, \Omega

Syntax Reference

  • Superscript: x^2 → x2x^2x2
  • Subscript: x_i → xix_ixi​
  • Fraction: \frac{a}{b} → ab\frac{a}{b}ba​
  • Square root: \sqrt{x} → x\sqrt{x}x​
  • Sum: \sum_{i=1}^{n} → ∑i=1n\sum_{i=1}^{n}∑i=1n​
  • Product: \prod_{i=1}^{n} → ∏i=1n\prod_{i=1}^{n}∏i=1n​
  • Integral: \int_{a}^{b} → ∫ab\int_{a}^{b}∫ab​
  • Limit: \lim_{x \to \infty} → lim⁡x→∞\lim_{x \to \infty}limx→∞​
ℹ️
LaTeX Escaping

In MDX files, use single backslashes for LaTeX commands. The processor handles the escaping correctly during rendering.

Practical Examples

Compound Interest

A=P(1+rn)ntA = P\left(1 + \frac{r}{n}\right)^{nt}A=P(1+nr​)nt

Where AAA is the final amount, PPP is principal, rrr is annual rate, nnn is compounds per year, and ttt is years.

Machine Learning - Gradient Descent

θj:=θj−α∂∂θjJ(θ)\theta_{j} := \theta_{j} - \alpha \frac{\partial}{\partial \theta_{j}} J(\theta)θj​:=θj​−α∂θj​∂​J(θ)

Cost function:

J(θ)=12m∑i=1m(hθ(x(i))−y(i))2J(\theta) = \frac{1}{2m} \sum_{i=1}^{m} (h_\theta(x^{(i)}) - y^{(i)})^2J(θ)=2m1​∑i=1m​(hθ​(x(i))−y(i))2

Shannon Entropy

H(X)=−∑i=1np(xi)log⁡2p(xi)H(X) = -\sum_{i=1}^{n} p(x_i) \log_2 p(x_i)H(X)=−∑i=1n​p(xi​)log2​p(xi​)

Fourier Transform

f^(ξ)=∫−∞∞f(x)e−2πixξ dx\hat{f}(\xi) = \int_{-\infty}^{\infty} f(x) e^{-2\pi i x \xi} \, dxf^​(ξ)=∫−∞∞​f(x)e−2πixξdx

Commutative Diagrams

In category theory, a commutative diagram shows that composing morphisms along different paths yields the same result:

A→fBg↓↓hC→kD\begin{CD} A @>f>> B \\ @VgVV @VVhV \\ C @>>k> D \end{CD}Ag↓⏐​C​f​k​​B↓⏐​hD​

This diagram states that h∘f=k∘gh \circ f = k \circ gh∘f=k∘g (going right-then-down equals going down-then-right).

A classic example — the First Isomorphism Theorem:

G→ϕHπ↓↑iG/ker⁡(ϕ)→ϕˉim(ϕ)\begin{CD} G @>\phi>> H \\ @V{\pi}VV @AA{i}A \\ G/\ker(\phi) @>>{\bar{\phi}}> \text{im}(\phi) \end{CD}Gπ↓⏐​G/ker(ϕ)​ϕ​ϕˉ​​​H⏐↑​iim(ϕ)​

Where i∘ϕˉ∘π=ϕi \circ \bar{\phi} \circ \pi = \phii∘ϕˉ​∘π=ϕ, showing that G/ker⁡(ϕ)≅im(ϕ)G/\ker(\phi) \cong \text{im}(\phi)G/ker(ϕ)≅im(ϕ).

CD Syntax Reference

ArrowSyntaxDirection
→@>label>>Right
←@<label<<Left
↓@VlabelVVDown
↑@AlabelAAUp
=@=Horizontal equal
⤏`@.`
⚠️
Display Mode Required

The CD environment requires display mode. Put $$ on separate lines before and after the \begin{CD}...\end{CD} block. Inline $$...\begin{CD}$$ will not work.

💡

Use $$ for display equations that deserve their own line. Use $ for inline math that flows with text.

Backlinks

Practical Example: FAQ Section

  • Callouts

    ...nline math and $$...$$ for block equations. See Mathematical Notation for examples including commutative diagrams. > [...

Mathematical Diagrams

  • Diagrams

    ...es cleaner, mathematically-formatted output: See Mathematical NotationCommutative Diagrams for commutative diagram syntax.

Math Syntax

  • Quick Reference

    ...gramsDiagram Syntax Reference]] Math Syntax !Mathematical NotationSyntax Reference PDF Embedding ![[Embeds and AnchorsPDF Embe...

Feature Guides

  • Welcome to Rhizome

    ...ntax Highlighting]] - Highlighted code snippets - Mathematical NotationBlock Math - Write equations with LaTeX - [[DiagramsFlowcha...