Mathematical notation should flow naturally within the text. For example, the Pythagorean theorem is defined as a2+b2=c2.
We can also discuss Euler's identity, eiπ+1=0, which is often cited as one of the most beautiful equations in mathematics. When x approaches infinity (x→∞), the function f(x)=x1 approaches zero.
2. Display (Block) Mathematics
Equations that need emphasis should be rendered in their own block.
The Quadratic Formula:
x=2a−b±b2−4ac
The Gaussian Integral:
This is a famous integral in statistics and physics.
∫−∞∞e−x2dx=π
Limit Definition of the Derivative:
f′(x)=h→0limhf(x+h)−f(x)
3. Matrices and Arrays
Testing grid alignment and bracket scaling.
A=a11a21a31a12a22a32a13a23a33
A system of equations:
⎩⎨⎧3x+5y−z=102x−y+2z=5x+y+z=4
4. Complex Notations & Summation
Riemann Sum:
S=i=1∑nf(xi∗)Δxi
Maxwell's Equations (Differential Form):
∇⋅E∇⋅B∇×E∇×B=ε0ρ=0=−∂t∂B=μ0J+μ0ε0∂t∂E
5. Logic and Set Theory
Union:A∪B
Intersection:A∩B
Subset:A⊆B
For All:∀x∈R
Exists:∃n∈N such that n>10.
N⊂Z⊂Q⊂R⊂C
6. Chemistry Test (mhchem support check)
Note: Standard KaTeX supports basic chemistry, but mhchem extension is required for complex reactions. If this renders as plain text variables, you may need to enable the extension in your config.
\ce2H2+O2−>2H2O
(If the above looks like "ce 2H2..." it means the mhchem extension is not enabled, which is the default for standard KaTeX).