Mathematics¶
Math uses MathJax through pymdownx.arithmatex. Use $...$ or \(...\) for
inline math and $$...$$ or \[...\] for display math.
Inline¶
Included from examples/mathematics/sigmoid.md:
The sigmoid function is \(\sigma(x) = \frac{1}{1+e^{-x}}\).
The sigmoid function is \(\sigma(x) = \frac{1}{1+e^{-x}}\). Variables such as \(x_i\), \(w^{(l)}_{jk}\), and \(e^{-x^2}\) use subscripts and superscripts. Greek letters: \(\alpha, \beta, \gamma, \theta, \lambda, \mu, \sigma, \Sigma, \Omega\).
Display¶
Summation and integral:
Matrices and vectors¶
Aligned equations¶
Softmax:
Inside other components¶
Bayes' rule
Inline works too: the posterior \(P(A \mid B)\) is proportional to the likelihood.
\(\operatorname{Var}(X) = \mathbb{E}[X^2] - (\mathbb{E}[X])^2\)
\(\nabla f = \left(\frac{\partial f}{\partial x_1}, \dots, \frac{\partial f}{\partial x_n}\right)\)
Limitations¶
- MathJax loads from a CDN, so math needs network access.
- A literal dollar sign must be written
\$. - Prefer one equation block per
$$pair; keep blank lines out of display math. - Each
\\line break needs an environment such asalignedorcases.