Calculus & Optimization Basics
Level 1 Examination — Recognition
Time Limit: 20 minutes Total Marks: 30
Instructions: Answer all questions. For True/False items, a one-line justification is required for full marks. Use for any math you write.
Part A — Multiple Choice (1 mark each, 10 marks)
Q1. The gradient descent update rule for parameter with learning rate is: (a) (b) (c) (d)
Q2. For , the partial derivative is: (a) (b) (c) (d)
Q3. The Hessian matrix of a scalar function contains: (a) first-order partial derivatives (b) second-order partial derivatives (c) directional derivatives only (d) the function values
Q4. A function is convex if its Hessian is everywhere: (a) negative definite (b) positive semidefinite (c) singular (d) skew-symmetric
Q5. The derivative of using the chain rule is: (a) (b) (c) (d)
Q6. A saddle point of is a critical point where the Hessian is: (a) positive definite (b) negative definite (c) indefinite (d) zero matrix
Q7. If the learning rate is chosen too large, gradient descent typically: (a) converges faster with no downside (b) oscillates or diverges (c) always finds the global minimum (d) stops immediately
Q8. The Jacobian of a vector function has dimensions: (a) (b) (c) (d)
Q9. The first-order Taylor approximation of about is: (a) (b) (c) (d)
Q10. The directional derivative of in the direction of unit vector equals: (a) (b) (c) (d)
Part B — Matching (5 marks)
Q11. Match each term (Column X) to its definition (Column Y). Write pairs like 1-c.
| Column X | Column Y |
|---|---|
| 1. Local minimum | a. Point where every partial derivative is zero |
| 2. Global minimum | b. Lowest value in a small neighborhood |
| 3. Critical point | c. Method for constrained optimization using |
| 4. Lagrange multiplier | d. Lowest value over the entire domain |
| 5. Continuity | e. |
Part C — True/False with justification (3 marks each, 15 marks)
Q12. A differentiable function is always continuous. (True/False + one-line reason.)
Q13. At any local minimum of a differentiable function, the gradient is the zero vector.
Q14. For a convex function, every local minimum is also a global minimum.
Q15. The gradient points in the direction of steepest decrease of .
Q16. By Clairaut's theorem, for a function with continuous second partials, .
Answer keyMark scheme & solutions
Part A — MCQ (1 mark each)
Q1. (b) — Gradient descent moves against the gradient to reduce the loss. (1)
Q2. (b) — Treat as constant; . (1)
Q3. (b) — The Hessian is the matrix of second-order partials . (1)
Q4. (b) — Convexity ⇔ Hessian positive semidefinite everywhere. (1)
Q5. (b) — chain rule: outer times inner , . (1)
Q6. (c) — A saddle has indefinite Hessian (mixed positive/negative curvature). (1)
Q7. (b) — Too large overshoots the minimum → oscillation/divergence. (1)
Q8. (c) — rows = outputs (), columns = inputs (). (1)
Q9. (b) — First-order Taylor: . (1)
Q10. (b) — directional derivative = dot product of gradient with unit direction. (1)
Part B — Matching (1 mark each, 5 total)
Q11. 1-b, 2-d, 3-a, 4-c, 5-e
- Local min = lowest in neighborhood (b); Global min = lowest over domain (d); Critical point = zero partials (a); Lagrange multiplier = constrained method (c); Continuity = limit equals value (e). (5)
Part C — True/False + justification (3 each)
Q12. True. (1) Differentiability at a point implies the limit defining the derivative exists, which forces the function to be continuous there. (2) (Converse is false: is continuous but not differentiable at 0.)
Q13. True. (1) A differentiable interior local minimum is a stationary point, so (first-order necessary condition). (2)
Q14. True. (1) Convexity guarantees no separate lower valley elsewhere; any local min is global. (2) (Non-convex functions can have multiple distinct local minima.)
Q15. False. (1) The gradient points in the direction of steepest increase; steepest decrease is . (2)
Q16. True. (1) Clairaut/Schwarz theorem: with continuous second partials, mixed partials are equal (symmetric Hessian). (2)
[
{"claim":"Q2: d/dy of x^2*y equals x^2","code":"x,y=symbols('x y'); result = diff(x**2*y,y)==x**2"},
{"claim":"Q5: d/dx of sin(x^2) equals 2x*cos(x^2)","code":"x=symbols('x'); result = simplify(diff(sin(x**2),x)-2*x*cos(x**2))==0"},
{"claim":"Q16: mixed partials of a smooth function are equal","code":"x,y=symbols('x y'); f=x**3*y**2+sin(x*y); result = simplify(diff(f,x,y)-diff(f,y,x))==0"},
{"claim":"Q9: first-order Taylor of exp about 0 is 1+x","code":"x=symbols('x'); result = series(exp(x),x,0,2).removeO()==1+x"}
]