YouTip LogoYouTip

Md Math

### LaTeX Math Formulas Basics In Markdown, math formulas are expressed using LaTeX syntax. LaTeX is a powerful typesetting system, especially suitable for documents containing complex math formulas. #### Basic Syntax Structure * **Commands**: Start with a backslash ``, such as `alpha`, `sum` * **Parameters**: Enclosed in curly braces `{}`, such as `frac{a}{b}` * **Subscript**: Use `_`, such as `x_1` * **Superscript**: Use `^`, such as `x^2` * **Grouping**: Use curly braces to combine multiple characters, such as `x_{i+1}` #### Common LaTeX Commands alpha, beta, gamma % Greek letters sum, prod, int % Summation, product, integral frac{numerator}{denominator} % Fraction sqrt{Expression} % Square root sqrt{Expression} % nth root ### Inline Formulas and Block Formulas #### Inline Formulas Inline formulas are enclosed with single dollar signs `$`, and the formula will be embedded in the text, such as: Variables in text $x = 5$ and function $f(x) = x^2 + 2x + 1$. Variables in text $x = 5$ and function $f(x) = x^2 + 2x + 1$. !(#) #### Block Formulas Block formulas are enclosed with double dollar signs `$$`, and the formula will be displayed as a separate centered line: E = mc^2 int_{-infty}^{infty} e^{-x^2} dx = sqrt{pi} $$E = mc^2$$ $$int_{-infty}^{infty} e^{-x^2} dx = sqrt{pi}$$ !(#) #### Multi-line Formulas Use the `align` environment to create multi-line aligned formulas: begin{align} f(x) &= ax^2 + bx + c f'(x) &= 2ax + b f''(x) &= 2a end{align} $$ begin{align} f(x) &= ax^2 + bx + c f'(x) &= 2ax + b f''(x) &= 2a end{align} $$ !(#) * * * ## Common Math Symbols ### Basic Operation Symbols * Addition, subtraction, multiplication, division: `+`, `-`, `times`, `div` * Fractions: `frac{a}{b}` β†’ $frac{a}{b}$ * Roots: `sqrt{x}`, `sqrt{x}` β†’ $sqrt{x}$, $sqrt{x}$ * Exponents: `x^2`, `e^{ipi}` β†’ $x^2$, $e^{ipi}$ ### Comparison Symbols * Equals: `=`, `neq`, `equiv` β†’ $=$, $neq$, $equiv$ * Greater/Less: ``, `leq`, `geq` β†’ $$, $leq$, $geq$ * Approximately: `approx`, `sim` β†’ $approx$, $sim$ ### Set Symbols * Belongs to: `in`, `notin` β†’ $in$, $notin$ * Contains: `subset`, `supset` β†’ $subset$, $supset$ * Intersection/Union: `cap`, `cup` β†’ $cap$, $cup$ * Empty set: `emptyset` β†’ $emptyset$ ### Greek Letters Common Greek letters and their LaTeX representations: | Lowercase | Uppercase | LaTeX | Lowercase | Uppercase | LaTeX | | --- | --- | --- | --- | --- | --- | | Ξ± | Ξ‘ | `alpha` | Ξ½ | Ν | `nu` | | Ξ² | Ξ’ | `beta` | ΞΏ | Ο | `o` | | Ξ³ | Ξ“ | `gamma` | Ο€ | Ξ  | `pi` | | Ξ΄ | Ξ” | `delta` | ρ | Ξ‘ | `rho` | | Ξ΅ | Ξ• | `epsilon` | Οƒ | Ξ£ | `sigma` | | ΞΈ | Θ | `theta` | Ο„ | Ξ€ | `tau` | | Ξ» | Ξ› | `lambda` | Ο† | Ξ¦ | `phi` | | ΞΌ | Μ | `mu` | Ο‰ | Ξ© | `omega` | ### Special Functions and Symbols * Trigonometric functions: `sin`, `cos`, `tan` * Logarithms: `log`, `ln` * Limits: `lim_{x to 0}` * Summation: `sum_{i=1}^{n}` * Integration: `int_{a}^{b}` * Infinity: `infty` ### Matrix Representation Use the `matrix` environment: begin{pmatrix} a & b c & d end{pmatrix} $$ begin{pmatrix} a & b c & d end{pmatrix} $$ !(#) Matrices with different bracket types: * `pmatrix`: parentheses $begin{pmatrix} a & b c & d end{pmatrix}$ * `bmatrix`: square brackets $begin{bmatrix} a & b c & d end{bmatrix}$ * `vmatrix`: determinant $begin{vmatrix} a & b c & d end{vmatrix}$
← Markdown PracticesMd First File β†’