Gradient Calculator (Multivariable)
Compute the gradient vector of f(x, y) or f(x, y, z) symbolically and evaluate it, with its magnitude, at a point.
Gradient Calculator (Multivariable)
Compute the gradient vector of f(x, y) or f(x, y, z) symbolically and evaluate it, with its magnitude, at a point.
How this page computes
The gradient is the vector of partial derivatives. The page differentiates the expression once per variable it uses, then evaluates each component at the point, so the vector and the magnitude come from the same formulas.
On x^2 + 3·y^2 the components are 2·x and 6·y; at (1, 2) the gradient is (2, 12) and its magnitude is 12.1655250606. A third variable is included automatically when the expression uses z.
The page needs at least two coordinate variables. An expression in x alone is refused with a sentence saying so, because a one-dimensional gradient is the ordinary derivative page's job.
The calculation runs entirely in this browser tab; nothing is uploaded.
A gradient is a vector, and the page prints all of it: each partial derivative as a formula, then the vector at your point, then its length. For x^2 + 3·y^2 at (1, 2) that is (2, 12) with magnitude 12.1655250606.
The direction of the gradient is the direction of steepest increase, and its length is the rate of that increase per unit distance. Both facts follow from the vector, so the page prints the length rather than describing it.
How to use Gradient Calculator (Multivariable)
Type the expression in x and y, or in x, y and z. The page reads which variables appear and differentiates with respect to each of them.
Set the point (x0, y0, z0). Coordinates for a variable the expression does not use are ignored.
Read the vector on the ∇f line and the length on the |∇f| line. The components above them are the formulas that produced the numbers.
How the method works
Each component of the gradient is an ordinary partial derivative. Taking them symbolically means the vector at every point is available from one parse, and the point value is a substitution rather than a numerical difference with a step to justify.
The magnitude is the square root of the sum of squares of the components. On a surface it is the slope in the steepest direction, which is why the page prints it next to the vector instead of leaving the reader to compute it.
What to Expect
Best for
- The gradient vector of an elementary function of two or three variables
- Checking the direction of steepest increase at a point
- Getting the magnitude as well as the components
Not ideal for
- A one-variable function, which is the ordinary derivative page
- A numerical gradient of a table of values
- A function outside the supported grammar
What this tool keeps
- Every coefficient and variable exactly as typed
What may need cleanup
- Nothing: the gradient and its length are final
Common errors
- An expression with fewer than two coordinate variables is refused with the count
- An unsupported function is refused by name
- A non-finite component at the chosen point is refused rather than printed
Example use cases
- Gradient of x^2 + 3·y^2 at (1, 2)
- Gradient of x·y·z at (1, 1, 1)
- Check the magnitude of the steepest ascent
Sample input
f(x, y) = x^2 + 3·y^2 at (1, 2)
Sample output
∇f = (2, 12) and |∇f| = 12.1655250606
Who this is for
- Students meeting multivariable calculus
- Readers checking a machine-learning gradient by hand
Frequently asked questions
Why are there two components and not one?
Because the function has two inputs. Each component is the rate of change in one coordinate direction, and together they describe the direction in which the function rises fastest.
What is the magnitude for?
It is the slope in the steepest direction. A vector tells you where to go; its length tells you how steep it is there, which is what a step-size or learning-rate question usually needs.
Can the expression use z?
Yes. If z appears, the page adds a third component automatically. If it does not, the z coordinate you typed is ignored rather than treated as a hidden variable.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.