01 / A return to mathematics

Mathematical Foundations

Perhaps you remember the pleasure of a proof clicking into place, or a pattern appearing where you least expected it. Life may have taken you elsewhere. The mathematics is still here.

For the part of you that always wanted to know why.

71 reminders

A selective memory map, from school arithmetic to ideas you meet in graduate study. Identities invite recall; assumptions and examples invite understanding.

01

Arithmetic & number sense

The small facts that make larger ideas feel lighter.

  • Order of operationsConvention
    2+3×4=142+3\times4=14
    Grouping first, then powers, then multiplication and division left to right, then addition and subtraction left to right. A fraction bar groups its numerator and denominator. Parentheses are kinder than ambiguous notation.
  • Fractions: add, multiply, divideIdentity
    ab+cd=ad+bcbd\frac ab+\frac cd=\frac{ad+bc}{bd}
    abcd=acbd,a/bc/d=adbc\frac ab\frac cd=\frac{ac}{bd},\qquad\frac{a/b}{c/d}=\frac{ad}{bc}
    Denominators must be nonzero; division also requires c0c\ne0. Use a common denominator for addition. Cancel common factors, not terms: a+ba1+b\frac{a+b}{a}\ne 1+b in general.
  • Ratios, percentages, and successive changeRule
    p% of x=p100xp\%\text{ of }x=\frac{p}{100}x
    A ratio compares quantities in compatible units. A 20% increase multiplies by 1.2; a 20% decrease multiplies by 0.8. Together they multiply by 0.96, not 1. Percentage change is 100newoldold100\frac{\mathrm{new}-\mathrm{old}}{\mathrm{old}} for a positive old value.
  • Factors, gcd, and lcmTheorem
    gcd(a,b)lcm(a,b)=ab\gcd(a,b)\operatorname{lcm}(a,b)=ab
    For positive integers. Euclid's algorithm uses gcd(a,b)=gcd(b,amodb)\gcd(a,b)=\gcd(b,a\bmod b) until the remainder is zero. For 18 and 24: gcd = 6 and lcm = 72. Every integer greater than 1 has a unique prime factorization, apart from factor order.
  • Divisibility testsRule
    By 2: last digit even. By 3 or 9: digit sum divisible by 3 or 9. By 4: last two digits divisible by 4. By 5: last digit 0 or 5. By 6: divisible by both 2 and 3. By 8: last three digits divisible by 8. By 10: last digit 0. By 11: alternating digit sum divisible by 11. These tests are for base-ten integers.
  • Arithmetic and geometric progressionsIdentity
    1+2++n=n(n+1)21+2+\cdots+n=\frac{n(n+1)}2
    k=0n1(a+kd)=n2[2a+(n1)d]\sum_{k=0}^{n-1}(a+kd)=\frac n2[2a+(n-1)d]
    k=0n1ark=a1rn1r\sum_{k=0}^{n-1}ar^k=a\frac{1-r^n}{1-r}
    The geometric formula requires r1r\ne1; for r=1r=1 the sum is nana. The infinite sum is a/(1r)a/(1-r) only when r<1|r|<1.
  • Remainders and modular arithmeticDefinition
    ab(modn)a\equiv b\pmod n
    This means nn divides aba-b, with integer modulus n2n\ge2. Addition and multiplication respect congruence. Division requires an inverse: aa has an inverse modulo nn exactly when gcd(a,n)=1\gcd(a,n)=1. On a clock, 10+53(mod12)10+5\equiv3\pmod{12}.
02

Numbers worth knowing

Patterns to recognize, not a test to pass.

  • Multiplication table: 1 through 20Table
    Multiplication table, 1 through 20 times 1 through 10
    ×1234567891011121314151617181920
    11234567891011121314151617181920
    2246810121416182022242628303234363840
    33691215182124273033363942454851545760
    448121620242832364044485256606468727680
    55101520253035404550556065707580859095100
    66121824303642485460667278849096102108114120
    7714212835424956637077849198105112119126133140
    881624324048566472808896104112120128136144152160
    9918273645546372819099108117126135144153162171180
    10102030405060708090100110120130140150160170180190200
  • Squares: 1 through 25Table
    252=62525^2=625
    Squares up to 25 squared
    nn squared
    11
    24
    39
    416
    525
    636
    749
    864
    981
    10100
    11121
    12144
    13169
    14196
    15225
    16256
    17289
    18324
    19361
    20400
    21441
    22484
    23529
    24576
    25625
    Consecutive squares differ by successive odd numbers:
    (n+1)2n2=2n+1(n+1)^2-n^2=2n+1
  • All primes up to 1000Table

    A prime is an integer greater than 1 whose only positive divisors are 1 and itself. There are 168 here; 1 is not prime, and 2 is the only even prime.

    • 2
    • 3
    • 5
    • 7
    • 11
    • 13
    • 17
    • 19
    • 23
    • 29
    • 31
    • 37
    • 41
    • 43
    • 47
    • 53
    • 59
    • 61
    • 67
    • 71
    • 73
    • 79
    • 83
    • 89
    • 97
    • 101
    • 103
    • 107
    • 109
    • 113
    • 127
    • 131
    • 137
    • 139
    • 149
    • 151
    • 157
    • 163
    • 167
    • 173
    • 179
    • 181
    • 191
    • 193
    • 197
    • 199
    • 211
    • 223
    • 227
    • 229
    • 233
    • 239
    • 241
    • 251
    • 257
    • 263
    • 269
    • 271
    • 277
    • 281
    • 283
    • 293
    • 307
    • 311
    • 313
    • 317
    • 331
    • 337
    • 347
    • 349
    • 353
    • 359
    • 367
    • 373
    • 379
    • 383
    • 389
    • 397
    • 401
    • 409
    • 419
    • 421
    • 431
    • 433
    • 439
    • 443
    • 449
    • 457
    • 461
    • 463
    • 467
    • 479
    • 487
    • 491
    • 499
    • 503
    • 509
    • 521
    • 523
    • 541
    • 547
    • 557
    • 563
    • 569
    • 571
    • 577
    • 587
    • 593
    • 599
    • 601
    • 607
    • 613
    • 617
    • 619
    • 631
    • 641
    • 643
    • 647
    • 653
    • 659
    • 661
    • 673
    • 677
    • 683
    • 691
    • 701
    • 709
    • 719
    • 727
    • 733
    • 739
    • 743
    • 751
    • 757
    • 761
    • 769
    • 773
    • 787
    • 797
    • 809
    • 811
    • 821
    • 823
    • 827
    • 829
    • 839
    • 853
    • 857
    • 859
    • 863
    • 877
    • 881
    • 883
    • 887
    • 907
    • 911
    • 919
    • 929
    • 937
    • 941
    • 947
    • 953
    • 967
    • 971
    • 977
    • 983
    • 991
    • 997

    To test an integer, trial division only needs primes up to its square root. A composite number must have a factor no larger than its square root.

03

Axioms, logic & proof

What we assume, what we define, and what follows.

  • Axiom, definition, identity, theoremLanguage
    An axiom or postulate is an assumption of a mathematical system. A definition gives a term its meaning. An identity is an equality valid for every allowed value. A theorem is proved from assumptions. The square and cube expansions below are identities, not axioms.
  • Real-number arithmetic: the field lawsAxioms
    a(b+c)=ab+aca(b+c)=ab+ac
    a+b=b+a,ab=baa+b=b+a,\qquad ab=ba
    (a+b)+c=a+(b+c)(a+b)+c=a+(b+c)
    (ab)c=a(bc)(ab)c=a(bc)
    Addition and multiplication are associative and commutative. There are identities 0 and 1, additive inverses a-a, and multiplicative inverses 1/a1/a for a0a\ne0. Distributivity connects the two operations. These laws justify the algebraic expansions.
  • Order and completeness of the real lineAxioms
    Adding the same number preserves an inequality. Multiplying by a positive number preserves it; multiplying by a negative number reverses it. Completeness: every nonempty set of reals bounded above has a least upper bound. This is the property behind the real line having no rational-style gaps.
  • Euclid's postulatesPostulates
    In Euclidean geometry: a straight segment joins any two points; a segment can be extended straight; a circle can be drawn with any center and positive radius; all right angles are equal; and the parallel postulate holds. A familiar equivalent of the last: through a point not on a line, exactly one parallel line passes. Non-Euclidean geometries change that assumption, so triangle angle sums need not be 180 degrees.
  • Mathematical inductionProof method
    Prove a base case. Then show that if the claim holds at nn, it holds at n+1n+1. Together these establish it for every integer from the base onward. Example: adding n+1n+1 to n(n+1)/2n(n+1)/2 gives (n+1)(n+2)/2(n+1)(n+2)/2, proving the sum formula's induction step.
  • Implication, quantifiers, and counterexamplesLogic
    (PQ)    (¬Q¬P)(P\Rightarrow Q)\iff(\neg Q\Rightarrow\neg P)
    An implication equals its contrapositive, not its converse. \forall means "for every"; \exists means "there exists." Negating "every" gives "there exists a counterexample":
    ¬(x P(x))    x ¬P(x)\neg(\forall x\ P(x))\iff\exists x\ \neg P(x)
    A thousand confirming examples do not prove a universal claim; one counterexample refutes it.
  • Sets and De Morgan's lawsIdentity
    (AB)c=AcBc(A\cup B)^c=A^c\cap B^c
    (AB)c=AcBc(A\cap B)^c=A^c\cup B^c
    Complements are relative to a specified universe. "Not either" means "neither"; "not both" means "at least one is not." For finite sets, AB=A+BAB|A\cup B|=|A|+|B|-|A\cap B|.
04

Algebra & the binomial theorem

The same structure, written in a more useful way.

  • Square of a sumIdentity
    (a+b)2=a2+2ab+b2(a+b)^2=a^2+2ab+b^2
    Expand (a+b)(a+b)(a+b)(a+b) by distributivity. Two cross terms each contribute abab. In the area model below, a square of side a+ba+b is divided into four rectangles.
    Teal: a squared. Gold: the two ab rectangles. Rose: b squared.
  • Square of a differenceIdentity
    (ab)2=a22ab+b2(a-b)^2=a^2-2ab+b^2
    Replace bb with b-b in the square-of-a-sum identity. Example: 992=(1001)2=10000200+1=980199^2=(100-1)^2=10000-200+1=9801.
  • Difference of squaresIdentity
    a2b2=(a+b)(ab)a^2-b^2=(a+b)(a-b)
    The cross terms cancel. Example: 103×97=(100+3)(1003)=100009=9991103\times97=(100+3)(100-3)=10000-9=9991. Over the reals, a2+b2a^2+b^2 does not factor into (a+b)(ab)(a+b)(a-b).
  • Cube of a sumIdentity
    (a+b)3=a3+3a2b+3ab2+b3(a+b)^3=a^3+3a^2b+3ab^2+b^3
    Multiply the square expansion by (a+b)(a+b) and collect terms. Coefficients 1, 3, 3, 1 count how many ways each product occurs.
  • Cube of a differenceIdentity
    (ab)3=a33a2b+3ab2b3(a-b)^3=a^3-3a^2b+3ab^2-b^3
    The signs alternate because odd powers of the negative term are negative.
  • Sum and difference of cubesIdentity
    a3b3=(ab)(a2+ab+b2)a^3-b^3=(a-b)(a^2+ab+b^2)
    a3+b3=(a+b)(a2ab+b2)a^3+b^3=(a+b)(a^2-ab+b^2)
    Multiplying back is a quick way to check the middle sign.
  • Quadratic formula and completing the squareFormula
    ax2+bx+c=0ax^2+bx+c=0
    x=b±b24ac2ax=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
    Requires a0a\ne0. The discriminant b24acb^2-4ac distinguishes two real roots, one repeated real root, or two nonreal complex roots. Completing the square gives
    ax2+bx+c=a(x+b2a)2+cb24aax^2+bx+c=a\left(x+\frac b{2a}\right)^2+c-\frac{b^2}{4a}
    The roots sum to b/a-b/a and multiply to c/ac/a.
  • The binomial theoremTheorem
    (a+b)n=k=0n(nk)ankbk(a+b)^n=\sum_{k=0}^n\binom nk a^{n-k}b^k
    For nonnegative integer nn.
    (nk)=n!k!(nk)!\binom nk=\frac{n!}{k!(n-k)!}
    Choose which kk of the nn factors contribute bb. Pascal's triangle records these coefficients; each interior entry is the sum of the two above it.
    Pascal's triangle
    Power nCoefficients
    01
    11 1
    21 2 1
    31 3 3 1
    41 4 6 4 1
    51 5 10 10 5 1
    61 6 15 20 15 6 1
  • Absolute value and triangle inequalityInequality
    a+ba+b|a+b|\le|a|+|b|
    Absolute value is distance from zero. ab=ab|ab|=|a||b| and abab\big||a|-|b|\big|\le|a-b|. For r0r\ge0, xr|x|\le r means rxr-r\le x\le r.
05

Powers, roots & logarithms

Multiplication becomes addition. Scale becomes distance.

  • Multiply and divide powersIdentity
    aman=am+na^m a^n=a^{m+n}
    aman=amn\frac{a^m}{a^n}=a^{m-n}
    The quotient requires a0a\ne0. For arbitrary real exponents use a>0a>0; integer exponents also allow negative bases wherever defined. 2324=27=1282^3\cdot2^4=2^7=128.
  • Powers of powers and productsIdentity
    (am)n=amn(a^m)^n=a^{mn}
    (ab)n=anbn,(a/b)n=an/bn(ab)^n=a^nb^n,\qquad(a/b)^n=a^n/b^n
    For real exponents take positive bases; the quotient needs a nonzero denominator. Integer-exponent laws extend more broadly. These laws do not extend blindly to principal complex powers.
  • Zero, negative, and fractional exponentsIdentity
    a0=1,an=1ana^0=1,\qquad a^{-n}=\frac1{a^n}
    Here a0a\ne0. For a>0a>0, am/n=amna^{m/n}=\sqrt[n]{a^m} with integer n>0n>0. In real arithmetic a2=a\sqrt{a^2}=|a|, not always aa. The expression 000^0 needs a context-specific convention; it is not covered by the nonzero-base rule.
  • A logarithm asks for an exponentDefinition
    logbx=y    by=x\log_b x=y\iff b^y=x
    For real logarithms: x>0x>0, b>0b>0, b1b\ne1. lnx\ln x uses base ee. logb1=0\log_b1=0 and logbb=1\log_b b=1. The exponential and logarithm are inverse functions.
    Teal: exp(x). Rose: ln(x). Dashed: y = x. Inverse functions exchange horizontal and vertical coordinates.
  • Products, quotients, and powers inside a logIdentity
    logb(xy)=logbx+logby\log_b(xy)=\log_bx+\log_by
    logb(x/y)=logbxlogby\log_b(x/y)=\log_bx-\log_by
    logb(xr)=rlogbx\log_b(x^r)=r\log_bx
    Use positive x,yx,y and a valid log base. There is no corresponding rule log(x+y)=logx+logy\log(x+y)=\log x+\log y. A tenfold increase adds 1 to a base-ten logarithm.
  • Change of base and exponential growthIdentity
    logbx=lnxlnb\log_bx=\frac{\ln x}{\ln b}
    ax=exlnaa^x=e^{x\ln a}
    For a>0a>0. Under N(t)=N0ektN(t)=N_0e^{kt}, doubling time is ln2/k\ln2/k for k>0k>0; half-life is ln2/k-\ln2/k for k<0k<0.
  • Stable log-sum-expNumerical method
    logiezi=m+logiezim\log\sum_i e^{z_i}=m+\log\sum_i e^{z_i-m}
    Choose m=maxizim=\max_i z_i for finite real logits. The exponentials are then at most 1, avoiding overflow. Softmax is unchanged by a common shift because the common exponential factor cancels. Compute log-softmax as (zim)logjezjm(z_i-m)-\log\sum_j e^{z_j-m}, rather than taking the log of probabilities that may round to zero.
06

Geometry & measurement

Lengths, areas, and the shapes behind the symbols.

  • Angles, polygons, and similarityTheorem
    π radians=180\pi\text{ radians}=180^\circ
    A Euclidean triangle's interior angles sum to 180180^\circ; a simple nn-gon's sum is (n2)180(n-2)180^\circ. Corresponding angles of similar triangles agree and corresponding side lengths have a common ratio. Scaling lengths by k>0k>0 scales areas by k2k^2 and volumes by k3k^3.
  • Pythagoras and the distance formulaTheorem
    a2+b2=c2a^2+b^2=c^2
    In a right triangle, cc is the hypotenuse. The converse holds for positive side lengths forming a triangle.
    d=(x2x1)2+(y2y1)2d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
    The midpoint is ((x1+x2)/2,(y1+y2)/2)((x_1+x_2)/2,(y_1+y_2)/2).
  • Areas of familiar shapesFormulas
    Plane areas
    ShapeArea
    Rectanglewhwh
    Parallelogrambhbh
    Trianglebh/2bh/2
    Trapezoid(a+b)h/2(a+b)h/2
    Circleπr2\pi r^2
    Ellipseπab\pi ab
    Heights are perpendicular to the base. For a trapezoid, a and b are the parallel side lengths. For an ellipse, a and b are semiaxes.
  • Circles: circumference, arcs, sectorsFormulas
    C=2πr,A=πr2C=2\pi r,\qquad A=\pi r^2
    s=rθ,Asector=12r2θs=r\theta,\qquad A_{\mathrm{sector}}=\frac12r^2\theta
    The angle θ\theta is in radians. A tangent is perpendicular to the radius at the point of contact. An inscribed angle subtending a fixed arc is half the corresponding central angle.
  • Volumes and surface areasFormulas
    Solids
    SolidVolumeTotal surface area
    Boxlwhlwh2(lw+lh+wh)2(lw+lh+wh)
    Sphere4πr3/34\pi r^3/34πr24\pi r^2
    Right cylinderπr2h\pi r^2h2πr(h+r)2\pi r(h+r)
    Right circular coneπr2h/3\pi r^2h/3πr(r+)\pi r(r+\ell)
    For the cone, slant height =r2+h2\ell=\sqrt{r^2+h^2}. A prism has volume base area times perpendicular height; a pyramid has one third of that. Units matter: area is square units, volume is cubic units.
  • Lines and slopesFormulas
    yy0=m(xx0)y-y_0=m(x-x_0)
    For a nonvertical line, m=(y2y1)/(x2x1)m=(y_2-y_1)/(x_2-x_1). Parallel nonvertical lines have equal slopes; perpendicular lines with finite nonzero slopes satisfy m1m2=1m_1m_2=-1. A vertical line is x=cx=c. The general form ax+by=cax+by=c includes both vertical and horizontal lines.
07

Trigonometry

A circle quietly contains a world of waves.

  • The unit circle and right-triangle ratiosDefinition
    (x,y)=(cosθ,sinθ)(x,y)=(\cos\theta,\sin\theta)
    sinθ=oppositehypotenuse,cosθ=adjacenthypotenuse\sin\theta=\frac{\mathrm{opposite}}{\mathrm{hypotenuse}},\quad\cos\theta=\frac{\mathrm{adjacent}}{\mathrm{hypotenuse}}
    tanθ=sinθcosθ\tan\theta=\frac{\sin\theta}{\cos\theta}
    The triangle ratios apply to acute angles; the unit circle extends them to all real angles. Tangent requires cosθ0\cos\theta\ne0.
  • Special angles worth rememberingTable
    Exact trigonometric values
    DegreesRadianssincostan
    00010
    30π/6\pi/61/21/23/2\sqrt3/21/31/\sqrt3
    45π/4\pi/41/21/\sqrt21/21/\sqrt21
    60π/3\pi/33/2\sqrt3/21/21/23\sqrt3
    90π/2\pi/210Undefined
    Sine is positive above the horizontal axis; cosine to the right of the vertical axis. These signs extend the table to other quadrants.
  • Pythagorean identities, symmetry, periodicityIdentity
    sin2θ+cos2θ=1\sin^2\theta+\cos^2\theta=1
    1+tan2θ=sec2θ1+\tan^2\theta=\sec^2\theta
    The second identity needs cosθ0\cos\theta\ne0. Sine is odd; cosine is even. Sine and cosine have period 2π2\pi; tangent has period π\pi.
  • Angle addition and double anglesIdentity
    sin(a±b)=sinacosb±cosasinb\sin(a\pm b)=\sin a\cos b\pm\cos a\sin b
    cos(a±b)=cosacosbsinasinb\cos(a\pm b)=\cos a\cos b\mp\sin a\sin b
    sin2a=2sinacosa\sin2a=2\sin a\cos a
    cos2a=cos2asin2a=12sin2a\cos2a=\cos^2a-\sin^2a=1-2\sin^2a
    Also cos2a=2cos2a1\cos2a=2\cos^2a-1. These turn angle combinations into algebra.
  • Sine rule, cosine rule, and triangle areaTheorem
    asinA=bsinB=csinC\frac a{\sin A}=\frac b{\sin B}=\frac c{\sin C}
    c2=a2+b22abcosCc^2=a^2+b^2-2ab\cos C
    Area=12absinC\mathrm{Area}=\frac12ab\sin C
    Sides a,b,ca,b,c face angles A,B,CA,B,C. These hold for nondegenerate Euclidean triangles; the cosine rule becomes Pythagoras when C=π/2C=\pi/2.
  • Euler's formulaIdentity
    eiθ=cosθ+isinθe^{i\theta}=\cos\theta+i\sin\theta
    Here i2=1i^2=-1. Multiplication of unit complex numbers adds angles, explaining the angle-addition identities. At θ=π\theta=\pi, eiπ+1=0e^{i\pi}+1=0. A complex number reiθre^{i\theta} has magnitude rr and argument θ\theta modulo 2π2\pi.
08

Calculus: change & accumulation

Two questions: how fast, and how much?

  • Limits and continuityDefinition
    f(x)=limh0f(x+h)f(x)hf'(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}h
    A derivative is the limiting slope, when the limit exists. Continuity at aa means limxaf(x)=f(a)\lim_{x\to a}f(x)=f(a). Differentiability implies continuity, not conversely: x|x| is continuous but not differentiable at 0.
  • Linearity, product, quotient, chainRules
    (fg)(x)=f(g(x))g(x)(f\circ g)'(x)=f'(g(x))g'(x)
    (af+bg)=af+bg(af+bg)'=af'+bg'
    (fg)=fg+fg(fg)'=f'g+fg'
    (fg)=fgfgg2\left(\frac fg\right)'=\frac{f'g-fg'}{g^2}
    Functions must be differentiable where used, and the quotient requires g0g\ne0. Composition multiplies local rates of change.
  • Known derivativesTable
    Derivative reference (angles in radians)
    FunctionDerivativeReal domain note
    cc0Constant
    xrx^rrxr1rx^{r-1}x > 0 for general real r
    exe^xexe^xAll real x
    axa^xaxlnaa^x\ln aa > 0
    lnx\ln|x|1/x1/xx nonzero
    logax\log_a x1/(xlna)1/(x\ln a)x > 0; a > 0, a not 1
    sinx\sin xcosx\cos xAll real x
    cosx\cos xsinx-\sin xAll real x
    tanx\tan xsec2x\sec^2xcos x nonzero
    arcsinx\arcsin x1/1x21/\sqrt{1-x^2}|x| < 1
    arctanx\arctan x1/(1+x2)1/(1+x^2)All real x
  • Known antiderivativesTable
    Every row includes an arbitrary constant C
    IntegrandAntiderivative
    xrx^rxr+1/(r+1)+Cx^{r+1}/(r+1)+C
    1/x1/xlnx+C\ln|x|+C
    exe^xex+Ce^x+C
    axa^xax/lna+Ca^x/\ln a+C
    sinx\sin xcosx+C-\cos x+C
    cosx\cos xsinx+C\sin x+C
    sec2x\sec^2xtanx+C\tan x+C
    1/(1+x2)1/(1+x^2)arctanx+C\arctan x+C
    1/1x21/\sqrt{1-x^2}arcsinx+C\arcsin x+C
    The power rule needs r1r\ne-1, with x>0x>0 for arbitrary real powers. For axa^x, require a>0,a1a>0,a\ne1. Work on intervals where the integrand is defined; for the final row x<1|x|<1. Constants can differ on disconnected intervals.
  • The fundamental theorem of calculusTheorem
    abf(x)dx=F(b)F(a)\int_a^b f(x)\,dx=F(b)-F(a)
    For continuous ff and an antiderivative FF on the interval. Also
    ddxaxf(t)dt=f(x)\frac d{dx}\int_a^x f(t)\,dt=f(x)
    Differentiation and integration undo one another under these conditions. Definite integration records signed accumulation, not automatically geometric area.
  • Substitution and integration by partsRules
    udv=uvvdu\int u\,dv=uv-\int v\,du
    f(g(x))g(x)dx=F(g(x))+C\int f(g(x))g'(x)\,dx=F(g(x))+C
    Here F=fF\prime=f. Substitution reverses the chain rule; integration by parts reverses the product rule. For a definite integral, transform bounds under substitution and include the boundary term in integration by parts.
  • Taylor expansions and local approximationsTheorem
    f(a+h)=f(a)+f(a)h+12f(a)h2+f(a+h)=f(a)+f'(a)h+\tfrac12f''(a)h^2+\cdots
    ex=n=0xnn!e^x=\sum_{n=0}^{\infty}\frac{x^n}{n!}
    sinx=xx33!+x55!\sin x=x-\frac{x^3}{3!}+\frac{x^5}{5!}-\cdots
    ln(1+x)=xx22+x33\ln(1+x)=x-\frac{x^2}{2}+\frac{x^3}{3}-\cdots
    The first two series converge for all real xx; the log series converges for 1<x1-1<x\le1. A finite Taylor polynomial approximates locally with a remainder; infinitely differentiable does not guarantee equality to the Taylor series.
  • Gradient, Jacobian, HessianDefinitions
    dff(x)Tdxdf\approx\nabla f(x)^T\,dx
    For scalar f:RnRf:\mathbb R^n\to\mathbb R, the gradient is the vector of first partial derivatives and the Hessian is the matrix of second partials. For F:RnRmF:\mathbb R^n\to\mathbb R^m, the Jacobian has shape m×nm\times n.
    F(x+h)F(x)+JF(x)hF(x+h)\approx F(x)+J_F(x)h
    f(x+h)f(x)+f(x)Th+12hTHf(x)hf(x+h)\approx f(x)+\nabla f(x)^Th+\tfrac12h^TH_f(x)h
    The second-order expansion requires suitable twice differentiability; with continuous second partials the Hessian is symmetric.
  • Divergence, curl, and boundary theoremsTheorems
    VFdV=VFndS\int_V\nabla\cdot F\,dV=\int_{\partial V}F\cdot n\,dS
    Divergence measures local outward flux; curl measures local circulation. The divergence theorem equates total divergence to outward boundary flux. Stokes' theorem equates flux of curl to boundary circulation:
    S(×F)ndS=SFdr\int_S(\nabla\times F)\cdot n\,dS=\oint_{\partial S}F\cdot dr
    Use sufficiently smooth fields and piecewise smooth regions or oriented surfaces with compatible boundary orientation.
09

Linear algebra & optimization

Many numbers at once, with structure.

  • Dot products, norms, and projectionTheorem
    uTv=uvcosθu^Tv=\|u\|\|v\|\cos\theta
    projvu=uTvvTvv\operatorname{proj}_v u=\frac{u^Tv}{v^Tv}v
    For real Euclidean vectors; projection needs v0v\ne0. Orthogonal vectors have zero dot product. Cauchy-Schwarz says uTvuv|u^Tv|\le\|u\|\|v\|; it controls how large a correlation can be.
  • Matrix products, rank, and inversesRules
    (AB)T=BTAT(AB)^T=B^TA^T
    Am×nBn×pA_{m\times n}B_{n\times p} produces an m×pm\times p matrix. Generally ABBAAB\ne BA. Rank is the dimension of the column space. A square matrix is invertible exactly when it has full rank, equivalently nonzero determinant. If both are invertible, (AB)1=B1A1(AB)^{-1}=B^{-1}A^{-1}. In computation, solve Ax=bAx=b rather than explicitly forming an inverse.
  • Eigenvectors and the spectral theoremTheorem
    Av=λv,v0Av=\lambda v,\qquad v\ne0
    An eigenvector keeps its direction under the map, up to scaling. A real symmetric matrix has an orthonormal eigenbasis:
    A=QΛQTA=Q\Lambda Q^T
    It is positive definite exactly when all eigenvalues are positive. Not every nonsymmetric matrix is diagonalizable.
  • Singular value decompositionTheorem
    A=UΣVTA=U\Sigma V^T
    Every real m×nm\times n matrix has an SVD, with orthogonal U,VU,V and rectangular diagonal Σ\Sigma containing nonnegative singular values. Keeping the largest kk gives a best rank-at-most-kk approximation in Frobenius and spectral norms. This connects least squares, compression, and principal components.
  • Least squares and orthogonalityMethod
    minxAxb22\min_x\|Ax-b\|_2^2
    AT(Axb)=0A^T(Ax-b)=0
    The residual is orthogonal to the columns of AA. Full column rank gives a unique solution. QR or SVD is usually numerically preferable to forming ATAA^TA, which squares the 2-norm condition number when full rank.
  • Convexity and stationary pointsDefinition
    f(tx+(1t)y)tf(x)+(1t)f(y)f(tx+(1-t)y)\le tf(x)+(1-t)f(y)
    For 0t10\le t\le1 on a convex domain. For a differentiable convex function, any point with zero gradient is a global minimum. Strict convexity makes a minimizer unique if it exists. For twice continuously differentiable functions on an open convex domain, a positive semidefinite Hessian everywhere characterizes convexity. A zero gradient alone does not imply a minimum for a nonconvex function.
  • Equality constraints and Lagrange multipliersMethod
    f(x)=λg(x)\nabla f(x)=\lambda\nabla g(x)
    At a constrained local extremum of differentiable ff subject to g(x)=0g(x)=0, this necessary condition holds when g(x)0\nabla g(x)\ne0. It produces candidates, not a guarantee of a minimum. Inequality constraints lead to KKT conditions with additional sign and complementary-slackness requirements.
10

Probability, statistics & beyond

Reasoning when certainty is not available.

  • The probability axiomsAxioms
    P(A)0,P(Ω)=1P(A)\ge0,\qquad P(\Omega)=1
    P(iAi)=iP(Ai)P\left(\bigcup_i A_i\right)=\sum_i P(A_i)
    The final rule is countable additivity for pairwise disjoint events. It implies P(Ac)=1P(A)P(A^c)=1-P(A) and P(AB)=P(A)+P(B)P(AB)P(A\cup B)=P(A)+P(B)-P(A\cap B). Mutually exclusive is not the same as independent.
  • Conditional probability and BayesTheorem
    P(AB)=P(BA)P(A)P(B)P(A\mid B)=\frac{P(B\mid A)P(A)}{P(B)}
    Require P(B)>0P(B)>0; the displayed conditional on AA also needs P(A)>0P(A)>0. More generally P(AB)=P(AB)/P(B)P(A\mid B)=P(A\cap B)/P(B). Independent events satisfy P(AB)=P(A)P(B)P(A\cap B)=P(A)P(B). Update prior odds with evidence, but keep base rates in the calculation.
  • Permutations, combinations, and factorialsFormulas
    nPk=n!(nk)!,(nk)=n!k!(nk)!{}^nP_k=\frac{n!}{(n-k)!},\qquad\binom nk=\frac{n!}{k!(n-k)!}
    For integers 0kn0\le k\le n, with 0!=10!=1. Permutations count ordered choices without replacement; combinations ignore order. With replacement and order, kk draws from nn choices give nkn^k sequences.
  • Expectation, variance, and covarianceIdentity
    E[aX+bY]=aE[X]+bE[Y]E[aX+bY]=aE[X]+bE[Y]
    Linearity of expectation needs no independence, assuming the expectations exist.
    Var(X)=E[X2]E[X]2\operatorname{Var}(X)=E[X^2]-E[X]^2
    Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y)\operatorname{Var}(X+Y)=\operatorname{Var}(X)+\operatorname{Var}(Y)+2\operatorname{Cov}(X,Y)
    These variance formulas require finite second moments. Independence implies zero covariance, but the converse generally fails.
  • Three distributions to recognizeTable
    Common distributions
    DistributionMeanVariance
    Bernoulli(p)ppp(1p)p(1-p)
    Binomial(n,p)npnpnp(1p)np(1-p)
    Normal(mu, sigma squared)μ\muσ2\sigma^2
    Bernoulli models one yes/no outcome; binomial counts successes in n independent trials with common probability p. A normal distribution describes a symmetric continuous bell curve, not every real dataset.
  • Law of large numbers and central limit theoremTheorems
    n(Xnμ)σ  N(0,1)\frac{\sqrt n(\overline X_n-\mu)}{\sigma}\ \Rightarrow\ N(0,1)
    For independent identically distributed variables with finite mean and finite positive variance, the classical CLT gives this convergence in distribution. The law of large numbers says the sample mean approaches the population mean; it is a different claim. Neither removes bias from a badly sampled dataset.
  • Standard error, intervals, and p-valuesInterpretation
    SE(X)=σn\operatorname{SE}(\overline X)=\frac{\sigma}{\sqrt n}
    For independent observations with common variance. Estimate with s/ns/\sqrt n when appropriate. A 95% confidence procedure covers the fixed true parameter in 95% of repeated samples under its assumptions; it is not a 95% posterior probability. A p-value is the null-model probability of a statistic at least as extreme as observed, not the probability that the null is true.
  • Entropy and cross entropyDefinition
    H(p)=ipilogpiH(p)=-\sum_i p_i\log p_i
    H(p,q)=ipilogqiH(p,q)=-\sum_i p_i\log q_i
    DKL(pq)=H(p,q)H(p)0D_{\mathrm{KL}}(p\|q)=H(p,q)-H(p)\ge0
    For discrete distributions. Use 0log0=00\log0=0 by continuity. If pi>0p_i>0 but qi=0q_i=0, cross entropy and KL divergence are infinite. Natural logs give nats; base-two logs give bits.
  • Fourier: decomposing a signal into frequenciesConnection
    f^(ω)=f(t)eiωtdt\widehat f(\omega)=\int_{-\infty}^{\infty}f(t)e^{-i\omega t}\,dt
    One common convention; other normalizations exist. For absolutely integrable ff this transform is defined; inversion needs additional conditions. Linearity and the convolution theorem turn combinations of signals into algebra. Trigonometry, complex numbers, and linear algebra meet here.
  • Compactness and existence of extremaTheorem
    In finite-dimensional Euclidean space, a set is compact exactly when it is closed and bounded. A continuous real-valued function on a nonempty compact set attains a maximum and a minimum. Closed and bounded is not enough for compactness in general infinite-dimensional normed spaces. Conditions are part of the theorem, not fine print.