ML Foundations

Learn / ML Foundations

ML Foundations: Calculus and Gradients

Foundational quiz on derivatives, partial derivatives, gradients, the chain rule, and convexity.

Learning path

0%

0 of 3 sections marked complete · about 25 minutes

Learning objectives

What you will be able to explain

  • What does a derivative measure?
  • Differentiate a simple function
  • What is the gradient of a multivariable function?
  • Compute partial derivatives at a point
  • Which direction does the negative gradient point?
  • Match each function to its derivative

Section 01

What does a derivative measure? to What is the gradient of a multivariable function?

01

What does a derivative measure?

The derivative tells us how quickly the output changes for a small change in the input. This idea drives gradient-based optimization in ML.

Guided checkpoint

Choose the best interpretation.

02

Differentiate a simple function

Since f(x)=2xf'(x) = 2x, we get f(3)=6f'(3) = 6. Quadratics are the basic building blocks of many optimization examples.

Guided checkpoint

Compute the derivative of f(x)=x2f(x) = x^2 at x=3x = 3.

03

What is the gradient of a multivariable function?

For a scalar-valued function of several variables, the gradient stacks the partial derivatives into a vector. It points in the direction of steepest increase.

Guided checkpoint

Choose the correct definition.

Section 02

Compute partial derivatives at a point to Match each function to its derivative

01

Compute partial derivatives at a point

We have f/x=2x+3y\partial f / \partial x = 2x + 3y and f/y=3x+2y\partial f / \partial y = 3x + 2y. At (1,2)(1, 2) this becomes (8,7)(8, 7).

Guided checkpoint

Let f(x,y)=x2+3xy+y2f(x, y) = x^2 + 3xy + y^2. Compute the gradient at (x,y)=(1,2)(x, y) = (1, 2).

02

Which direction does the negative gradient point?

The gradient points uphill, so its negative points downhill. Gradient descent uses this fact to reduce a loss function.

Guided checkpoint

Choose the best answer.

03

Match each function to its derivative

These derivatives come up constantly when differentiating losses, activations, and probabilistic models.

Guided checkpoint

Match the function with its standard derivative.

Section 03

Apply the chain rule to Compute a one-dimensional gradient value

01

Apply the chain rule

Let u=3x+1u = 3x + 1. Then g(x)=u2g(x) = u^2, so g(x)=2uu=2(3x+1)3=6(3x+1)g'(x) = 2u \cdot u' = 2(3x + 1) \cdot 3 = 6(3x + 1).

Guided checkpoint

What is the derivative of g(x)=(3x+1)2g(x) = (3x + 1)^2?

02

Gradient facts: true or false

These are core optimization facts. They explain why gradients help with minimization and why convex objectives are especially attractive.

Guided checkpoint

Mark each statement as true or false.

03

Compute a one-dimensional gradient value

The derivative is f(w)=2(w4)f'(w) = 2(w - 4). Evaluating at w=1w = 1 gives 2(3)=62(-3) = -6.

Guided checkpoint

Let f(w)=(w4)2f(w) = (w - 4)^2. Compute f(w)f'(w) at w=1w = 1.

Knowledge check

Turn understanding into recall.

The quiz now follows the same concepts in scored form. You can return to this lesson from the quiz whenever a gap appears.