1\documentclass[12pt]{article}2\usepackage{amsmath, amssymb, amsthm}3
4\newtheorem{theorem}{Theorem}[section]5\newtheorem{lemma}[theorem]{Lemma}6\newtheorem{corollary}[theorem]{Corollary}7\newtheorem{definition}{Definition}[section]8
9\title{Mathematics in LaTeX}10\author{sublimated}11\date{}12
13\begin{document}14\maketitle15
16\section{Inline and Display Math}17
18Inline math: the quadratic formula gives $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$.19
20Display math (unnumbered):21\[ e^{i\pi} + 1 = 0 \]22
23Display math (numbered):24\begin{equation}25 \label{eq:euler}26 e^{i\theta} = \cos\theta + i\sin\theta27\end{equation}28
29Reference: Equation~\eqref{eq:euler} is Euler's formula.30
31\section{Fractions and Roots}32
33Nested fractions: $\frac{1}{1 + \frac{1}{1 + \frac{1}{x}}}$.34
35Display fraction:36\[ \frac{\partial^2 u}{\partial t^2} = c^2 \nabla^2 u \]37
38Roots: $\sqrt{2}$, $\sqrt[3]{8} = 2$, $\sqrt[n]{x^n} = |x|$.39
40\section{Sums, Products, Integrals}41
42\[ \sum_{k=1}^{n} k = \frac{n(n+1)}{2} \]43
44\[ \prod_{i=1}^{n} x_i = x_1 \cdot x_2 \cdots x_n \]45
46\[ \int_0^\infty e^{-x^2}\,dx = \frac{\sqrt{\pi}}{2} \]47
48\[ \oint_{\partial\Omega} \mathbf{F} \cdot d\mathbf{s} = \iint_\Omega (\nabla \times \mathbf{F}) \cdot d\mathbf{A} \]49
50\section{Matrices}51
52\[53A = \begin{pmatrix}54 a_{11} & a_{12} & a_{13} \\55 a_{21} & a_{22} & a_{23} \\56 a_{31} & a_{32} & a_{33}57\end{pmatrix}58\]59
60Determinant notation:61\[62\det(A) = \begin{vmatrix}63 1 & 2 \\64 3 & 465\end{vmatrix} = -266\]67
68\section{Aligned Equations}69
70\begin{align}71 \nabla \cdot \mathbf{E} &= \frac{\rho}{\varepsilon_0} \label{eq:gauss} \\72 \nabla \cdot \mathbf{B} &= 0 \label{eq:nomonopole} \\73 \nabla \times \mathbf{E} &= -\frac{\partial \mathbf{B}}{\partial t} \label{eq:faraday} \\74 \nabla \times \mathbf{B} &= \mu_0 \mathbf{J} + \mu_0 \varepsilon_0 \frac{\partial \mathbf{E}}{\partial t} \label{eq:ampere}75\end{align}76
77Maxwell's equations: \eqref{eq:gauss}--\eqref{eq:ampere}.78
79\section{Cases}80
81\[82|x| = \begin{cases}83 x & \text{if } x \geq 0, \\84 -x & \text{if } x < 0.85\end{cases}86\]87
88\section{Theorems and Proofs}89
90\begin{definition}91 A function $f: \mathbb{R} \to \mathbb{R}$ is \emph{continuous} at $c$ if92 $\lim_{x \to c} f(x) = f(c)$.93\end{definition}94
95\begin{theorem}[Intermediate Value Theorem]96 \label{thm:ivt}97 If $f$ is continuous on $[a, b]$ and $y$ is between $f(a)$ and $f(b)$,98 then there exists $c \in (a, b)$ such that $f(c) = y$.99\end{theorem}100
101\begin{proof}102 Let $S = \{x \in [a,b] : f(x) \leq y\}$. Since $S$ is bounded above by $b$103 and non-empty ($a \in S$), let $c = \sup S$. By continuity of $f$ at $c$,104 we have $f(c) = y$.105\end{proof}106
107\begin{lemma}108 Every convergent sequence is bounded.109\end{lemma}110
111\begin{corollary}112 If $f$ is continuous on $[a,b]$ and $f(a) < 0 < f(b)$, then $f$ has a zero in $(a,b)$.113\end{corollary}114
115\section{Greek and Symbols}116
117Lowercase: $\alpha, \beta, \gamma, \delta, \epsilon, \zeta, \eta, \theta, \lambda, \mu, \pi, \sigma, \phi, \omega$.118
119Uppercase: $\Gamma, \Delta, \Theta, \Lambda, \Pi, \Sigma, \Phi, \Omega$.120
121Operators: $\times, \div, \pm, \mp, \cdot, \circ, \otimes, \oplus$.122
123Relations: $\leq, \geq, \neq, \approx, \equiv, \sim, \propto, \in, \subset, \subseteq$.124
125Arrows: $\to, \leftarrow, \Rightarrow, \Leftrightarrow, \mapsto, \hookrightarrow$.126
127\end{document} v1 of v2
commit e846b08
message create math.tex via macOS
author anton
date Apr 18, 2026
size 3.2 KB