KaTeX Mathematical Demo

2 min

KaTeX\KaTeX is a cross-browser JavaScript library that displays mathematical notation in web browsers. It puts special emphasis on being fast and easy to use. It was initially developed by Khan Academy, and became one of the top five trending projects on GitHub.

Group Theory

Burnside’s lemma, sometimes also called Burnside’s counting theorem, the Cauchy-Frobenius lemma or the orbit-counting theorem

Let \wedge be a group action of a finite group GG on a finite set XX. Then the number tt of orbits of the action is given by the formula

t=1GgGFix(g)t=\frac{1}{|G|}\sum_{g\in G}|\text{Fix}(g)|

For each integer n2n\ge2, the quotient group Z/nZ\mathbb{Z}/n\mathbb{Z} is a cyclic group generated by 1+nZ1+n\mathbb{Z} and so Z/nZZn\color{red}{\mathbb{Z}/n\mathbb{Z}\cong\mathbb{Z}_n}

The quotient group R/Z\mathbb{R}/\mathbb{Z} is isomorphic to ([0,1),+1)([0,1),+_1), the group of real numbers in the interval [0,1)[0,1), under addition modulo 1.

Isomorphism Theorem. Let ϕ ⁣:(G,)(H,)\phi\colon(G,\circ)\to(H,*) be a homomorphism. Then the function

f ⁣:G/Ker(ϕ)Im(ϕ)xKer(ϕ)ϕ(x)\begin{aligned} f\colon G/\text{Ker}(\phi)&\to\text{Im}(\phi)\\ x\text{Ker}(\phi)&\mapsto\phi(x) \end{aligned}

is an isomorphism, so

G/Ker(ϕ)Im(ϕ)G/\text{Ker}(\phi)\cong \text{Im}(\phi)

Taylor’s Theorem

Let the function ff be an (n+1)(n+1)-times differentiable on an open interval containing the points aa and xx. Then

f(x)=f(a)+f(a)(xa)++f(n)(a)n!(xa)n+Rn(x)f(x)=f(a)+f'(a)(x-a)+\cdots+\frac{f^{(n)}(a)}{n!}(x-a)^n+R_n(x)

where

Rn(x)=f(n+1)(c)(n+1)!(xa)n+1,R_n(x)=\frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1},

for some cc between aa and xx.

KaTeX\KaTeX doesn’t have a right-align option so an extra aligned column is used for equation numbers. They are pushed to the right by mkern spacing, default \mkern100mu. Both align & align* environments can be used, as can \tag and \notag.

Align environment

π4n2=4n(n!)22n2(2n)!n(2n1)Jn14n(n!)22n2(2n)!2n2Jn=4n4(2n)!(n!n)22n(2n1)Jn14n(n!)2(2n)!Jn=4n1((n1)!)2(2n2)!Jn14n(n!)2(2n)!Jn\begin{align} \frac{\pi}{4n^2} &= \frac{4^n(n!)^2}{2n^2(2n)!}n(2n-1)J_{n-1}-\frac{4^n(n!)^2}{2n^2(2n)!}2n^2J_n \tag{1} \\ &= \frac{4^n}{4(2n)!}\left(\frac{n!}{n}\right)^22n(2n-1)J_{n-1}-\frac{4^n(n!)^2}{(2n)!}J_n \tag{$\ddagger$} \\ &= \frac{4^{n-1}((n-1)!)^2}{(2n-2)!}J_{n-1}-\frac{4^n(n!)^2}{(2n)!}J_n \tag{2} \end{align}

Align* environment

4N(N!)2(2N)!JN4N(N!)2(2N)!π2412n+2I2N=π28(N+1)4N(N!)2(2N)!I2N=π28(N+1)π2=π316(N+1)xsinxπ2soxπ2sinx\begin{align} \frac{4^N(N!)^2}{(2N)!}J_N &\leq \frac{4^N(N!)^2}{(2N)!}\frac{\pi^2}{4}\frac{1}{2n+2}I_{2N} \tag{*} \\ &= \frac{\pi^2}{8(N+1)}\frac{4^N(N!)^2}{(2N)!}I_{2N} \\ &= \frac{\pi^2}{8(N+1)}\frac{\pi}{2} \tag{**} \\ &= \frac{\pi^3}{16(N+1)} \\ \frac{x}{\sin x} &\leq \frac{\pi}{2} \tag{3} \\ \text{so} \qquad\qquad x &\leq \frac{\pi}{2}\sin x \tag{4} \end{align}

Sum of a Series

i=1k+1i=(i=1ki)+(k+1)=k(k+1)2+k+1=k(k+1)+2(k+1)2=(k+1)(k+2)2=(k+1)((k+1)+1)2\begin{align*} \sum_{i=1}^{k+1}i &= \left(\sum_{i=1}^{k}i\right) +(k+1) \tag{1} \\ &= \frac{k(k+1)}{2}+k+1 \tag{2} \\ &= \frac{k(k+1)+2(k+1)}{2} \tag{3} \\ &= \frac{(k+1)(k+2)}{2} \tag{4} \\ &= \frac{(k+1)((k+1)+1)}{2} \tag{5} \end{align*}

Product notation

1+q2(1q)+q6(1q)(1q2)+=j=01(1q5j+2)(1q5j+3), for q<1.1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \text{ for }\lvert q\rvert < 1.

Cross Product

V1×V2=ijkXuYu0XvYv0\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\[1ex] \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\[2.5ex] \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \end{vmatrix}

Maxwell’s Equations

×B1cEt=4πcjE=4πρ×E+1cBt=0B=0\begin{align*} \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} &= \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} &= 4 \pi \rho \\ \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} &= \vec{\mathbf{0}} \\ \nabla \cdot \vec{\mathbf{B}} &= 0 \end{align*}

Greek Letters

Γ Δ Θ Λ Ξ Π Σ Υ Φ Ψ Ωα β γ δ ϵ ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ ϕ χ ψ ω ε ϑ ϖ ϱ ς φ\begin{align*} &\Gamma\ \Delta\ \Theta\ \Lambda\ \Xi\ \Pi\ \Sigma\ \Upsilon\ \Phi\ \Psi\ \Omega\\ &\alpha\ \beta\ \gamma\ \delta\ \epsilon\ \zeta\ \eta\ \theta\ \iota\ \kappa\ \lambda\ \mu\ \nu\ \xi\ \omicron\ \pi\ \rho\ \sigma\ \tau\ \upsilon\ \phi\ \chi\ \psi\ \omega\ \varepsilon\ \vartheta\ \varpi\ \varrho\ \varsigma\ \varphi \end{align*}

Arrows

                             \begin{align*} &\gets\ \to\ \leftarrow\ \rightarrow\ \uparrow\ \Uparrow\ \downarrow\ \Downarrow\ \updownarrow\ \Updownarrow\\ &\Leftarrow\ \Rightarrow\ \leftrightarrow\ \Leftrightarrow\ \mapsto\ \hookleftarrow\\ &\leftharpoonup\ \leftharpoondown\ \rightleftharpoons\ \longleftarrow\ \Longleftarrow\ \longrightarrow\\ &\Longrightarrow\ \longleftrightarrow\ \Longleftrightarrow\ \longmapsto\ \hookrightarrow\ \rightharpoonup\\ &\rightharpoondown\ \leadsto\ \nearrow\ \searrow\ \swarrow\ \nwarrow \end{align*}

Symbols

                  \begin{align*} &\surd\ \barwedge\ \veebar\ \odot\ \oplus\ \otimes\ \oslash\ \circledcirc\ \boxdot\ \bigtriangleup\\ &\bigtriangledown\ \dagger\ \diamond\ \star\ \triangleleft\ \triangleright\ \angle\ \infty\ \prime\ \triangle \end{align*}

Samples taken from KaTeX Live Demo

评论
  • 按正序
  • 按倒序
  • 按热度
来发评论吧~