1 min read

Using LaTeX in Your Posts

This post demonstrates how to use LaTeX for mathematical expressions and equations.

Inline Math

You can write inline equations like this: E=mc2E = mc^2 or x2+y2=r2x^2 + y^2 = r^2

Block Equations

For larger equations, use double dollar signs:

ddx(0xf(u)du)=f(x)\frac{d}{dx}\left( \int_{0}^{x} f(u)\,du\right)=f(x)

Complex Mathematical Expressions

The quadratic formula: x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Matrix representation: [abcdefghi]\begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix}

Sum notation: n=11n2=π26\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}

Greek Letters and Symbols

Chemical Equations

COX2+HX2OHX2COX3\ce{CO2 + H2O -> H2CO3}

Statistical Formulas

Standard deviation: σ=1Ni=1N(xiμ)2\sigma = \sqrt{\frac{1}{N} \sum_{i=1}^{N} (x_i - \mu)^2}

Probability and Set Theory

P(AB)=P(A)P(BA)P(A \cap B) = P(A) \cdot P(B|A) AB    x(xA    xB)A \subseteq B \iff \forall x(x \in A \implies x \in B)

Comments