Mathematical Formulas — LaTeX Rendering Test
A reference post testing every type of mathematical notation used in computer science and machine learning research.
Basic Arithmetic & Algebra
Inline math flows naturally in text. The quadratic formula is $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$ and the Pythagorean theorem is $a^2 + b^2 = c^2$.
Block equations get their own space:
Calculus
The definition of a derivative:
The chain rule:
Definite integral:
Integration by parts:
Taylor series expansion:
Linear Algebra
Matrix multiplication — for $A \in \mathbb{R}^{m \times k}$ and $B \in \mathbb{R}^{k \times n}$:
Determinant of a 2×2 matrix:
Eigenvalue equation:
The dot product and cosine similarity:
L2 norm:
Singular Value Decomposition:
Probability & Statistics
Bayes’ theorem:
Normal distribution (Gaussian):
Expected value and variance:
KL Divergence:
Machine Learning
Loss Functions
Mean Squared Error:
Binary Cross-Entropy:
Activation Functions
Sigmoid:
Softmax:
ReLU (inline): $\text{ReLU}(x) = \max(0, x)$
Gradient Descent
Weight update rule:
Backpropagation — gradient of loss w.r.t. weights:
Attention Mechanism (Transformers)
Information Theory
Entropy:
Mutual Information:
Big-O Complexity (Inline)
Common complexities as inline math: $O(1)$, $O(\log n)$, $O(n)$, $O(n \log n)$, $O(n^2)$, $O(2^n)$, $O(n!)$
Master theorem for divide and conquer — if $T(n) = aT(n/b) + f(n)$:
Greek Letters Reference
Commonly used in ML and math: $\alpha$ (alpha), $\beta$ (beta), $\gamma$ (gamma), $\delta$ (delta), $\epsilon$ (epsilon), $\theta$ (theta), $\lambda$ (lambda), $\mu$ (mu), $\sigma$ (sigma), $\tau$ (tau), $\phi$ (phi), $\psi$ (psi), $\omega$ (omega), $\Sigma$ (Sigma), $\Pi$ (Pi), $\Delta$ (Delta), $\nabla$ (nabla).
If it renders correctly here — calculus, matrices, ML formulas, piecewise functions — it will render correctly in any post you write.
Chemistry (mhchem)
Water and carbon dioxide: $\ce{H2O}$ and $\ce{CO2}$
Reaction:
Equilibrium:
Isotope notation: $\ce{^{14}_{6}C}$
Chart.js — Algorithm Complexity
Image with Caption
Collapsible Section (inline HTML)
Click to see the full Master Theorem
For $T(n) = aT(n/b) + f(n)$ where $a \geq 1$, $b > 1$:
ASCII Art
Binary Search — step-by-step on [1,3,5,7,9,11,13,15], target=7
Index: 0 1 2 3 4 5 6 7
Value: [1] [3] [5] [7] [9][11][13][15]
^
mid=3, found!
Keyboard Shortcuts
Press Ctrl + C to copy, Ctrl + F to search.
Highlighted Text
Use <mark> for important highlighted terms inline.