Lesson 3.14 · Stage 03: The maths behind machine learning
Maths answers and what to read next
Answers to every Try it question in the eleven maths chapters, and the books to move on to.
Answers to “Try it”
Chapter 1
- x = 5 (4x = 20).
- f(4) = 12 − 2 = 10.
- (8 − 2) ÷ (3 − 1) = 3.
- 1 + 4 + 9 = 14.
- √49 = 7 and 2⁵ = 32.
Chapter 2
- (5, 4).
- (3, −6, 12).
- √(36 + 64) = 10.
- 8 − 3 = 5.
- 2 − 2 = 0, so the two arrows are at right angles.
Chapter 3
- (4 + 2, 0 + 3) = (6, 3).
- [[3, 1], [7, 4]].
- [[1, 3], [2, 4]].
- 3 × 2 − 1 × 4 = 2.
- x = 3, y = 2.
Chapter 4
- Difference (3, 4), distance 5.
- Length 10, unit vector (0.6, 0.8).
- Dot product 6; lengths 2 and √18 ≈ 4.24; cos θ ≈ 0.707, so θ = 45°.
- Yes: 12 − 12 = 0.
- (4, 0).
Chapter 5
- Yes, λ = 4.
- A × (1, 0) = (3, 0) = 3 × (1, 0). Yes, λ = 3.
- A × (1, 2) = (4, 5), not a multiple of (1, 2). No.
- (4 − λ)(3 − λ) − 2 = λ² − 7λ + 10 = 0, so λ = 2 or 5.
Chapter 6
- 4x³.
- 15x² − 2.
- 2 × (−2) = −4.
- 2(3x − 1) × 3 = 6(3x − 1).
- 2x − 6 = 0 gives x = 3; smallest value 9 − 18 + 10 = 1.
Chapter 7
- ∂f/∂x = 4, ∂f/∂y = 4y.
- ∇f = (2xy, x²) = (6, 9).
- ∇f = (2w₁, 2w₂) = (6, 8). Steepest downhill is (−6, −8).
- ŷ = 3, so dL/dŷ = 2 × (3 − 2) = 2. dL/dw₂ = 2 × 1 = 2. dL/dw₁ = 2 × 3 × 2 = 12. Both positive: decrease the weights.
Chapter 8
- 3/8.
- 6 of the 36 outcomes give 7, so 1/6.
- 6! ÷ (2! × 4!) = 15.
- 20 ÷ 30 = 2/3.
- P(positive) = 0.02 × 0.95 + 0.98 × 0.10 = 0.117. P(sick | positive) = 0.019 ÷ 0.117 ≈ 0.16.
Chapter 9
- 10 × 0.2 = ₹2.
- Mean 5; squared distances 9, 1, 1, 9; variance 20 ÷ 4 = 5; standard deviation √5 ≈ 2.24.
- C(4, 2) ÷ 16 = 6/16 = 3/8.
- 50 to 70 is mean ± 2σ, so about 95%.
- 1 − 0.7 = 0.3.
Chapter 10
- x goes 4 → 2 → 1 → 0.5 (each step halves x).
- Slope 2x + 2, second derivative 2, never negative. Yes, convex.
- x = y = 4, product 16.
- 2x = λ and 2y = 2λ, so y = 2x. Then x + 4x = 5 gives x = 1, y = 2, minimum value 5.
What to read next
- Watch alongside this book: 3Blue1Brown’s Essence of Linear Algebra and Essence of Calculus on YouTube. They turn Chapters 2–7 into moving pictures.
- Then read Mathematics for Machine Learning (the PDF you have). Chapters 2–7 match this book’s Chapters 2–10 at a deeper level. Chapters 9–12 are the four ML applications.
- Stuck on school basics? Khan Academy and the NCERT class 11–12 maths textbooks (both free) cover Chapters 1, 6, 8 and 9 in more depth.
- After MML: Blitzstein & Hwang for probability, ISL for statistics, Prince’s Understanding Deep Learning for neural networks.