LaTeX Showcase

Inline math works like this: the time complexity is O(nlogn)O(n \log n) and space is Θ(n)\Theta(n).

Block equations render centered:

0ex2dx=π2\int_{0}^{\infty} e^{-x^2} dx = \frac{\sqrt{\pi}}{2}

A matrix:

A=(a11a12a21a22)\mathbf{A} = \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix}

Bayes’ theorem:

P(AB)=P(BA)P(A)P(B)P(A \mid B) = \frac{P(B \mid A) \, P(A)}{P(B)}