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

Current time:0:00Total duration:10:56

so let's say I have some multi variable function like f of XY so they'll have a two variable input is equal to I don't know x squared times y plus sine of Y so a lot of put just a single number it's a scalar valued function question is how do we take the derivative of an expression like this and there's a certain method called a partial derivative which is very similar to ordinary derivatives and I kind of want to show how there secretly the same thing so to do that let me just remind ourselves of how how we interpret the notation for ordinary derivatives so if you have something like f of X is equal to x squared and let's say you want to take its derivative and I'll use the liveness notation here DF DX and let's evaluate it at 2 let's say I really like this notation because it's suggestive of what's going on if we sketch out a graph so you know this axis represents our output this will be here represents our input and x squared has a certain parabolic shape to it something like that then we go to the input x equals 1 to this little DX here I like to interpret as just a little nudge in the X direction and it's kind of the size of that nudge and then DF DF is the resulting change in the output after you make that initial little nudge so it's this resulting change and when you're thinking in terms of graphs this is slope you kind of have this rise over run for your ratio between the tiny change of the output that's caused by a tiny change in the input and of course this is dependent on where you start over here we have x equals 2 but you could also think about this without graphs if you really wanted to you might just think about you know your input space is just a number line and your output space also is just a number line the output of F over here and really you're just thinking of somehow mapping numbers from here onto the second line and in that case your initial nudge your initial little DX would be some nudge on that number line and you're wondering how that influences the the function itself so maybe that causes a nudge that's you know four times as big and that would mean your derivative is four at that point the reason that I'm talking about this is because over in the multi variable world we can pretty much do the same thing you know you could write DF DX and interpret that is saying hey how does a tiny change in the input in the X Direction influence the output but this time the way that you might visualize it you'd be thinking of your input space here all I'll draw it down here is the XY plane so this time this is not going to be graphing the function this is every point on the plane is an input and let's say you were evaluating this at a point like 1/2 okay in that case so you'd go over to the input that's 1 and then 2 and then you'd say okay so this tiny nudge in the input this tiny change DX how does that influence the output and in this case the output I mean it's still just a number so maybe we go off to the side here and we draw just like a number line as our output and somehow we're thinking about the function as mapping points on the plane to the number line so you'd say okay that's your that's your DX how much does it change the output and you know maybe this time it changes it negatively depends on your function and that would be your DF and you can also do this with the Y variable right there's no reason that you can't say DF dy and evaluate at that same point 1/2 and interpret totally the same way except this time your dy would be a change in the Y Direction so maybe I should really emphasize here that that DX that DX is a change in the X Direction here and that dy is a change in the Y direction and maybe when you change your F according to Y it does something different right maybe you know the output increases and it increases by a lot it's more sensitive to Y again it depends on the function and I'll show you how you can compute something like this in just a moment here but first there's kind of an annoying thing associated with partial derivatives where we don't write them with DS in DX DF people came up with this new notation mostly just to emphasize to the reader of your equation that it's a multivariable function involved what you do is you say you write a D but it's got kind of a curl at the top it's this new symbol and people will often read it as partial so you might really like partial F partial Y if you're wondering by the way why we call these partial derivatives it's sort of like this doesn't tell the full story of how f changes because it only cares about the X direction neither does this this only cares about the y direction so each one is only a small part of the story so let's actually evaluate something like this I'm going to go ahead and clear the board over here I think the one dimensional analogy is something you probably have already so ah little remnants so if you're actually evaluating something like this here I'll write it again up here partial derivative of F with respect to X and we're doing it at 1/2 it only cares about movement in the X direction so it's treating Y is a constant it doesn't even care about the fact that Y changes as far as its concerned Y is always equal to 2 so we can just plug that in ahead of time so I'm going to say partial partial X this is another way you might write it put the expression in here and I'll say x squared but instead of writing Y I'm just going to plug in that constant ahead of time because when you're only moving in the X direction this is kind of how how the multivariable function sees the world and I'll just keep a little note that we're evaluating this whole thing at x equals 1 and here this is actually just an ordinary derivative right this this is an expression that's an X you're asking how it changes as you shift around X and you know how to do this this is just taking the route of taking the derivative the derivative of x squared times 2 is going to be 4x because x squared goes to 2 X and then the derivative of a constant sine of 2 is just a constant is 0 and of course we're evaluating this at x equals 1 so your overall answer is going to be 4 and just for practice let's also do that with the derivative with respect to Y so we look over here I'm going to write the same thing you're taking the partial derivative of F with respect to Y we're evaluating it at the same point 1 2 this time it doesn't care about movement in the X direction so as far as its concerned that X just stays constant at 1 so we'd write 1 squared times y plus sine of Y sine of Y and you're saying oh I'm keeping track of this at y equals 2 so that's kind of you're evaluating at y equals 2 when you take the derivative this is just 1 times y so the derivative is 1 this over here the derivative is cosine cosine of Y again we're evaluating this whole thing at y equals 2 so your overall answer it would be you know 1 plus cosine of 2 I'm not sure I'm not sure what the value of cosine of 2 is off the top of my head but that would be your answer and this is this is a partial derivative at a point but a lot of times you're not asked to just compute it at a point what you want is a general formula that tells you hey plug in any point XY and it should spit out the answer so let me just kind of go over how you would do that it's actually very similar but this time instead of plugging in the constant ahead of time we just have to pretend that it's a constant so let me let me make a little bit of space for ourselves here really we don't need any of this anymore I'm going to leave the partial partial F partial partial Y we want this as a more general function of X and why well we kind of do the same thing we're going to say that this is you know derivative with respect to X and I'm using partials just to kind of emphasize that it's a partial derivative but now we'd write x squared and then kind of emphasize that it's a constant value of y plus the sine and again I'll say Y and here I'm writing the variable Y but we have to pretend like it's a constant now you're pretending that you plug in 2 or something like that and you still just take the derivative so in this case the derivative of x squared times a constant is just 2 x times that constant 2x times that constant and over here the derivative of a constant is always 0 so that's just always going to be 0 so this is your partial derivative as a more general formula if you plugged in one to two this you'd get what we had before and similarly if you're doing this with F of a partial F partial Y we write down all of the same things now you're taking it with respect to Y and I'm just going to copy this formula here actually but this time we're considering all of the exes to be constants so in this case when you take the derivative with respect to Y of some kind of constant you know constant squared is a constant times y it's just going to equal that constant so this is going to be x squared and over here you're taking the derivative of sine of Y there's no X's in there so that remains the sine of Y if you're in clear and now this is a more general formula if you plugged in 1 2 you would get 1 so outside that's cosine of Y cosine of Y because we're taking a derivative so if you plugged in 1 2 you know you would get 1 plus the cosine of 1 which is what we had before so this this is really what you'll see for how to compute a partial derivative you pretend that one of the variables is constant and you take an ordinary derivative and then you back of your mind you're thinking this is because you're just moving in one direction for the input and you're saying how that influences things and then you know you might move in one direction for another input and see how that influences things in the next video I'll show you what this means in terms of graphs and slopes but it's important to understand the graphs and slopes are not the only way to understand derivatives because as soon as you start thinking about vector valued functions or functions with inputs of higher dimensions than just 2 you can no longer think in terms of graphs but this idea of nudging the input in some direction seeing how that influences the output and then taking the ratio you know the ratio of that output nudge to the input nudge that's a more general way of viewing things and that's going to be very helpful moving forward in multi variable cap