ApX logoApX logo
ModelsCalculatorHardwareCoursesPricing
ApX logoApX logo
ModelsCalculatorHardwareCoursesPricing

All Courses

Calculus Fundamentals for Machine Learning
Chapter 1: Why Calculus for Machine Learning?
The Role of Math in Machine Learning
Introducing Functions: Inputs and Outputs
Visualizing Functions: Graphs
What is a Limit?
Intuition Behind Limits
Connecting Functions and Limits to ML
Quiz for Chapter 1
Chapter 2: Derivatives: Measuring Change
Rate of Change: Average vs Instantaneous
The Derivative: Slope of a Tangent Line
Derivative Notation (Leibniz and Lagrange)
Calculating Derivatives: The Power Rule
Calculating Derivatives: Constants and Sums
Introduction to Higher-Order Derivatives
Practice: Calculating Simple Derivatives
Quiz for Chapter 2
Chapter 3: Optimization with Derivatives
Finding Maximum and Minimum Points
Optimization: Why Minimize or Maximize?
Cost Functions in Machine Learning
Goal: Minimizing the Cost Function
Introduction to Gradient Descent
How Derivatives Guide Gradient Descent
Visualizing Gradient Descent
Quiz for Chapter 3
Chapter 4: Handling Multiple Inputs: Partial Derivatives
Functions of Multiple Variables
Partial Derivatives: The Concept
Calculating Partial Derivatives
Partial Derivative Notation
The Gradient Vector
Geometric Meaning of the Gradient
Practice: Calculating Partial Derivatives and Gradients
Quiz for Chapter 4
Chapter 5: Calculus in Action: Simple Optimization
Recap: Optimization Goal and Gradient Descent
Example: Simple Linear Regression Model
Defining a Cost Function for Linear Regression
Calculating Gradients for the Cost Function
Performing a Gradient Descent Step
The Learning Rate Parameter
Putting It All Together: The Optimization Process
Hands-on Practical: Manual Gradient Calculation
Quiz for Chapter 5

Partial Derivatives: The Concept

Functions with more than one input are central to modeling complex phenomena. For example, predicting house prices involves multiple factors. The price doesn't just depend on the square footage (x1x_1x1​); it also depends on the number of bedrooms (x2x_2x2​), the age of the house (x3x_3x3​), and its distance from the city center (x4x_4x4​). A prediction function for this situation might be Price=f(x1,x2,x3,x4)Price = f(x_1, x_2, x_3, x_4)Price=f(x1​,x2​,x3​,x4​).

When we have a function like this, f(x,y)f(x, y)f(x,y), we often want to know: how does the output change if we only adjust xxx, keeping yyy fixed? Or, how does it change if we only adjust yyy, keeping xxx fixed? This is precisely what partial derivatives help us understand.

Imagine you're standing on a hillside. Your altitude (the output value, let's call it zzz) depends on your position in two directions: how far East you are (let's call this xxx) and how far North you are (let's call this yyy). So, z=f(x,y)z = f(x, y)z=f(x,y).

If you want to know how steep the hill is specifically in the East direction, you'd only look at your change in altitude as you move East or West, without moving North or South. You're essentially treating the North-South position (yyy) as constant for that moment and measuring the slope only along the East-West (xxx) direction.

That's the core idea of a partial derivative.

A partial derivative measures the rate of change of a multi-variable function with respect to one specific variable, while holding all other variables constant. It tells us the slope of the function along a direction parallel to one of the input axes.

Instead of using the ddd notation like dfdx\frac{df}{dx}dxdf​ which we used for single-variable functions, we use a curly symbol, ∂\partial∂, called "del" or simply "partial".

  • The partial derivative of fff with respect to xxx is written as ∂f∂x\frac{\partial f}{\partial x}∂x∂f​ or sometimes fxf_xfx​. It tells us how fff changes as only xxx changes.
  • The partial derivative of fff with respect to yyy is written as ∂f∂y\frac{\partial f}{\partial y}∂y∂f​ or sometimes fyf_yfy​. It tells us how fff changes as only yyy changes.

For example, the function f(x,y)=x2+y2f(x, y) = x^2 + y^2f(x,y)=x2+y2 describes a bowl shape in 3D space.

A plot of the function f(x,y)=x2+y2f(x, y) = x^2 + y^2f(x,y)=x2+y2. The height of the surface represents the function's output.

If we want to find ∂f∂x\frac{\partial f}{\partial x}∂x∂f​ at a specific point, say (1,1)(1, 1)(1,1), we're asking: if we stand at the point on the surface where x=1x=1x=1 and y=1y=1y=1, and we only move in the xxx direction (keeping y=1y=1y=1), what is the slope of the surface?

To think about calculating ∂f∂x\frac{\partial f}{\partial x}∂x∂f​, we treat the variable yyy as if it were just a constant number. Similarly, when we want to calculate ∂f∂y\frac{\partial f}{\partial y}∂y∂f​, we treat xxx as a constant. The actual rules for differentiation (like the power rule you learned earlier) still apply, but you apply them only to the variable you're differentiating with respect to, while the others are treated just like any other number. We'll explore the mechanics of calculating these in the next section.

The important concept here is isolation: a partial derivative isolates the effect of changing a single input variable on the function's output. This is fundamental for understanding how complex models respond to changes in different features or parameters, and it's the building block for the gradient, which we'll see soon.

  • Multivariable Calculus (18.02SC), MIT OpenCourseWare, 2010 (Massachusetts Institute of Technology) - Comprehensive video lectures and accompanying notes from MIT, offering a foundational explanation of partial derivatives.

© 2026 ApX Machine Learning