Basics Elementary Middle School High School University Advanced
How to Write Math Formulas

Math formulas are displayed by enclosing them in "$" (dollar signs).
Example: Writing $\sin^2 \theta + \cos^2 \theta = 1$ displays $\sin^2 \theta + \cos^2 \theta = 1$.

Trigonometric Functions

Basic Trigonometric Functions
Code:
$\sin \theta, \cos \theta, \tan \theta$
Display:
$\sin \theta, \cos \theta, \tan \theta$
Pythagorean Identity
Code:
$\sin^2 \theta + \cos^2 \theta = 1$
Display:
$\sin^2 \theta + \cos^2 \theta = 1$
Addition Formulas
Code:
$\sin(\alpha + \beta) = \sin \alpha \cos \beta + \cos \alpha \sin \beta$
Display:
$\sin(\alpha + \beta) = \sin \alpha \cos \beta + \cos \alpha \sin \beta$
Inverse Trigonometric Functions (arc notation)
Code:
$\arcsin x, \arccos x, \arctan x$
Display:
$\arcsin x, \arccos x, \arctan x$
Inverse Trigonometric Functions (-1 notation)
Code:
$\sin^{-1} x, \cos^{-1} x, \tan^{-1} x$
Display:
$\sin^{-1} x, \cos^{-1} x, \tan^{-1} x$
About Inverse Trig Notation

Both notations are widely used: $\arcsin x$ and $\sin^{-1} x$ mean the same thing.
Note: $\sin^{-1} x$ means the inverse function, not $\frac{1}{\sin x}$ (which is $\csc x$).

Exponentials and Logarithms

Exponential Function
Code:
$y = a^x$
Display:
$y = a^x$
Base of Natural Logarithm
Code:
$e^x$
Display:
$e^x$
Logarithm
Code:
$\log_a x$
Display:
$\log_a x$
Natural Logarithm
Code:
$\ln x$
Display:
$\ln x$
Properties of Logarithms
Code:
$\log_a (xy) = \log_a x + \log_a y$
Display:
$\log_a (xy) = \log_a x + \log_a y$

Differentiation

Derivative
Code:
$f'(x)$ または $\displaystyle\frac{dy}{dx}$
Display:
$f'(x)$ または $\displaystyle\frac{dy}{dx}$
Power Rule
Code:
$(x^n)' = nx^{n-1}$
Display:
$(x^n)' = nx^{n-1}$
Derivative of Trigonometric Functions
Code:
$(\sin x)' = \cos x$
Display:
$(\sin x)' = \cos x$
Derivative of Exponential Function
Code:
$(e^x)' = e^x$
Display:
$(e^x)' = e^x$
Derivative of Logarithmic Function
Code:
$(\ln x)' = \displaystyle\frac{1}{x}$
Display:
$(\ln x)' = \displaystyle\frac{1}{x}$

Integration

Indefinite Integral
Code:
$\displaystyle\int f(x) dx$
Display:
$\displaystyle\int f(x) dx$
Definite Integral
Code:
$\displaystyle\int_a^b f(x) dx$
Display:
$\displaystyle\int_a^b f(x) dx$
Power Rule for Integration
Code:
$\displaystyle\int x^n dx = \frac{x^{n+1}}{n+1} + C$
Display:
$\displaystyle\int x^n dx = \frac{x^{n+1}}{n+1} + C$
Integral of Trigonometric Functions
Code:
$\displaystyle\int \cos x dx = \sin x + C$
Display:
$\displaystyle\int \cos x dx = \sin x + C$
Integral of Exponential Function
Code:
$\displaystyle\int e^x dx = e^x + C$
Display:
$\displaystyle\int e^x dx = e^x + C$

Vectors

Vector Notation
Code:
$\vec{a}$ または $\boldsymbol{a}$
Display:
$\vec{a}$ または $\boldsymbol{a}$
Component Form
Code:
$\vec{a} = (a_1, a_2, a_3)$
Display:
$\vec{a} = (a_1, a_2, a_3)$
Dot Product
Code:
$\vec{a} \cdot \vec{b} = |\vec{a}||\vec{b}|\cos\theta$
Display:
$\vec{a} \cdot \vec{b} = |\vec{a}||\vec{b}|\cos\theta$
Magnitude of Vector
Code:
$|\vec{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}$
Display:
$|\vec{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}$

Sequences

General Term of Sequence
Code:
$\{a_n\}$
Display:
$\{a_n\}$
Arithmetic Sequence
Code:
$a_n = a_1 + (n-1)d$
Display:
$a_n = a_1 + (n-1)d$
Geometric Sequence
Code:
$a_n = a_1 \cdot r^{n-1}$
Display:
$a_n = a_1 \cdot r^{n-1}$
Summation (Sigma)
Code:
$\displaystyle\sum_{k=1}^{n} k = \frac{n(n+1)}{2}$
Display:
$\displaystyle\sum_{k=1}^{n} k = \frac{n(n+1)}{2}$
Product Notation (Pi)
Code:
$\displaystyle\prod_{k=1}^{n} k = n!$
Display:
$\displaystyle\prod_{k=1}^{n} k = n!$

Limits

Limit Notation
Code:
$\displaystyle\lim_{x \to a} f(x)$
Display:
$\displaystyle\lim_{x \to a} f(x)$
Limit as x Approaches Infinity
Code:
$\displaystyle\lim_{x \to \infty} \frac{1}{x} = 0$
Display:
$\displaystyle\lim_{x \to \infty} \frac{1}{x} = 0$
Right and Left Limits
Code:
$\displaystyle\lim_{x \to a^+} f(x)$, $\displaystyle\lim_{x \to a^-} f(x)$
Display:
$\displaystyle\lim_{x \to a^+} f(x)$, $\displaystyle\lim_{x \to a^-} f(x)$
Limit of Sequence
Code:
$\displaystyle\lim_{n \to \infty} a_n = L$
Display:
$\displaystyle\lim_{n \to \infty} a_n = L$

Matrices

2×2 Matrix
Code:
$\begin{pmatrix} a & b \\ c & d \end{pmatrix}$
Display:
$\begin{pmatrix} a & b \\ c & d \end{pmatrix}$
3×3 Matrix
Code:
$\begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}$
Display:
$\begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}$
Determinant
Code:
$\det A$ または $|A|$
Display:
$\det A$ または $|A|$
Inverse Matrix
Code:
$A^{-1}$
Display:
$A^{-1}$
Transpose Matrix
Code:
$A^T$
Display:
$A^T$

Complex Numbers

Imaginary Unit
Code:
$i$ または $i^2 = -1$
Display:
$i$ または $i^2 = -1$
Complex Number Notation
Code:
$z = a + bi$
Display:
$z = a + bi$
Complex Conjugate
Code:
$\overline{z} = a - bi$
Display:
$\overline{z} = a - bi$
Absolute Value
Code:
$|z| = \sqrt{a^2 + b^2}$
Display:
$|z| = \sqrt{a^2 + b^2}$
Euler's Formula
Code:
$e^{i\theta} = \cos\theta + i\sin\theta$
Display:
$e^{i\theta} = \cos\theta + i\sin\theta$

Common Greek Letters

Lowercase
Code:
$\alpha, \beta, \gamma, \delta, \epsilon, \theta, \lambda, \mu, \sigma, \phi, \omega$
Display:
$\alpha, \beta, \gamma, \delta, \epsilon, \theta, \lambda, \mu, \sigma, \phi, \omega$
Uppercase
Code:
$\Gamma, \Delta, \Theta, \Lambda, \Sigma, \Phi, \Omega$
Display:
$\Gamma, \Delta, \Theta, \Lambda, \Sigma, \Phi, \Omega$

Summation and Integration Formulas

Binomial Theorem
Code:
$(a+b)^n = \displaystyle\sum_{k=0}^{n} \binom{n}{k} a^{n-k}b^k$
Display:
$(a+b)^n = \displaystyle\sum_{k=0}^{n} \binom{n}{k} a^{n-k}b^k$
Integration by Parts
Code:
$\displaystyle\int u \, dv = uv - \int v \, du$
Display:
$\displaystyle\int u \, dv = uv - \int v \, du$
Integration by Substitution
Code:
$\displaystyle\int f(g(x))g'(x)dx = \int f(u)du$ (where $u=g(x)$)
Display:
$\displaystyle\int f(g(x))g'(x)dx = \int f(u)du$ (where $u=g(x)$)
Effect of \displaystyle

Adding \displaystyle changes the size and position of limits and fractions:

Without displaystyle: $\sum_{k=1}^{n} k = \frac{n(n+1)}{2}$

Result: $\sum_{k=1}^{n} k = \frac{n(n+1)}{2}$

With displaystyle: $\displaystyle\sum_{k=1}^{n} k = \frac{n(n+1)}{2}$

Result: $\displaystyle\sum_{k=1}^{n} k = \frac{n(n+1)}{2}$

With \displaystyle, fractions and limits are displayed in full size for better readability.

Vectors and Coordinate Systems

Cross Product
Code:
$\vec{a} \times \vec{b} = |\vec{a}||\vec{b}|\sin\theta \vec{n}$
Display:
$\vec{a} \times \vec{b} = |\vec{a}||\vec{b}|\sin\theta \vec{n}$
Parametric Equations
Code:
$\begin{cases} x = f(t) \\ y = g(t) \end{cases}$
Display:
$\begin{cases} x = f(t) \\ y = g(t) \end{cases}$
Polar Coordinates
Code:
$\begin{cases} x = r\cos\theta \\ y = r\sin\theta \end{cases}$
Display:
$\begin{cases} x = r\cos\theta \\ y = r\sin\theta \end{cases}$

Piecewise Notation

Piecewise Function Notation
Code:
$f(x) = \begin{cases} x^2 & (x \geq 0) \\ -x^2 & (x < 0) \end{cases}$
Display:
$f(x) = \begin{cases} x^2 & (x \geq 0) \\ -x^2 & (x < 0) \end{cases}$

Multi-line Equations

Multi-line Equation Tips

When writing step-by-step equation transformations or proofs, use \begin{align}...\end{align}.
- Use & to specify alignment position (usually placed before =)
- Use \\ for line breaks

Solving Linear Equations (align environment)
Code:
$\begin{align} 2x + 3 &= 11 \\ 2x &= 8 \\ x &= 4 \end{align}$
Display:
$\begin{align} 2x + 3 &= 11 \\ 2x &= 8 \\ x &= 4 \end{align}$
Solving Quadratic Equations
Code:
$\begin{align} x^2 - 5x + 6 &= 0 \\ (x - 2)(x - 3) &= 0 \\ x &= 2, 3 \end{align}$
Display:
$\begin{align} x^2 - 5x + 6 &= 0 \\ (x - 2)(x - 3) &= 0 \\ x &= 2, 3 \end{align}$
Integration Step by Step
Code:
$\begin{align} \int_0^2 x^2 dx &= \left[ \frac{x^3}{3} \right]_0^2 \\ &= \frac{8}{3} - 0 \\ &= \frac{8}{3} \end{align}$
Display:
$\begin{align} \int_0^2 x^2 dx &= \left[ \frac{x^3}{3} \right]_0^2 \\ &= \frac{8}{3} - 0 \\ &= \frac{8}{3} \end{align}$
Trigonometric Proof
Code:
$\begin{align} \sin 2\theta &= \sin(\theta + \theta) \\ &= \sin\theta\cos\theta + \cos\theta\sin\theta \\ &= 2\sin\theta\cos\theta \end{align}$
Display:
$\begin{align} \sin 2\theta &= \sin(\theta + \theta) \\ &= \sin\theta\cos\theta + \cos\theta\sin\theta \\ &= 2\sin\theta\cos\theta \end{align}$
Logarithm Calculation
Code:
$\begin{align} \log_2 8 + \log_2 4 &= \log_2 (8 \times 4) \\ &= \log_2 32 \\ &= 5 \end{align}$
Display:
$\begin{align} \log_2 8 + \log_2 4 &= \log_2 (8 \times 4) \\ &= \log_2 32 \\ &= 5 \end{align}$
Equation Transformation
Code:
$\begin{align} \frac{x+1}{2} &= \frac{x-1}{3} \\ 3(x+1) &= 2(x-1) \\ 3x + 3 &= 2x - 2 \\ x &= -5 \end{align}$
Display:
$\begin{align} \frac{x+1}{2} &= \frac{x-1}{3} \\ 3(x+1) &= 2(x-1) \\ 3x + 3 &= 2x - 2 \\ x &= -5 \end{align}$

Statistical Inference

Expected Value (Mean)
Code:
$E(X) = \displaystyle\sum_{i=1}^{n} x_i p_i$
Display:
$E(X) = \displaystyle\sum_{i=1}^{n} x_i p_i$
Variance and Standard Deviation
Code:
$V(X) = E(X^2) - \{E(X)\}^2, \quad \sigma(X) = \sqrt{V(X)}$
Display:
$V(X) = E(X^2) - \{E(X)\}^2, \quad \sigma(X) = \sqrt{V(X)}$
Binomial Distribution
Code:
$P(X = k) = {}_n C_k p^k (1-p)^{n-k}$
Display:
$P(X = k) = {}_n C_k p^k (1-p)^{n-k}$
Binomial Distribution: Expected Value and Variance
Code:
$X \sim B(n, p) \Rightarrow E(X) = np, \quad V(X) = np(1-p)$
Display:
$X \sim B(n, p) \Rightarrow E(X) = np, \quad V(X) = np(1-p)$
Normal Distribution
Code:
$X \sim N(\mu, \sigma^2)$
Display:
$X \sim N(\mu, \sigma^2)$
Standardization
Code:
$Z = \frac{X - \mu}{\sigma} \sim N(0, 1)$
Display:
$Z = \frac{X - \mu}{\sigma} \sim N(0, 1)$
Confidence Interval for Population Mean
Code:
$\bar{X} - 1.96 \cdot \frac{\sigma}{\sqrt{n}} \leq \mu \leq \bar{X} + 1.96 \cdot \frac{\sigma}{\sqrt{n}}$
Display:
$\bar{X} - 1.96 \cdot \frac{\sigma}{\sqrt{n}} \leq \mu \leq \bar{X} + 1.96 \cdot \frac{\sigma}{\sqrt{n}}$
Hypothesis Testing (Null and Alternative Hypotheses)
Code:
$H_0: \mu = \mu_0, \quad H_1: \mu \neq \mu_0$
Display:
$H_0: \mu = \mu_0, \quad H_1: \mu \neq \mu_0$
Test Statistic
Code:
$Z_0 = \frac{\bar{X} - \mu_0}{\frac{\sigma}{\sqrt{n}}}$
Display:
$Z_0 = \frac{\bar{X} - \mu_0}{\frac{\sigma}{\sqrt{n}}}$

Usage Examples in Reading Notes

Example 1: Differentiation Problem
Code:
p.124 problem: Differentiating $f(x) = x^3 - 3x^2 + 2$ gives $f'(x) = 3x^2 - 6x$. Setting $f'(x) = 0$ to find extrema gives $x = 0, 2$
Display:
p.124 problem: Differentiating $f(x) = x^3 - 3x^2 + 2$ gives $f'(x) = 3x^2 - 6x$. Setting $f'(x) = 0$ to find extrema gives $x = 0, 2$
Example 2: Integration Calculation
Code:
Definite integral $\displaystyle\int_0^1 (2x + 1) dx = [x^2 + x]_0^1 = (1 + 1) - 0 = 2$
Display:
Definite integral $\displaystyle\int_0^1 (2x + 1) dx = [x^2 + x]_0^1 = (1 + 1) - 0 = 2$
Example 3: Vector Dot Product
Code:
For $\vec{a} = (1, 2, 3)$ and $\vec{b} = (4, 5, 6)$, $\vec{a} \cdot \vec{b} = 1 \times 4 + 2 \times 5 + 3 \times 6 = 32$
Display:
For $\vec{a} = (1, 2, 3)$ and $\vec{b} = (4, 5, 6)$, $\vec{a} \cdot \vec{b} = 1 \times 4 + 2 \times 5 + 3 \times 6 = 32$
Common Symbol Reference
  • \sin, \cos, \tan → Trigonometric functions
  • \log, \ln → Logarithm
  • \int → Integral symbol ∫
  • \sum → Summation symbol Σ
  • \prod → Product symbol Π
  • \lim → Limit symbol lim
  • \frac{numerator}{denominator} → Fraction
  • \sqrt{} → Square root √
  • \vec{} → Vector arrow
  • \theta, \alpha, \beta → Greek letters
  • \infty → Infinity ∞
  • \cdot → Dot (for dot product, etc.)
  • \times → Multiplication
  • \pm → Plus-minus ±
  • ^ → Superscript (exponents, etc.)
  • _ → Subscript (indices, etc.)

Chemical Formulas & Equations (High School Chemistry)

Ammonia Synthesis (Haber-Bosch Process)
Code:
$\text{N}_2 + 3\text{H}_2 \rightleftharpoons 2\text{NH}_3$
Display:
$\text{N}_2 + 3\text{H}_2 \rightleftharpoons 2\text{NH}_3$
Combustion of Ethanol
Code:
$\text{C}_2\text{H}_5\text{OH} + 3\text{O}_2 \rightarrow 2\text{CO}_2 + 3\text{H}_2\text{O}$
Display:
$\text{C}_2\text{H}_5\text{OH} + 3\text{O}_2 \rightarrow 2\text{CO}_2 + 3\text{H}_2\text{O}$
Neutralization of HCl and NaOH
Code:
$\text{HCl} + \text{NaOH} \rightarrow \text{NaCl} + \text{H}_2\text{O}$
Display:
$\text{HCl} + \text{NaOH} \rightarrow \text{NaCl} + \text{H}_2\text{O}$
Reaction of Sulfuric Acid and Barium Hydroxide
Code:
$\text{H}_2\text{SO}_4 + \text{Ba(OH)}_2 \rightarrow \text{BaSO}_4 \downarrow + 2\text{H}_2\text{O}$
Display:
$\text{H}_2\text{SO}_4 + \text{Ba(OH)}_2 \rightarrow \text{BaSO}_4 \downarrow + 2\text{H}_2\text{O}$
Acetic Acid Dissociation Equilibrium
Code:
$\text{CH}_3\text{COOH} \rightleftharpoons \text{CH}_3\text{COO}^- + \text{H}^+$
Display:
$\text{CH}_3\text{COOH} \rightleftharpoons \text{CH}_3\text{COO}^- + \text{H}^+$
Electrolysis of Copper Chloride Solution
Code:
Cathode: $\text{Cu}^{2+} + 2e^- \rightarrow \text{Cu}$ Anode: $2\text{Cl}^- \rightarrow \text{Cl}_2 + 2e^-$
Display:
Cathode: $\text{Cu}^{2+} + 2e^- \rightarrow \text{Cu}$ Anode: $2\text{Cl}^- \rightarrow \text{Cl}_2 + 2e^-$
Esterification Reaction
Code:
$\text{CH}_3\text{COOH} + \text{C}_2\text{H}_5\text{OH} \rightleftharpoons \text{CH}_3\text{COOC}_2\text{H}_5 + \text{H}_2\text{O}$
Display:
$\text{CH}_3\text{COOH} + \text{C}_2\text{H}_5\text{OH} \rightleftharpoons \text{CH}_3\text{COOC}_2\text{H}_5 + \text{H}_2\text{O}$
Thermochemical Equation
Code:
$\text{C(graphite)} + \text{O}_2\text{(g)} = \text{CO}_2\text{(g)} + 394\text{ kJ}$
Display:
$\text{C(graphite)} + \text{O}_2\text{(g)} = \text{CO}_2\text{(g)} + 394\text{ kJ}$
Tips for High School Chemistry Notation

• Reversible reaction arrow: \rightleftharpoons → $\rightleftharpoons$
• Precipitate notation: \downarrow → $\downarrow$
• Superscript (ion charges): ^{2+} → $^{2+}$
• Electron: e^- → $e^-$