← Back to home

College Math Practice

Introductory college-level practice for students heading into these classes. Try each problem first, then open the worked solution.

Linear Algebra8 problems

First-year course for math, engineering, and computer science majors: matrices, vector spaces, and eigenvalues — the language behind computer graphics, data science, and quantum mechanics.

Problem 1Matrix multiplication

Let A = [[1, 2], [3, 4]] and B = [[2, 0], [1, 2]]. Compute AB.

Worked solution
  1. Multiply row by column: the (i, j) entry is row i of A dotted with column j of B.
  2. (1, 1): 1·2 + 2·1 = 4. (1, 2): 1·0 + 2·2 = 4.
  3. (2, 1): 3·2 + 4·1 = 10. (2, 2): 3·0 + 4·2 = 8.

Answer: AB = [[4, 4], [10, 8]]

Problem 2Determinants

Compute the determinant of [[2, 1, 0], [3, −1, 2], [0, 1, 1]].

Worked solution
  1. Expand along the first row.
  2. 2·((−1)(1) − 2·1) − 1·(3·1 − 2·0) + 0 = 2·(−3) − 3.
  3. So the determinant is −6 − 3.

Answer: −9

Problem 3Matrix inverses

Find the inverse of [[3, 1], [2, 1]].

Worked solution
  1. Determinant: 3·1 − 1·2 = 1.
  2. Swap the diagonal entries, negate the off-diagonal entries: [[1, −1], [−2, 3]].
  3. Divide by the determinant 1 — no change. Check: the product with the original is the identity.

Answer: [[1, −1], [−2, 3]]

Problem 4Solving linear systems

Solve: x + 2y + z = 6, 2x + y − z = 3, x − y + 2z = 5.

Worked solution
  1. Eliminate z: adding the first two equations gives 3x + 3y = 9, so x + y = 3.
  2. From the first and third equations: x + 5y = 7.
  3. Subtract: 4y = 4, so y = 1, x = 2, and then z = 6 − 2 − 2 = 2.

Answer: (x, y, z) = (2, 1, 2)

Problem 5Eigenvalues

Find the eigenvalues of [[4, 1], [2, 3]].

Worked solution
  1. Characteristic polynomial: det(A − λI) = (4 − λ)(3 − λ) − 2.
  2. That is λ² − 7λ + 10 = (λ − 5)(λ − 2).
  3. The roots are the eigenvalues.

Answer: 5 and 2

Problem 6Linear independence

Are the vectors (1, 2, 3), (2, 1, 0), and (0, 1, 1) linearly independent?

Worked solution
  1. Put them as rows of a matrix and take the determinant.
  2. det = 1·(1·1 − 1·0) − 2·(2·1 − 1·3) + 0 = 1 + 2 = 3 ≠ 0.
  3. A nonzero determinant means only the trivial combination gives the zero vector.

Answer: Yes, they are linearly independent

Problem 7Rank and nullity

For A = [[1, 2, 1], [2, 4, 2], [1, 1, 0]], find the rank and the nullity.

Worked solution
  1. Row 2 is twice row 1, so it adds nothing; rows 1 and 3 are independent.
  2. Rank = 2. By rank–nullity, nullity = 3 − 2.
  3. So the null space is one-dimensional.

Answer: Rank 2, nullity 1

Problem 8Linear transformations

Let T(x, y) = (x + y, x − y). By what factor does T scale areas?

Worked solution
  1. The matrix of T is [[1, 1], [1, −1]].
  2. Its determinant is (1)(−1) − (1)(1) = −2.
  3. Area scales by the absolute value of the determinant.

Answer: 2

Multivariable Calculus8 problems

The third calculus course: functions of several variables, gradients, multiple integrals, and optimization — the math behind physics, economics, and machine learning.

Problem 1Partial derivatives

Let f(x, y) = x³y + 2xy². Find fx(1, 2) and fy(1, 2).

Worked solution
  1. fx = 3x²y + 2y², so fx(1, 2) = 6 + 8 = 14.
  2. fy = x³ + 4xy, so fy(1, 2) = 1 + 8 = 9.

Answer: (14, 9)

Problem 2Directional derivatives

Let f(x, y) = x² + 3xy. Find the directional derivative at (1, 1) in the direction of (3, 4).

Worked solution
  1. ∇f = (2x + 3y, 3x), so ∇f(1, 1) = (5, 3).
  2. The unit vector in direction (3, 4) is (3/5, 4/5).
  3. Directional derivative = (5, 3) · (3/5, 4/5) = 15/5 + 12/5.

Answer: 27/5

Problem 3Tangent planes

Find the tangent plane to the surface z = x² + y² at the point (1, 2).

Worked solution
  1. At (1, 2): z = 5, fx = 2x = 2, fy = 2y = 4.
  2. Plane: z = 5 + 2(x − 1) + 4(y − 2).
  3. Simplify: z = 2x + 4y − 5.

Answer: z = 2x + 4y − 5

Problem 4Chain rule

Let w = x²y with x = t² and y = t + 1. Find dw/dt at t = 1.

Worked solution
  1. Substitute: w = t⁴(t + 1) = t⁵ + t⁴.
  2. dw/dt = 5t⁴ + 4t³.
  3. At t = 1: 5 + 4.

Answer: 9

Problem 5Double integrals

Evaluate ∫∫R (x + 2y) dA, where R = [0, 1] × [0, 2].

Worked solution
  1. Inner integral: ∫₀¹ (x + 2y) dx = 1/2 + 2y.
  2. Outer integral: ∫₀² (1/2 + 2y) dy = [y/2 + y²]₀² = 1 + 4.
  3. So the volume under the plane over R is 5.

Answer: 5

Problem 6Critical points

Find and classify the critical points of f(x, y) = x² + y² − 2x − 4y + 3.

Worked solution
  1. fx = 2x − 2 = 0 gives x = 1; fy = 2y − 4 = 0 gives y = 2.
  2. Second-derivative test: D = fxxfyy − fxy² = 2·2 − 0 = 4 > 0, and fxx = 2 > 0.
  3. So (1, 2) is a local minimum, with value 1 + 4 − 2 − 8 + 3.

Answer: Local minimum −2 at (1, 2)

Problem 7Lagrange multipliers

Maximize f(x, y) = xy subject to x + y = 10, with x, y > 0.

Worked solution
  1. Substitute y = 10 − x: f = x(10 − x) = 10x − x².
  2. This downward parabola has its vertex at x = 5, so y = 5.
  3. Maximum value: 5 · 5.

Answer: 25 at (5, 5)

Problem 8Integrals in polar coordinates

Evaluate ∫∫D (x² + y²) dA, where D is the unit disk.

Worked solution
  1. In polar coordinates x² + y² = r² and dA = r dr dθ.
  2. ∫₀2π ∫₀¹ r³ dr dθ = 2π · [r⁴/4]₀¹ = 2π · 1/4.
  3. So the integral is π/2.

Answer: π/2

Discrete Math8 problems

The mathematics of counting, logic, and structures: the foundation course for computer science — algorithms, cryptography, and proofs.

Problem 1Counting

How many 4-letter strings can be formed from {A, B, C, D, E} if no letter is used twice?

Worked solution
  1. Choose the first letter: 5 options; then 4, then 3, then 2.
  2. Multiply: 5 · 4 · 3 · 2.
  3. This is the permutation count P(5, 4).

Answer: 120

Problem 2Pigeonhole principle

How many students guarantee that at least 3 of them share a birth month?

Worked solution
  1. With 2 students per month, 24 students can avoid any triple.
  2. The 25th student must join a month that already has 2.
  3. So 25 students force a shared triple.

Answer: 25

Problem 3Modular arithmetic

Solve 3x ≡ 7 (mod 11).

Worked solution
  1. The inverse of 3 mod 11 is 4, since 3 · 4 = 12 ≡ 1 (mod 11).
  2. Multiply both sides by 4: x ≡ 7 · 4 = 28.
  3. 28 ≡ 6 (mod 11).

Answer: x ≡ 6 (mod 11)

Problem 4Logic

Write the negation of the statement: “For every x, if P(x) then Q(x).”

Worked solution
  1. Negating a universal statement gives an existential one: ¬∀x (P(x) → Q(x)) becomes ∃x ¬(P(x) → Q(x)).
  2. And ¬(P → Q) is equivalent to P ∧ ¬Q.
  3. In words: some x makes P true while Q fails.

Answer: ∃x (P(x) ∧ ¬Q(x))

Problem 5Mathematical induction

Prove that 1 + 2 + … + n = n(n + 1)/2 for every positive integer n.

Worked solution
  1. Base case n = 1: 1 = 1·2/2. True.
  2. Inductive step: assume it holds for k. Then 1 + … + k + (k + 1) = k(k + 1)/2 + (k + 1).
  3. Factor: (k + 1)(k/2 + 1) = (k + 1)(k + 2)/2, which is the formula for k + 1.

Answer: The formula holds for all positive integers n (proof by induction)

Problem 6Graph theory

A graph has 8 vertices with degrees 3, 3, 2, 2, 2, 2, 2, 2. How many edges does it have? Does it have an Euler circuit? An Euler trail?

Worked solution
  1. Edges = (sum of degrees)/2 = 18/2.
  2. Exactly 2 vertices have odd degree, so an Euler trail exists but an Euler circuit does not.
  3. A circuit needs every vertex to have even degree.

Answer: 9 edges; Euler trail yes, Euler circuit no

Problem 7Recurrence relations

A sequence satisfies a₀ = 1 and aₙ = 2aₙ₋₁ + 1. Find a₄.

Worked solution
  1. Compute forward: a₁ = 2·1 + 1 = 3, a₂ = 7, a₃ = 15.
  2. Then a₄ = 2·15 + 1.
  3. Closed form check: aₙ = 2n+1 − 1, so a₄ = 32 − 1.

Answer: 31

Problem 8Set theory

If |A| = 12, |B| = 9, and |A ∪ B| = 15, find |A ∩ B|.

Worked solution
  1. Inclusion–exclusion: |A ∪ B| = |A| + |B| − |A ∩ B|.
  2. So 15 = 12 + 9 − |A ∩ B|.
  3. Therefore |A ∩ B| = 21 − 15.

Answer: 6

Elementary Differential Equations8 problems

The course where calculus models the real world: population growth, circuits, springs, and mixing tanks — solved with separable, linear, and second-order methods.

Problem 1Separable equations

Solve dy/dx = 2xy with y(0) = 3.

Worked solution
  1. Separate: dy/y = 2x dx. Integrate: ln|y| = x² + C.
  2. So y = Cex². The initial condition gives C = 3.
  3. The solution grows like ex².

Answer: y = 3ex²

Problem 2First-order linear equations

Solve y′ + 2y = 4 with y(0) = 1.

Worked solution
  1. Integrating factor: e∫2 dx = e2x. Then (ye2x)′ = 4e2x.
  2. Integrate: ye2x = 2e2x + C, so y = 2 + Ce−2x.
  3. y(0) = 1 gives C = −1.

Answer: y = 2 − e−2x

Problem 3Second-order homogeneous equations

Solve y″ − 3y′ + 2y = 0.

Worked solution
  1. Characteristic equation: r² − 3r + 2 = 0, so r = 1 or r = 2.
  2. Distinct real roots give two exponential solutions.
  3. General solution: a combination of ex and e2x.

Answer: y = C₁ex + C₂e2x

Problem 4Undetermined coefficients

Find a particular solution of y″ − y = e2x.

Worked solution
  1. Try yp = Ae2x. Then yp″ = 4Ae2x.
  2. Substitute: 4A − A = 1, so A = 1/3.
  3. No resonance here, since 2 is not a root of r² − 1 = 0.

Answer: yp = (1/3)e2x

Problem 5Initial value problems

Solve y″ + 4y = 0 with y(0) = 1 and y′(0) = 0.

Worked solution
  1. Characteristic equation: r² + 4 = 0, so r = ±2i.
  2. General solution: y = C₁cos 2x + C₂sin 2x.
  3. y(0) = 1 gives C₁ = 1; y′(0) = 2C₂ = 0 gives C₂ = 0.

Answer: y = cos 2x

Problem 6Euler's method

Use Euler's method with step h = 0.5 to estimate y(1) for y′ = x + y, y(0) = 1.

Worked solution
  1. Step 1: y(0.5) ≈ 1 + 0.5·(0 + 1) = 1.5.
  2. Step 2: y(1) ≈ 1.5 + 0.5·(0.5 + 1.5) = 1.5 + 1.0.
  3. Two steps of size 0.5 reach x = 1.

Answer: ≈ 2.5

Problem 7Mixing problems

A tank holds 100 L of water with 10 kg of salt dissolved. Brine at 0.5 kg/L flows in at 4 L/min, and the well-mixed solution drains at 4 L/min. How much salt is in the tank after t minutes?

Worked solution
  1. Salt changes at (inflow rate) − (outflow rate): dA/dt = 4·0.5 − (4/100)A = 2 − A/25.
  2. Solve the linear equation: A(t) = 50 + Ce−t/25.
  3. A(0) = 10 gives C = −40. As t → ∞, the salt approaches 50 kg.

Answer: A(t) = 50 − 40e−t/25 kg

Problem 8Repeated roots

Solve y″ − 4y′ + 4y = 0.

Worked solution
  1. Characteristic equation: r² − 4r + 4 = (r − 2)² = 0, a repeated root r = 2.
  2. One solution is e2x; for a repeated root the second is xe2x.
  3. General solution: any combination of the two.

Answer: y = (C₁ + C₂x)e2x

All problems are original practice written for these classes, not past exam questions. Video walkthroughs for these problems are coming — for now, try each problem first, then open the worked solution.