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=mc2 shows that energy and mass are related.
Other examples:
The quadratic formula: x=2a−b±b2−4ac
Euler's number: e=limn→∞(1+n1)n
The golden ratio: ϕ=21+5≈1.618
The area of a circle: A=πr2
Block Math
Use double dollar signs for centered block equations:
The Gaussian integral:
∫−∞∞e−x2dx=π
Euler's identity, combining five fundamental constants:
eiπ+1=0
Common Formulas
Calculus
Derivative definition:
f′(x)=limh→0hf(x+h)−f(x)
Integration by parts:
∫udv=uv−∫vdu
Taylor series expansion:
f(x)=∑n=0∞n!f(n)(a)(x−a)n
Linear Algebra
Matrix multiplication:
(AB)ij=∑kAikBkj
The determinant of a 2×2 matrix:
det(acbd)=ad−bc
Probability
Bayes' theorem:
P(A∣B)=P(B)P(B∣A)P(A)
Expected value:
E[X]=∑i=1nxiP(xi)
Physics
Newton's second law:
F=ma
Schrödinger equation:
iℏ∂t∂Ψ=H^Ψ
Maxwell's equations (differential form):
∇⋅E=ϵ0ρ
∇⋅B=0
∇×E=−∂t∂B
∇×B=μ0J+μ0ϵ0∂t∂E
Greek Letters
Lowercase
Uppercase
Code
α
A
\alpha, A
β
B
\beta, B
γ
Γ
\gamma, \Gamma
δ
Δ
\delta, \Delta
ϵ
E
\epsilon, E
θ
Θ
\theta, \Theta
λ
Λ
\lambda, \Lambda
π
Π
\pi, \Pi
σ
Σ
\sigma, \Sigma
ϕ
Φ
\phi, \Phi
ω
Ω
\omega, \Omega
Syntax Reference
Superscript: x^2 → x2
Subscript: x_i → xi
Fraction: \frac{a}{b} → ba
Square root: \sqrt{x} → x
Sum: \sum_{i=1}^{n} → ∑i=1n
Product: \prod_{i=1}^{n} → ∏i=1n
Integral: \int_{a}^{b} → ∫ab
Limit: \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+nr)nt
Where A is the final amount, P is principal, r is annual rate, n is compounds per year, and t is years.
Machine Learning - Gradient Descent
θj:=θj−α∂θj∂J(θ)
Cost function:
J(θ)=2m1∑i=1m(hθ(x(i))−y(i))2
Shannon Entropy
H(X)=−∑i=1np(xi)log2p(xi)
Fourier Transform
f^(ξ)=∫−∞∞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:
Ag↓⏐CfkB↓⏐hD
This diagram states that h∘f=k∘g (going right-then-down equals going down-then-right).
A classic example — the First Isomorphism Theorem:
Gπ↓⏐G/ker(ϕ)ϕϕˉH⏐↑iim(ϕ)
Where i∘ϕˉ∘π=ϕ, showing that G/ker(ϕ)≅im(ϕ).
CD Syntax Reference
Arrow
Syntax
Direction
→
@>label>>
Right
←
@<label<<
Left
↓
@VlabelVV
Down
↑
@AlabelAA
Up
=
@=
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.