YOUR FORMULA DESK

A relationship.
A reason to use it.

Look up the rule, check when it applies, and open an example. Keep the full lesson one click away.

55 rules & relationships10 subjects

Keep the connection in sight.

Some ideas are a formula. Others are a rule worth remembering.

55 results
Algebra

Linear equations

Perform the same operation on both sides. Divide only by a nonzero constant when preserving all solutions.

WHEN TO USE ITUse this when x appears to the first power and you want to collect variable terms on one side.

See an example
5x + 2 = 3x + 10
  1. Subtract 3x from both sides: 2x + 2 = 10.
  2. Subtract 2 from both sides: 2x = 8.
  3. Divide both sides by 2: x = 4. Substitution gives 22 = 22 in the original equation.

Watch for: Moving a term is shorthand for an operation on both sides. Changing just one side can change the solution set.

Open the lesson
Algebra

Distribution

Distribute a factor to every term: a(b + c) = ab + ac.

WHEN TO USE ITUse this to remove parentheses before combining like terms.

See an example
2(x + 3) = 14
  1. Multiply both terms inside the parentheses: 2x + 6 = 14.
  2. Subtract 6 from both sides: 2x = 8.
  3. Divide by 2: x = 4.

Watch for: 2(x + 3) is 2x + 6, not 2x + 3. A missing product changes the equation.

Open the lesson
Algebra

Negative signs

Distribute the sign with its factor. A negative times a negative is positive.

WHEN TO USE ITUse this whenever a negative number or a minus sign sits outside parentheses.

See an example
−3(x − 2) = 12
  1. Distribute −3 to both terms: −3x + 6 = 12.
  2. Subtract 6: −3x = 6.
  3. Divide by −3: x = −2. Check: −3(−2 − 2) = 12.

Watch for: The product (−3)(−2) is +6. Keep a negative coefficient attached to its variable.

Open the lesson
Algebra

Fractions

Undo division by a constant by multiplying both sides by that nonzero constant.

WHEN TO USE ITUse this for linear equations with constant, nonzero denominators.

See an example
x/3 + 2 = 5
  1. Subtract 2 from both sides: x/3 = 3.
  2. Multiply both sides by 3: x = 9.
  3. Check in the original: 9/3 + 2 = 5.

Watch for: If you clear a denominator in one move, multiply every term on both sides. These lessons do not cover variable denominators.

Open the lesson
Algebra

Linear inequalities

Dividing by a negative reverses the sign: if a<ba<b, then −a>−b-a>-b.

WHEN TO USE ITUse this when a question asks for values above or below a boundary.

See an example
Solve −2x+3>11-2x+3>11.
  1. Subtract 3 from both sides: −2x>8-2x>8.
  2. Divide by −2-2 and reverse the inequality: x<−4x<-4.
  3. Check a value inside the range: at x=−5x=-5, the left side is 13>1113>11. The endpoint −4-4 is excluded because the sign is strict.

Watch for: Do not reverse the sign when adding or subtracting. Reverse it only when multiplying or dividing by a negative number.

Open the lesson
Algebra

Systems of linear equations

Adding equations preserves every common solution. Substitute the result back to check both original equations.

WHEN TO USE ITUse this for two unknown quantities connected by two linear relationships.

See an example
Solve x+y=7x+y=7 and x−y=1x-y=1.
  1. Add the equations: 2x=82x=8, because y−y=0y-y=0.
  2. Divide by 2: x=4x=4. Substitute into x+y=7x+y=7 to get y=3y=3.
  3. Check both: 4+3=74+3=7 and 4−3=14-3=1. The solution is the ordered pair (4,3)(4,3).

Watch for: Checking only one equation is not enough. Parallel distinct lines have no common solution; identical lines have infinitely many.

Open the lesson
Quadratics

Roots & factors

A product is zero when at least one factor is zero.

WHEN TO USE ITUse this after rewriting a quadratic equation as a product equal to zero.

See an example
x² − 5x + 6 = 0
  1. Factor: (x − 2)(x − 3) = 0.
  2. Set each factor to zero: x = 2 or x = 3.

Watch for: The numbers in the factors have opposite signs to the corresponding roots.

Open the lesson
Quadratics

Vertex

For f(x) = ax² + bx + c, the vertex has x-coordinate −b/(2a), where a ≠ 0.

WHEN TO USE ITUse this to locate a quadratic’s turning point or axis of symmetry.

See an example
f(x) = x² − 6x + 5
  1. x = −(−6)/(2 × 1) = 3.
  2. f(3) = 9 − 18 + 5 = −4. The vertex is (3, −4).

Watch for: The vertex is a point, while the exercise may ask only for its x-coordinate.

Open the lesson
Quadratics

Discriminant

The discriminant is Δ = b² − 4ac. Its sign determines the number of distinct real roots.

WHEN TO USE ITUse this when you only need the number of real roots, even before solving.

See an example
x² + 2x + 5 = 0
  1. Δ = 2² − 4(1)(5) = −16.
  2. A negative discriminant means no real roots.

Watch for: Squaring b does not mean squaring the entire expression b − 4ac.

Open the lesson
Quadratics

Completing the square

x2+bx=(x+b/2)2−(b/2)2x^2+bx=(x+b/2)^2-(b/2)^2. First divide by the leading coefficient when it is not 1.

WHEN TO USE ITUse this to reveal a vertex or solve a quadratic that does not factor immediately.

See an example
Solve x2+6x+5=0x^2+6x+5=0.
  1. Move 5 to the other side: x2+6x=−5x^2+6x=-5.
  2. Half of 6 is 3. Add 32=93^2=9 to both sides: (x+3)2=4(x+3)^2=4.
  3. Take both square-root possibilities: x+3=±2x+3=\pm2. Thus x=−1x=-1 or x=−5x=-5.

Watch for: Adding a number to one side only changes the equation. Taking a square root also requires both signs when the square is positive.

Open the lesson
Quadratics

The quadratic formula

For ax2+bx+c=0ax^2+bx+c=0, a≠0a\ne0: x=−b±b2−4ac2a.x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}.

WHEN TO USE ITUse this for a quadratic written in standard form, especially when factoring is difficult.

See an example
Solve 2x2+x−3=02x^2+x-3=0.
  1. Identify a=2a=2, b=1b=1, and c=−3c=-3. The discriminant is 1−4(2)(−3)=251-4(2)(-3)=25.
  2. Substitute: x=(−1±5)/4x=(-1\pm5)/4.
  3. The plus sign gives x=1x=1; the minus sign gives x=−3/2x=-3/2. Both satisfy the original equation.

Watch for: The entire numerator is divided by 2a. Keep the sign of c when calculating the discriminant.

Open the lesson
Calculus

Power rule

The power rule is d/dx(axⁿ) = anxⁿ⁻¹. The derivative of a constant is zero.

WHEN TO USE ITUse this to differentiate polynomial terms and constants.

See an example
f(x) = 4x³ + 7
  1. Multiply the coefficient by the exponent: 4 × 3 = 12.
  2. Reduce the exponent by one: f′(x) = 12x².

Watch for: Reduce the exponent as well as multiplying by it. The constant 7 does not remain.

Open the lesson
Calculus

Tangent slopes

The slope of the tangent at x = t is f′(t).

WHEN TO USE ITUse this when a question asks how steep a curve is at a particular x-value.

See an example
f(x) = x² + 2x, at x = 3
  1. Differentiate: f′(x) = 2x + 2.
  2. Substitute into the derivative: f′(3) = 8.

Watch for: f(3) is the height of the point, not the tangent slope.

Open the lesson
Calculus

Definite integrals

If F′ = f, then the definite integral from a to b equals F(b) − F(a).

WHEN TO USE ITUse this to accumulate a continuous function over fixed bounds. This practice focuses on linear integrands.

See an example
∫₀² 3x dx
  1. An antiderivative is F(x) = (3/2)x².
  2. F(2) − F(0) = 6 − 0 = 6.

Watch for: Evaluate both bounds. A definite integral is a number, not an expression with + C.

Open the lesson
Calculus

Limits & removable discontinuities

If two functions agree for all inputs sufficiently close to aa, except possibly at aa, they have the same limit there.

WHEN TO USE ITUse this when direct substitution gives 0/0 and a common factor can be removed.

See an example
Find lim⁡x→1x2−1x−1\displaystyle\lim_{x\to1}\frac{x^2-1}{x-1}.
  1. Direct substitution gives 0/00/0, which is an indeterminate form, not an answer.
  2. Factor x2−1=(x−1)(x+1)x^2-1=(x-1)(x+1). For x≠1x\ne1, the fraction equals x+1x+1.
  3. As x→1x\to1, x+1→2x+1\to2. The limit is 2 even though the original fraction is undefined at 1.

Watch for: Cancelling a common factor does not fill the hole in the original domain. A limit and a function value are different questions.

Open the lesson
Calculus

The chain rule

ddxF(u(x))=F′(u(x))u′(x)\dfrac{d}{dx}F(u(x))=F'(u(x))u'(x).

WHEN TO USE ITUse this for powers or other functions applied to another expression.

See an example
Differentiate y=(3x2+1)4y=(3x^2+1)^4.
  1. Let u=3x2+1u=3x^2+1, so y=u4y=u^4. The outer derivative is 4u34u^3.
  2. The inner derivative is u′=6xu'=6x.
  3. Multiply and substitute back: y′=4(3x2+1)3(6x)=24x(3x2+1)3y'=4(3x^2+1)^3(6x)=24x(3x^2+1)^3.

Watch for: Differentiating the outer power alone misses the inner derivative. Do not change the inside expression while differentiating the outside.

Open the lesson
Calculus

Integration by substitution

With u=g(x)u=g(x) and du=g′(x) dxdu=g'(x)\,dx, replace the whole integrand consistently.

WHEN TO USE ITUse this after learning basic antiderivatives and recognizing inner functions.

See an example
Evaluate ∫2x(x2+1)3 dx\int 2x(x^2+1)^3\,dx.
  1. Choose u=x2+1u=x^2+1. Then du=2x dxdu=2x\,dx, exactly the remaining factor.
  2. Rewrite the integral as ∫u3 du=u4/4+C\int u^3\,du=u^4/4+C.
  3. Return to x: (x2+1)4/4+C(x^2+1)^4/4+C. Differentiating it gives the original integrand.

Watch for: Do not mix x and u after substituting. For a definite integral, change the bounds to u-values or substitute back before using the original bounds.

Open the lesson
Calculus

Integration by parts

∫u dv=uv−∫v du.\int u\,dv=uv-\int v\,du. Choose u and dv so the new integral is simpler.

WHEN TO USE ITUse this for products such as a polynomial times an exponential or a trigonometric function.

See an example
Evaluate ∫xex dx\int xe^x\,dx.
  1. Choose u=xu=x and dv=ex dxdv=e^x\,dx. Then du=dxdu=dx and v=exv=e^x.
  2. Apply the rule: xex−∫ex dxxe^x-\int e^x\,dx.
  3. Integrate the remaining term: xex−ex+C=(x−1)ex+Cxe^x-e^x+C=(x-1)e^x+C. Its derivative is xexxe^x.

Watch for: Keep the minus sign before the new integral. The symbol dv is a whole differential expression, not just a second variable.

Open the lesson
Calculus

Area between curves

A=∫ab(yupper(x)−ylower(x)) dx.A=\int_a^b\bigl(y_{\text{upper}}(x)-y_{\text{lower}}(x)\bigr)\,dx. Split the interval wherever the curve order changes.

WHEN TO USE ITUse this to calculate the area enclosed by two graphs, after identifying their order on each interval.

See an example
Find the area enclosed by y=xy=x and y=x2y=x^2.
  1. Solve x=x2x=x^2: x(x−1)=0x(x-1)=0, so the intersection bounds are 0 and 1.
  2. On 0<x<10<x<1, x−x2=x(1−x)>0x-x^2=x(1-x)>0. The line is above the parabola throughout this interval.
  3. Set up A=∫01(x−x2) dxA=\int_0^1(x-x^2)\,dx. An antiderivative is x2/2−x3/3x^2/2-x^3/3.
  4. Evaluate upper minus lower: A=(1/2−1/3)−0=1/6A=(1/2-1/3)-0=1/6 square units.

Watch for: A single test point needs a reason that no further crossings occur. Do not integrate lower minus upper and report a negative area.

Open the lesson
Calculus

Volumes with the disk method

The radius is ∣f(x)∣|f(x)|, so V=∫abπ[f(x)]2 dx.V=\int_a^b\pi[f(x)]^2\,dx.

WHEN TO USE ITUse this for a solid formed by rotating the region between y=f(x) and the x-axis around that same axis, without a central hole.

See an example
Rotate the region under y=xy=x on [0,2][0,2] about the x-axis. Find the volume.
  1. At position x, the disk radius is x, so its area is πx2\pi x^2.
  2. Set up V=∫02πx2 dxV=\int_0^2\pi x^2\,dx.
  3. An antiderivative is πx3/3\pi x^3/3. Evaluating at 2 and 0 gives V=8π/3V=8\pi/3 cubic units.

Watch for: Square the radius, not the entire circular area. A region separated from the axis has a hole and needs a washer formula with two radii.

Open the lesson
Trigonometry

Sine ratios

In a right triangle, sin θ = opposite / hypotenuse.

WHEN TO USE ITUse this when you know the opposite side and hypotenuse of a right triangle.

See an example
Opposite = 6, hypotenuse = 10
  1. sin θ = 6/10.
  2. Reduce the ratio: sin θ = 3/5.

Watch for: “Opposite” is relative to the chosen angle. The hypotenuse is opposite the right angle.

Open the lesson
Trigonometry

Cosine ratios

In a right triangle, cos θ = adjacent / hypotenuse.

WHEN TO USE ITUse this when you know the adjacent leg and hypotenuse of a right triangle.

See an example
Adjacent = 8, hypotenuse = 10
  1. cos θ = 8/10.
  2. Reduce the ratio: cos θ = 4/5.

Watch for: The adjacent leg is not the hypotenuse, even though both touch the angle.

Open the lesson
Trigonometry

Special angles

On the unit circle, sin θ is the y-coordinate. Special-angle values can be exact.

WHEN TO USE ITUse this for exact special-angle values and for connecting angles to circle coordinates.

See an example
sin(45°)
  1. A 45–45–90 triangle has side ratios 1 : 1 : √2.
  2. sin(45°) = 1/√2 = √2/2.

Watch for: The degree symbol matters. 45° and 45 radians are different angles.

Open the lesson
Trigonometry

The Pythagorean identity

sin⁡2θ+cos⁡2θ=1\sin^2\theta+\cos^2\theta=1. Check the quadrant before choosing a square-root sign.

WHEN TO USE ITUse this to recover sine or cosine from the other value when the quadrant is known.

See an example
If sin⁡θ=3/5\sin\theta=3/5 and θ is in quadrant II, find cos⁡θ\cos\theta.
  1. Rearrange: cos⁡2θ=1−9/25=16/25\cos^2\theta=1-9/25=16/25.
  2. The possible square roots are ±4/5\pm4/5.
  3. Cosine is negative in quadrant II, so cos⁡θ=−4/5\cos\theta=-4/5.

Watch for: A positive sine does not imply a positive cosine. Squaring removes the sign information, so the quadrant is essential.

Open the lesson
Trigonometry

The law of cosines

For sides a and b with included angle C, the opposite side satisfies c2=a2+b2−2abcos⁡Cc^2=a^2+b^2-2ab\cos C.

WHEN TO USE ITUse this when two sides and their included angle are known, or when all three sides are known.

See an example
A triangle has sides 5 and 7 with included angle 60∘60^\circ. Find the opposite side.
  1. Use c2=52+72−2(5)(7)cos⁡60∘c^2=5^2+7^2-2(5)(7)\cos60^\circ.
  2. Since cos⁡60∘=1/2\cos60^\circ=1/2, c2=25+49−35=39c^2=25+49-35=39.
  3. A side length is positive, so c=39c=\sqrt{39}.

Watch for: The angle must be between the two known sides. The opposite side is the one isolated on the left of the formula.

Open the lesson
Geometry

Triangle area

A triangle has area A = (1/2) × base × perpendicular height.

WHEN TO USE ITUse this when a triangle’s base and perpendicular height are given.

See an example
Base = 8 cm, height = 3 cm
  1. A = (1/2) × 8 × 3.
  2. A = 12 cm².

Watch for: A slanted side is not generally the perpendicular height.

Open the lesson
Geometry

Circle area

A circle has area A = πr², where r is the radius.

WHEN TO USE ITUse this to find the area enclosed by a circle, converting diameter to radius first if necessary.

See an example
Radius = 3 cm
  1. Square the radius: 3² = 9.
  2. A = 9π cm², an exact answer.

Watch for: 2πr gives circumference. The diameter must be halved before using it as r.

Open the lesson
Geometry

Pythagorean theorem

For a right triangle, a² + b² = c² with c the hypotenuse.

WHEN TO USE ITUse this only for a right triangle, with the hypotenuse correctly identified.

See an example
Perpendicular legs = 3 cm and 4 cm
  1. c² = 3² + 4² = 25.
  2. Lengths are nonnegative, so c = 5 cm.

Watch for: Add the squares, not the side lengths. This theorem requires a right triangle.

Open the lesson
Geometry

Similarity & scale factors

Length scale k gives perimeter scale k and area scale k2k^2. Corresponding angles stay equal.

WHEN TO USE ITUse this to connect corresponding lengths, perimeters, and areas in similar figures.

See an example
A 3–4–5 right triangle is enlarged by a scale factor of 3. Find its new sides and area.
  1. Multiply each side by 3: the new lengths are 9, 12, and 15.
  2. The original area is (1/2)(3)(4)=6(1/2)(3)(4)=6.
  3. The area scale is 32=93^2=9, so the new area is 6(9)=546(9)=54 square units. Directly, (1/2)(9)(12)=54(1/2)(9)(12)=54.

Watch for: The side lengths must correspond. Multiplying an area by the length scale alone misses one dimension.

Open the lesson
Geometry

Cylinder volume & units

V=πr2hV=\pi r^2h. If given a diameter d, first use r=d/2r=d/2.

WHEN TO USE ITUse this for a right circular cylinder when its radius and height are known.

See an example
A cylinder has radius 3 cm and height 5 cm. Find its exact volume.
  1. The circular base has area π(3)2=9π\pi(3)^2=9\pi square centimeters.
  2. Multiply by the height: V=9π(5)=45πV=9\pi(5)=45\pi.
  3. The exact volume is 45π cm345\pi\text{ cm}^3. Retain π unless a decimal approximation is requested.

Watch for: A diameter is twice the radius. Using diameter as r makes the calculated volume four times too large.

Open the lesson
Statistics

Mean

The arithmetic mean is the sum of the observations divided by their count.

WHEN TO USE ITUse this when you want the equal-share center of numerical data.

See an example
Values: 2, 4, 9
  1. Sum = 2 + 4 + 9 = 15.
  2. Mean = 15/3 = 5.

Watch for: Count every observation, including repeated values.

Open the lesson
Statistics

Median

The median is the middle value after sorting. With an even count, average the two middle values.

WHEN TO USE ITUse this to describe the middle of ordered numerical data, especially when extreme values matter.

See an example
Values: 9, 2, 5, 1, 8
  1. Sort: 1, 2, 5, 8, 9.
  2. The middle value is 5.

Watch for: The middle item in the original unsorted list is not necessarily the median.

Open the lesson
Statistics

Population variance

Population variance is the average squared distance from the population mean: Σ(x − μ)²/N.

WHEN TO USE ITUse this when the data are the entire population being described, rather than a sample used to estimate another population’s variance.

See an example
Entire population: 2, 4, 6
  1. Mean = 4. Squared deviations are 4, 0, and 4.
  2. Population variance = 8/3.

Watch for: For an entire population, divide by N. The N − 1 formula is a sample-variance estimator.

Open the lesson
Statistics

Standard deviation

For a population, σ=∑(xi−μ)2/N\sigma=\sqrt{\sum(x_i-\mu)^2/N}. A sample variance uses n−1n-1 in its denominator instead.

WHEN TO USE ITUse this after finding a mean and variance, when spread should be expressed in the original units.

See an example
Find the population standard deviation of 2, 4, and 6.
  1. The population mean is (2+4+6)/3=4(2+4+6)/3=4.
  2. The squared deviations are 4, 0, and 4. Population variance is 8/38/3.
  3. Take its square root: σ=8/3≈1.633\sigma=\sqrt{8/3}\approx1.633, in the same units as the observations.

Watch for: Do not confuse variance with standard deviation or silently switch between population and sample denominators.

Open the lesson
Statistics

Z-scores

z=(x−μ)/σz=(x-\mu)/\sigma, with σ>0\sigma>0. A z-score alone does not determine a percentile without distribution information.

WHEN TO USE ITUse this to compare positions within distributions with different means or spreads.

See an example
A score is 85, with population mean 70 and standard deviation 10. Find its z-score.
  1. Find the signed distance from the mean: 85−70=1585-70=15.
  2. Divide by the standard deviation: z=15/10=1.5z=15/10=1.5.
  3. The score lies 1.5 standard deviations above the mean; the z-score has no measurement units.

Watch for: Subtract the mean before dividing. A negative score is possible and simply indicates a value below the mean.

Open the lesson
Probability

Simple events

For equally likely outcomes, probability = favorable outcomes / total outcomes.

WHEN TO USE ITUse this for finite experiments with equally likely outcomes.

See an example
A bag contains 2 red and 3 blue counters.
  1. There are 5 equally likely counters.
  2. P(red) = 2/5.

Watch for: Use all possible outcomes in the denominator, not just the other color.

Open the lesson
Probability

Complements

The complement rule is P(not A) = 1 − P(A).

WHEN TO USE ITUse this when the opposite event is easier to count or its probability is already known.

See an example
P(red) = 2/5
  1. P(not red) = 1 − 2/5.
  2. P(not red) = 3/5.

Watch for: The event and its complement must cover every outcome and cannot overlap.

Open the lesson
Probability

Independent draws

For independent events, P(A and B) = P(A) × P(B).

WHEN TO USE ITUse this for repeated independent trials or draws with replacement and remixing.

See an example
Draw from a bag with 2 red and 3 blue counters twice, replacing and remixing between draws.
  1. Each draw has red probability 2/5.
  2. P(both red) = (2/5)(2/5) = 4/25.

Watch for: Without replacement, the second probability generally changes.

Open the lesson
Probability

Conditional probability

P(A∣B)=P(A∩B)/P(B)P(A\mid B)=P(A\cap B)/P(B), provided P(B)>0P(B)>0.

WHEN TO USE ITUse this when a question includes information such as given that or after the first draw.

See an example
A bag has 3 red and 2 blue counters. Given that the first draw was red and was not replaced, what is the chance the second is red?
  1. Remove the known first red counter. There are now 2 red counters and 2 blue counters.
  2. The updated sample space has 4 equally likely counters, so P(second red∣first red)=2/4=1/2P(\text{second red}\mid\text{first red})=2/4=1/2.
  3. Do not multiply by the probability of the first draw: the question already tells us that it was red.

Watch for: The probability that both draws are red is a different question. Without replacement, the second probability depends on the first result.

Open the lesson
Probability

Bayes’ rule & base rates

P(A∣B)=P(B∣A)P(A)/P(B)P(A\mid B)=P(B\mid A)P(A)/P(B). Include every way B can occur in the denominator.

WHEN TO USE ITUse this to update a probability after evidence such as a classification result.

See an example
Of 1,000 messages, 10% are spam. A filter flags 80% of spam and 10% of non-spam. Among flagged messages, what fraction are spam?
  1. There are 100 spam messages, of which 80 are flagged.
  2. There are 900 non-spam messages, of which 90 are flagged. The flagged group has 170 messages in total.
  3. The requested fraction is 80/170=8/17≈47.1%80/170=8/17\approx47.1\%, not 80%.

Watch for: Ignoring the starting proportion can badly distort the result. Always include false flags in the group you condition on.

Open the lesson
Linear algebra

Determinants

For A = [a b; c d], det(A) = ad − bc.

WHEN TO USE ITUse this to compute a 2×2 matrix’s determinant or interpret how it transforms area.

See an example
A = [2 1; 3 4]
  1. The diagonal products are 2 × 4 = 8 and 1 × 3 = 3.
  2. det(A) = 8 − 3 = 5.

Watch for: The subtraction order matters. Reversing it changes the sign.

Open the lesson
Linear algebra

Dot products

The Euclidean dot product multiplies matching coordinates and adds the products.

WHEN TO USE ITUse this to combine paired coordinates, test perpendicularity, or begin reasoning about projections.

See an example
u = (1, 2), v = (3, 4)
  1. u · v = (1)(3) + (2)(4).
  2. u · v = 3 + 8 = 11.

Watch for: The dot product is a scalar, not a vector of separate products.

Open the lesson
Linear algebra

Matrix × vector

Each coordinate of Av is the dot product of the corresponding row of A with v.

WHEN TO USE ITUse this when a matrix acts on a column vector of compatible size.

See an example
A = [2 1; 3 4], v = (1, 2)
  1. First coordinate: 2(1) + 1(2) = 4.
  2. Second coordinate: 3(1) + 4(2) = 11.

Watch for: Use a row of A with the entire input vector, rather than multiplying columns by each other.

Open the lesson
Linear algebra

Gaussian elimination

You may swap rows, multiply a row by a nonzero number, or add a multiple of one row to another.

WHEN TO USE ITUse this to solve linear systems systematically rather than choosing substitutions by inspection.

See an example
Solve x+2y=8x+2y=8 and x−y=2x-y=2 using row operations.
  1. Write the augmented matrix [1281−12]\left[\begin{array}{cc|c}1&2&8\\1&-1&2\end{array}\right].
  2. Replace row 2 with row 2 minus row 1: [1280−3−6]\left[\begin{array}{cc|c}1&2&8\\0&-3&-6\end{array}\right].
  3. The second row gives y=2y=2. Substituting into the first gives x=4x=4. Check: 4+2(2)=84+2(2)=8 and 4−2=24-2=2.

Watch for: Apply a row operation to the entire row, including the right-hand-side column. Never divide a row by zero.

Open the lesson
Linear algebra

Inverse of a 2×2 matrix

If ad−bc≠0ad-bc\ne0, then [abcd]−1=1ad−bc[d−b−ca].\begin{bmatrix}a&b\\c&d\end{bmatrix}^{-1}=\frac{1}{ad-bc}\begin{bmatrix}d&-b\\-c&a\end{bmatrix}.

WHEN TO USE ITUse this for a nonsingular 2×2 matrix, or to solve Ax=b when an inverse exists.

See an example
Find the inverse of A=[2111]A=\begin{bmatrix}2&1\\1&1\end{bmatrix}.
  1. The determinant is 2(1)−1(1)=12(1)-1(1)=1, so an inverse exists.
  2. Swap the diagonal entries and negate the off-diagonal entries: A−1=[1−1−12]A^{-1}=\begin{bmatrix}1&-1\\-1&2\end{bmatrix}.
  3. Multiply to check: AA−1=[1001]AA^{-1}=\begin{bmatrix}1&0\\0&1\end{bmatrix}, the identity matrix.

Watch for: Taking the reciprocal of every entry is not a matrix inverse. Check the determinant before dividing by it.

Open the lesson
Discrete math

Modular arithmetic

For a positive modulus m, write n = qm + r with 0 ≤ r < m. This r is the nonnegative remainder.

WHEN TO USE ITUse this for cyclic patterns, wrapping indices, and nonnegative remainders.

See an example
−17 mod 5
  1. −17 = (−4) × 5 + 3.
  2. The remainder is 3, so −17 and 3 are congruent modulo 5.

Watch for: Programming languages can use a signed remainder for negative inputs. These questions explicitly ask for the nonnegative representative.

Open the lesson
Discrete math

Combinations

Choose k distinct objects from n without regard to order using C(n, k) = n!/[k!(n − k)!].

WHEN TO USE ITUse this to choose distinct objects when order does not matter and repetition is not allowed.

See an example
Choose 3 people from a group of 8.
  1. Ordered selections: 8 × 7 × 6 = 336.
  2. Every group has 3! = 6 orderings.
  3. C(8, 3) = 336/6 = 56.

Watch for: If order matters, this is a permutation instead. A committee has no first, second, or third position.

Open the lesson
Discrete math

Graph degrees

In a finite undirected graph, the sum of vertex degrees is twice the number of edges.

WHEN TO USE ITUse this to connect the sum of degrees with the number of edges in a finite undirected graph.

See an example
Vertex degrees: 3, 1, 1, 1
  1. Add the degrees: 3 + 1 + 1 + 1 = 6.
  2. Each edge contributes to two endpoints.
  3. The graph has 6/2 = 3 edges.

Watch for: A degree counts edges incident to one vertex. Adding degrees counts each undirected edge twice.

Open the lesson
Discrete math

Permutations: when order matters

P(n,k)=n!/(n−k)!P(n,k)=n!/(n-k)! for integers 0≤k≤n0\le k\le n, when order matters and repetition is forbidden.

WHEN TO USE ITUse this for rankings, assigned roles, or ordered arrangements of distinct objects without replacement.

See an example
Five finalists compete for gold, silver, and bronze. How many different podiums are possible?
  1. There are 5 choices for gold. After selecting that person, there are 4 for silver.
  2. There are then 3 choices for bronze, with no finalist repeated.
  3. Multiply: 5⋅4⋅3=605\cdot4\cdot3=60. Changing the order changes the podium.

Watch for: A committee has no ranked positions, so it is a combination problem. With repetition allowed, this formula also changes.

Open the lesson
Discrete math

Inclusion–exclusion

∣A∪B∣=∣A∣+∣B∣−∣A∩B∣|A\cup B|=|A|+|B|-|A\cap B|.

WHEN TO USE ITUse this to count a union of two finite sets when their overlap is known.

See an example
Twelve students take art, nine take music, and four take both. How many take at least one of these subjects?
  1. Adding 12 and 9 gives 21 memberships, but each of the 4 shared students was counted twice.
  2. Subtract the overlap once: 12+9−4=1712+9-4=17.
  3. This is the number in at least one group. Students in neither group are not included.

Watch for: At least one includes people in both groups. Exactly one would subtract the overlap twice from the original sum.

Open the lesson
Number theory

Greatest common divisor

The Euclidean algorithm preserves the common divisors by replacing (a, b) with (b, a mod b).

WHEN TO USE ITUse the Euclidean algorithm to find the gcd of two positive integers efficiently.

See an example
gcd(48, 18)
  1. 48 = 18 × 2 + 12.
  2. 18 = 12 × 1 + 6.
  3. 12 = 6 × 2 + 0. The last nonzero divisor is 6.

Watch for: The final remainder is zero; the gcd is the divisor from that last division, not zero.

Open the lesson
Number theory

Least common multiple

For positive integers a and b, lcm(a, b) = ab/gcd(a, b).

WHEN TO USE ITUse this to find a shared positive multiple, such as a common denominator or a shared repeating cycle.

See an example
lcm(12, 18)
  1. gcd(12, 18) = 6.
  2. lcm(12, 18) = (12 × 18)/6.
  3. The least common multiple is 36.

Watch for: Multiplying the two numbers can count common prime factors twice. Divide out the gcd.

Open the lesson
Number theory

Prime exponents

In a prime factorization, the exponent of a prime counts how many copies of that prime occur.

WHEN TO USE ITUse this to identify the multiplicity of a chosen prime in a positive integer.

See an example
72 = 2³ × 3²
  1. 72/2 = 36, 36/2 = 18, and 18/2 = 9.
  2. The remaining 9 is odd. We removed three factors of 2.
  3. The exponent of 2 is 3.

Watch for: The exponent of 2 is neither the prime 2 itself nor the total number of factors from every prime.

Open the lesson
Number theory

Prime factorization & divisors

If n=p1a1⋯pkakn=p_1^{a_1}\cdots p_k^{a_k}, its number of positive divisors is (a1+1)⋯(ak+1)(a_1+1)\cdots(a_k+1).

WHEN TO USE ITUse this to count divisors of a positive integer once its prime factorization is known.

See an example
Find the prime factorization of 360 and count its positive divisors.
  1. Repeated division gives 360=23⋅32⋅5360=2^3\cdot3^2\cdot5.
  2. A divisor can use 0–3 copies of 2, 0–2 copies of 3, and 0–1 copies of 5.
  3. There are (3+1)(2+1)(1+1)=24(3+1)(2+1)(1+1)=24 choices, so 360 has 24 positive divisors.

Watch for: Include exponent zero: omitting a prime is allowed. Counting positive divisors is different from counting prime factors with repetition.

Open the lesson
Number theory

Modular exponentiation

Reduce each intermediate product modulo the same positive modulus. Combine powers using ordinary exponent rules.

WHEN TO USE ITUse this to find a power's remainder without expanding the full integer.

See an example
Find the nonnegative remainder of 3133^{13} modulo 7.
  1. Square and reduce: 32≡23^2\equiv2, 34≡43^4\equiv4, and 38≡2(mod7)3^8\equiv2\pmod7.
  2. Write 13=8+4+113=8+4+1, so 313=38⋅34⋅33^{13}=3^8\cdot3^4\cdot3.
  3. Multiply the remainders: 2⋅4⋅3=24≡3(mod7)2\cdot4\cdot3=24\equiv3\pmod7. The requested remainder is 3.

Watch for: Adding exponents corresponds to multiplying powers, not adding their remainders. Keep the modulus unchanged throughout the calculation.

Open the lesson

Saved lessons stay in this browser. Find them in My study space.