Gradient Vector Calculator
Enter a function f(x,y) and a point (a, b) to instantly compute the gradient vector and visualize the direction of steepest ascent.
Function & Point
Use ^, *, sin(), cos(), exp(), log(), sqrt(), PI
Quick Examples
Gradient Vector ∇f(a, b)
∂f/∂x
—
∂f/∂y
—
∇f = (
—
)
Magnitude & Unit Vector
‖∇f‖
—
Unit direction
—
Steepest Ascent Angle
—
Angle of ∇f measured from the positive x-axis
Enter a function and point, then click Compute Gradient.
Gradient Direction (at point)
Arrow = gradient direction | Length proportional to magnitude
Summary
Enter a function f(x,y) and a point (a, b) to instantly compute the gradient vector and visualize the direction of steepest ascent.
How it works
- Enter your function f(x, y) using standard math notation (e.g. x^2 + y^2).
- Specify the point (x, y) where you want to evaluate the gradient.
- The calculator computes partial derivatives ∂f/∂x and ∂f/∂y symbolically via finite differences.
- The gradient vector ∇f(a, b) = (∂f/∂x, ∂f/∂y) is displayed at the given point.
- A canvas diagram shows the gradient arrow overlaid on a contour-like background.
- The magnitude ‖∇f‖ and the unit direction vector are also shown.
Use cases
- Check partial derivative calculations for multivariable calculus homework.
- Find the steepest ascent direction for optimization problems.
- Visualize gradient fields for machine learning intuition (gradient descent).
- Verify analytical gradients against numeric approximations.
- Understand saddle points and local extrema in two-variable functions.
- Explore how changing x or y affects the gradient direction.
Frequently Asked Questions
Last updated: 2026-07-23 ·
Reviewed by Nham Vu