If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Partial derivatives of parametric surfaces

If you have a function representing a surface in three dimensions, you can take its partial derivative.  Here we see what that looks like, and how to interpret it.

What we're building to

  • As setup, we have some vector-valued function with a two-dimensional input and a three-dimensional output:
    v(s,t)=[x(s,t)y(s,t)z(s,t)]
    Its partial derivatives are computed by taking the partial derivative of each component:
    vt(s,t)=[xt(s,t)yt(s,t)zt(s,t)]
    vs(s,t)=[xs(s,t)ys(s,t)zs(s,t)]
  • You can interpret these partial derivatives as giving vectors tangent to the parametric surface defined by v.

The goal

Suppose I were to give you a function with a two-dimensional input, and a three-dimensional output, like this one:
v(t,s)=[3cos(t)+cos(t)cos(s)3sin(t)+sin(t)cos(s)sin(s)]
Since the input is multi-dimensional, you cannot take the ordinary derivative of this function, but you can take a partial derivative. The focus of this article is on getting an intuitive feel for what those partial derivatives mean.

Interpret the function as a surface

The function itself actually has a very nice geometric meaning. Since it has a two-coordinate input and a three-coordinate output, we can visualize it as a parametric surface.
Specifically, consider all inputs (t,s) such that 0t2π and 0s2π. This can be seen as a square in the "ts-plane". I'll draw this with a checkerboard pattern since it makes things easier to follow later on.
For any given point (t,s), the value v(t,s) is some point in three-dimensional space.
Concept check: Evaluate v(π,π). In other words, where does the function v take the input (t,s)=(π,π)?
Choose 1 answer:

If you imagine doing this computation for all inputs (t,s) in the square, getting some point in three-dimensional space each time, all of the resulting outputs will form a two-dimensional surface in three-dimensional space. I like to imagine each point of the square moving to its appropriate location in space.
Khan Academy video wrapper
The result is a doughnut shape! Math folk call this a torus.

Interpreting the partial derivatives

Differentiate with respect to t

To compute a partial derivative of this function, say vt, you take the partial derivative of each individual component.
vt(t,s)=t[3cos(t)+cos(t)cos(s)3sin(t)+sin(t)cos(s)sin(s)]=[t(3cos(t)+cos(t)cos(s))t(3sin(t)+sin(t)cos(s))t(sin(s))]=[3sin(t)sin(t)cos(s)3cos(t)+cos(t)cos(s)0]
So...what does this new vector-valued function actually mean?
Well, computing this partial derivative requires treating the variable s as if it was constant. What does this mean geometrically?
In the ts-plane, a constant value of s corresponds with a horizontal line. Here's one such line representing s=π/2, drawn in red:
After this square gets warped and morphed into the torus, this red line gets turned in​to some circle which goes the long way around the torus:
The partial derivative vt tells us how the output changes slightly when we nudge the input in the t-direction. In this case, the vector representing that nudge (drawn in yellow below) gets transformed into a vector tangent to the red circle which represents a constant value of s on the surface:
Specifically, the input point used for the pictures above is (t0,s0)=(π4,π2). This means the point on the torus is
v(π4,π2)=[3cos(π/4)+cos(π/4)cos(π/2)3sin(π/4)+sin(π/4)cos(π/2)sin(π/2)]=[322+22(0)322+22(0)1]=[3223221]
And the tangent vector is
vt(π4,π2)=[3sin(π/4)sin(π/4)cos(π/2)3cos(π/4)+cos(π/4)cos(π/2)0]=[32222(0)322+22(0)0]=[3223220]
Concept check: Why does it make sense that the z-component of this tangent vector is 0?
Choose 1 answer:

Differentiate with respect to s

The partial derivative with respect to s is similar. You compute it by taking the partial derivative of each component in the definition of v:
vs(t,s)=s[3cos(t)+cos(t)cos(s)3sin(t)+sin(t)cos(s)sin(s)]=[cos(t)sin(s)sin(t)sin(s)cos(s)]
This time, we can imagine holding t constant to get some vertical line in the parameter space.
The yellow arrow represents some velocity vector as a particle travels up along this line. Which is to say, as you vary s while holding t constant. After the square turns into the torus via the function v, the red line and the yellow velocity vector might look something like this:
The partial derivative vs can be interpreted as this resulting velocity vector on the torus.

Summary

  • As setup, we have some vector-valued function with a two-dimensional input and a three-dimensional output:
    v(s,t)=[x(s,t)y(s,t)z(s,t)]
    Its partial derivatives are computed by taking the partial derivative of each component:
    vt(s,t)=[xt(s,t)yt(s,t)zt(s,t)]
    vs(s,t)=[xs(s,t)ys(s,t)zs(s,t)]
  • You can interpret these partial derivatives as giving vectors tangent to the parametric surface defined by v.
  • For example, imagine nudging a point in the input space along the t direction, say from the coordinates (s,t) to the coordinates (s,t+h) for some small h. This results in some small nudge in the output along the surface, which is represented by the vector hvt(s,t).

Want to join the conversation?

  • female robot amelia style avatar for user Shubham
    How can ∂v⃗ /∂s be interpreted as velocity?
    (7 votes)
    Default Khan Academy avatar avatar for user
    • mr pants teal style avatar for user sauj123
      ∂v⃗ /∂s can be interpreted as the velocity of the particle travelling in the s direction on the parametric surface in the 3d Cartesian coordinate system (as defined by v⃗(s, t0), where t0 is a constant). Holding t constant, the path the particle will travel is a parametric line parallel to the s axis, and this line is transformed from the st plane to around the cylinder of the torus (as depicted in the diagram).

      In other words, the resulting velocity vector is in three dimensions (x,y,z) tangential to the parametric line, and not two dimensions (s,t) with the t-component equal to zero (i.e. dt/ds=0).

      To make things cooler, how about a particle travelling on a parametric line on a parametric surface, and finding the velocity of that particle? (spoiler: read the next article :p)
      (8 votes)
  • blobby green style avatar for user KalyanMohan10
    Sal, can you please explain the formation of torus through intuitive explanation as you have done it for 2-D Velocity vector visualisation ?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • cacteye green style avatar for user codenstarz
      imaging two variables s and t now imagine a vector valued function v(s,t) which spits out transformed x,y,z now for the XY plane and ZY plane imagine circles formed with s ie. X(s,t) = cos(s) and Y(s,t) = cos(s) and Z(s,t) = sin(s).... now imaging shifting the center of the circles a distance away from origin that would make the parametric equations...X(s,t) = cos(s)+3 and Y(s,t) = cos(s)+3... now with the help of second parameter ie. t we can rotate these circles around Y axis in XZ plane by simply multiplying the X and Y vectors by cos(t) and sin(t) respectively ie. X(s,t) = cos(t)(cos(s)+3) and Y(s,t) = sin(t)(cos(s)+3) and Z(s,t) = sin(s)... and there you have it a torus :)
      (4 votes)
  • blobby green style avatar for user b.nsbm1973
    How can I compute the vector h in the summary?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • ohnoes default style avatar for user Charles Morelli
      The 'h' in the summary is not a vector, it is a scalar (just a number), and an arbitrary one... the point made in the summary is that if you change the imput 't' by some small value 'h' (i.e., t + h), the output changes by approximately:
      h times [the partial derivative of v with respect to x]
      The smaller the value of h, the more accurate the expression becomes (in calculus we take the limiting change as h approaches zero, but we can't actually set h = 0 or we don't change the input and so the output doesn't change: we need a tiny change to the imput to see what happens to the ouput)
      The expression in the summary is written in general terms: there is nothing to compute there.
      (1 vote)
  • male robot hal style avatar for user Thorsten Schmitt
    How did the z-coordinate of the vector v(pi/4, pi/2) simplify from sqrt(2)/2 to 1 ? I didn't really get that...
    (1 vote)
    Default Khan Academy avatar avatar for user
  • spunky sam blue style avatar for user Shouvik Das
    In the video on the transformation of the input-space to parametric torus, how does the animation work ?
    To me, it seems that a transformation from one point to another is a pretty static process().
    That is, the initial state is the flat square and the final state is the torus.

    But here the curve warps with time. Is this because in creating the animation, one of the variables out of (t,s) have been varied with time... Perhaps like time=0,0.1,0.2..... (2*pi) seconds ?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • mr pants teal style avatar for user Robert
      In the video neither of (t,s) is being varied to generate the deformation of the square to the torus. the animator just chose a couple particularly smooth deformations that could be viewed easily. the deformations we see in the animation aren't in any way encoded in the parametrization from the square to the torus. all the parametrization gives us, as you said you suspected, is the initial square, and the final torus.

      there are many choices as to how to animate the transformation from (t,s) to (x,y,z), but perhaps it would be better viewed as motions between separate objects, as well as to view them as the video has, being animated as a transformation of one into the other.

      being flexible in this way will help to visualize these as to suit our particular objective. for varying either s or t and interpreting the partials like this article is doing, the seperate objects view is best i think. for animating the transformation, and viewing the initial square and final torus as endpoints of a sequence of surfaces whose parametrizations vary continuously from end to end, maybe we don't need to view them as separate objects anymore. but that's not much to do with varying either s or t, as it involves a lot more choice in how to get from the square to the torus.
      I recommend the programming courses here on KhanAcademy for learning the basics of animations like these. Maybe I'll write some examples soon to demonstrate the different viewpoints we can take in interpreting these parametrizations. Long reply I know, but I hope it helps!
      (3 votes)
  • leaf blue style avatar for user Tyler.Heers
    v = ∂v /∂s(Pi, Pi);
    w = ∂v /∂t (Pi, Pi);
    n = v x w; where x is the cross product
    M = [w/||w||, v / ||v||, n / ||n||];
    A = M.inverse();
    p1 = v(Pi/2, Pi/2);
    p2 = A * p1;
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Mudassir Malik
    In partial derivative of any function like z=f(x,y), the partial derivative w.r.t x is always perpendicular to partial derivative w.r.t y at any specific point, means their slope lines are perpendicular.
    Is this the same case in partial derivatives of parametric surface?
    I mean,as in this topic, is partial derivative w.r.t to s is always perpendicular to w.r.t t?
    (1 vote)
    Default Khan Academy avatar avatar for user