[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.79,0:00:01.67,Default,,0000,0000,0000,,- [Narrator] In the last video we were Dialogue: 0,0:00:01.67,0:00:03.54,Default,,0000,0000,0000,,looking at this particular function. Dialogue: 0,0:00:03.54,0:00:04.98,Default,,0000,0000,0000,,It's a very non linear function. Dialogue: 0,0:00:04.98,0:00:06.96,Default,,0000,0000,0000,,And we were picturing\Nit as a transformation Dialogue: 0,0:00:06.96,0:00:10.64,Default,,0000,0000,0000,,that takes every point x,\Ny in space to the point Dialogue: 0,0:00:10.64,0:00:13.40,Default,,0000,0000,0000,,x plus sign y, y plus sign of x. Dialogue: 0,0:00:13.40,0:00:16.63,Default,,0000,0000,0000,,And moreover, we zoomed\Nin on a specific point. Dialogue: 0,0:00:16.63,0:00:17.73,Default,,0000,0000,0000,,And let me actually write down what Dialogue: 0,0:00:17.73,0:00:20.96,Default,,0000,0000,0000,,point we zoomed in on, it was (-2,1). Dialogue: 0,0:00:20.96,0:00:25.12,Default,,0000,0000,0000,,That's something we're gonna\Nwant to record here (-2,1). Dialogue: 0,0:00:25.98,0:00:27.95,Default,,0000,0000,0000,,And I added couple extra\Ngrid lines around it Dialogue: 0,0:00:27.95,0:00:30.53,Default,,0000,0000,0000,,just so we can see in detail\Nwhat the transformation Dialogue: 0,0:00:30.53,0:00:33.80,Default,,0000,0000,0000,,does to points that are in the\Nneighborhood of that point. Dialogue: 0,0:00:33.80,0:00:35.73,Default,,0000,0000,0000,,And over here, this\Nsquare shows the zoomed Dialogue: 0,0:00:35.73,0:00:37.77,Default,,0000,0000,0000,,in version of that neighborhood. Dialogue: 0,0:00:37.77,0:00:39.85,Default,,0000,0000,0000,,And what we saw is that even though the Dialogue: 0,0:00:39.85,0:00:41.72,Default,,0000,0000,0000,,function as a whole, as a transformation, Dialogue: 0,0:00:41.72,0:00:44.56,Default,,0000,0000,0000,,looks rather complicated,\Naround that one point, Dialogue: 0,0:00:44.56,0:00:47.43,Default,,0000,0000,0000,,it looks like a linear function. Dialogue: 0,0:00:47.43,0:00:49.71,Default,,0000,0000,0000,,It's locally linear so\Nwhat I'll show you here Dialogue: 0,0:00:49.71,0:00:52.91,Default,,0000,0000,0000,,is what matrix is gonna\Ntell you the linear Dialogue: 0,0:00:52.91,0:00:55.13,Default,,0000,0000,0000,,function that this looks like. Dialogue: 0,0:00:55.13,0:00:57.73,Default,,0000,0000,0000,,And this is gonna be kind\Nof two by two matrix. Dialogue: 0,0:00:57.73,0:01:00.35,Default,,0000,0000,0000,,I'll make a lot of room\Nfor ourselves here. Dialogue: 0,0:01:00.35,0:01:02.79,Default,,0000,0000,0000,,It'll be a two by two matrix and the way Dialogue: 0,0:01:02.79,0:01:05.66,Default,,0000,0000,0000,,to think about it is to first go back Dialogue: 0,0:01:05.66,0:01:07.82,Default,,0000,0000,0000,,to our original setup\Nbefore the transformation. Dialogue: 0,0:01:07.82,0:01:10.33,Default,,0000,0000,0000,,And think of just a\Ntiny step to the right. Dialogue: 0,0:01:10.33,0:01:13.58,Default,,0000,0000,0000,,What I'm gonna think of\Nas a little, partial x. Dialogue: 0,0:01:13.58,0:01:16.12,Default,,0000,0000,0000,,A tiny step in the x direction. Dialogue: 0,0:01:16.12,0:01:18.30,Default,,0000,0000,0000,,And what that turns into\Nafter the transformation Dialogue: 0,0:01:18.30,0:01:21.73,Default,,0000,0000,0000,,is gonna be some tiny\Nstep in the output space. Dialogue: 0,0:01:21.73,0:01:23.46,Default,,0000,0000,0000,,And here let me actually kind of draw on Dialogue: 0,0:01:23.46,0:01:25.74,Default,,0000,0000,0000,,what that tiny step turned into. Dialogue: 0,0:01:25.74,0:01:27.15,Default,,0000,0000,0000,,It's no longer purely in the x direction. Dialogue: 0,0:01:27.15,0:01:28.49,Default,,0000,0000,0000,,It has some rightward component. Dialogue: 0,0:01:28.49,0:01:30.36,Default,,0000,0000,0000,,But now also some downward component. Dialogue: 0,0:01:30.36,0:01:32.62,Default,,0000,0000,0000,,And to be able to represent\Nthis in a nice way, Dialogue: 0,0:01:32.62,0:01:35.37,Default,,0000,0000,0000,,what I'm gonna do is\Ninstead of writing the Dialogue: 0,0:01:35.37,0:01:37.14,Default,,0000,0000,0000,,entire function as something with Dialogue: 0,0:01:37.14,0:01:39.08,Default,,0000,0000,0000,,a vector valued output, I'm gonna go ahead Dialogue: 0,0:01:39.08,0:01:43.25,Default,,0000,0000,0000,,and represent this as a two\Nseparate scalar value functions. Dialogue: 0,0:01:44.12,0:01:48.28,Default,,0000,0000,0000,,I'm gonna write the scalar\Nvalue functions f1 of x, y. Dialogue: 0,0:01:50.07,0:01:52.96,Default,,0000,0000,0000,,So I'm just giving a\Nname to x plus sign y. Dialogue: 0,0:01:52.96,0:01:56.08,Default,,0000,0000,0000,,And f2 of x, y, again all I'm doing is Dialogue: 0,0:01:56.08,0:02:00.35,Default,,0000,0000,0000,,giving a name to the functions\Nwe already have written down. Dialogue: 0,0:02:00.35,0:02:02.30,Default,,0000,0000,0000,,When I look at this vector, the Dialogue: 0,0:02:02.30,0:02:04.33,Default,,0000,0000,0000,,consequence of taking a tiny d, x step Dialogue: 0,0:02:04.33,0:02:06.81,Default,,0000,0000,0000,,in the input space that corresponds to Dialogue: 0,0:02:06.81,0:02:09.42,Default,,0000,0000,0000,,some two d movement in the output space. Dialogue: 0,0:02:09.42,0:02:11.19,Default,,0000,0000,0000,,And the x component of that movement. Dialogue: 0,0:02:11.19,0:02:12.90,Default,,0000,0000,0000,,Right if I was gonna draw this out Dialogue: 0,0:02:12.90,0:02:15.98,Default,,0000,0000,0000,,and say hey, what's the x\Ncomponent of that movement. Dialogue: 0,0:02:15.98,0:02:18.07,Default,,0000,0000,0000,,That's something we think of as a little Dialogue: 0,0:02:18.07,0:02:22.24,Default,,0000,0000,0000,,partial change in f1, the\Nx component of our output. Dialogue: 0,0:02:23.18,0:02:24.56,Default,,0000,0000,0000,,And if we divide this, if we take you know Dialogue: 0,0:02:24.56,0:02:26.91,Default,,0000,0000,0000,,partial f1 divided by the size of that Dialogue: 0,0:02:26.91,0:02:28.72,Default,,0000,0000,0000,,initial tiny change, it basically scales Dialogue: 0,0:02:28.72,0:02:31.41,Default,,0000,0000,0000,,it up to be a normal sized vector. Dialogue: 0,0:02:31.41,0:02:32.94,Default,,0000,0000,0000,,Not a tiny nudge but something that's more Dialogue: 0,0:02:32.94,0:02:34.48,Default,,0000,0000,0000,,constant that doesn't shrink as we Dialogue: 0,0:02:34.48,0:02:36.62,Default,,0000,0000,0000,,zoom in further and further. Dialogue: 0,0:02:36.62,0:02:39.15,Default,,0000,0000,0000,,And then similarly the\Nchange in the y direction, Dialogue: 0,0:02:39.15,0:02:40.78,Default,,0000,0000,0000,,right the vertical component of that step Dialogue: 0,0:02:40.78,0:02:43.18,Default,,0000,0000,0000,,that was still caused by the dx. Dialogue: 0,0:02:43.18,0:02:45.49,Default,,0000,0000,0000,,Right, it's still caused by that initial Dialogue: 0,0:02:45.49,0:02:46.93,Default,,0000,0000,0000,,step to the right, that is gonna be Dialogue: 0,0:02:46.93,0:02:49.52,Default,,0000,0000,0000,,the tiny, partial change in f2. Dialogue: 0,0:02:50.61,0:02:52.67,Default,,0000,0000,0000,,The y component of the output cause Dialogue: 0,0:02:52.67,0:02:54.53,Default,,0000,0000,0000,,here we're all just\Nlooking in the output space Dialogue: 0,0:02:54.53,0:02:58.69,Default,,0000,0000,0000,,that was caused by a partial\Nchange in the x direction. Dialogue: 0,0:03:00.75,0:03:02.22,Default,,0000,0000,0000,,And again I kind of\Nlike to think about this Dialogue: 0,0:03:02.22,0:03:03.96,Default,,0000,0000,0000,,we're dividing by a tiny amount. Dialogue: 0,0:03:03.96,0:03:07.06,Default,,0000,0000,0000,,This partial f2 is really\Na tiny, tiny nudge. Dialogue: 0,0:03:07.06,0:03:08.85,Default,,0000,0000,0000,,But by dividing by the size of the initial Dialogue: 0,0:03:08.85,0:03:11.21,Default,,0000,0000,0000,,tiny nudge that caused it, we're getting Dialogue: 0,0:03:11.21,0:03:12.48,Default,,0000,0000,0000,,something that's basically a number. Dialogue: 0,0:03:12.48,0:03:13.47,Default,,0000,0000,0000,,Something that doesn't shrink when Dialogue: 0,0:03:13.47,0:03:15.59,Default,,0000,0000,0000,,we consider more and\Nmore zoomed in versions. Dialogue: 0,0:03:15.59,0:03:17.52,Default,,0000,0000,0000,,So that, that's all what happens when Dialogue: 0,0:03:17.52,0:03:19.92,Default,,0000,0000,0000,,we take a tiny step in the x direction. Dialogue: 0,0:03:19.92,0:03:23.07,Default,,0000,0000,0000,,But another thing you could\Ndo, another thing you can Dialogue: 0,0:03:23.07,0:03:25.96,Default,,0000,0000,0000,,consider is a tiny step\Nin the y direction. Dialogue: 0,0:03:25.96,0:03:27.84,Default,,0000,0000,0000,,Right cause we wanna know, hey, if Dialogue: 0,0:03:27.84,0:03:31.15,Default,,0000,0000,0000,,you take a single step\Nsome tiny unit upward, Dialogue: 0,0:03:31.15,0:03:35.32,Default,,0000,0000,0000,,what does that turn into\Nafter the transformation. Dialogue: 0,0:03:37.64,0:03:41.58,Default,,0000,0000,0000,,And what that looks like is this vector Dialogue: 0,0:03:41.58,0:03:43.40,Default,,0000,0000,0000,,that still has some upward component. Dialogue: 0,0:03:43.40,0:03:45.33,Default,,0000,0000,0000,,But it also has a rightward component. Dialogue: 0,0:03:45.33,0:03:46.41,Default,,0000,0000,0000,,And now I'm gonna write its components Dialogue: 0,0:03:46.41,0:03:48.82,Default,,0000,0000,0000,,as the second column of the matrix. Dialogue: 0,0:03:48.82,0:03:50.09,Default,,0000,0000,0000,,Because as we know when\Nyou're representing Dialogue: 0,0:03:50.09,0:03:52.44,Default,,0000,0000,0000,,a linear transformation with a matrix, Dialogue: 0,0:03:52.44,0:03:54.01,Default,,0000,0000,0000,,the first column tells you where the first Dialogue: 0,0:03:54.01,0:03:55.60,Default,,0000,0000,0000,,basis vector goes and the second column Dialogue: 0,0:03:55.60,0:03:58.20,Default,,0000,0000,0000,,shows where the second basis vector goes. Dialogue: 0,0:03:58.20,0:03:59.76,Default,,0000,0000,0000,,If that feels unfamiliar, either Dialogue: 0,0:03:59.76,0:04:01.24,Default,,0000,0000,0000,,check out the refresher video or Dialogue: 0,0:04:01.24,0:04:03.96,Default,,0000,0000,0000,,maybe go and look at some of\Nthe linear algebra content. Dialogue: 0,0:04:03.96,0:04:06.02,Default,,0000,0000,0000,,But to figure out the\Ncoordinates of this guy, Dialogue: 0,0:04:06.02,0:04:08.08,Default,,0000,0000,0000,,we do basically the same thing. Dialogue: 0,0:04:08.08,0:04:10.67,Default,,0000,0000,0000,,Let's say first of all, the\Nchange in the x direction Dialogue: 0,0:04:10.67,0:04:14.68,Default,,0000,0000,0000,,here, the x component\Nof this nudge vector. Dialogue: 0,0:04:14.68,0:04:18.92,Default,,0000,0000,0000,,That's gonna be given as a\Npartial change to f1, right, Dialogue: 0,0:04:18.92,0:04:21.08,Default,,0000,0000,0000,,to the x component of the output. Dialogue: 0,0:04:21.08,0:04:22.27,Default,,0000,0000,0000,,Here we're looking in the outputs base. Dialogue: 0,0:04:22.27,0:04:25.24,Default,,0000,0000,0000,,We're dealing with f1, f1 and f2 Dialogue: 0,0:04:25.24,0:04:26.71,Default,,0000,0000,0000,,and we're asking what that change was Dialogue: 0,0:04:26.71,0:04:30.88,Default,,0000,0000,0000,,that was caused by a tiny\Nchange in the y direction. Dialogue: 0,0:04:32.14,0:04:35.32,Default,,0000,0000,0000,,So the change in f1 caused\Nby some tiny step in the y Dialogue: 0,0:04:35.32,0:04:38.98,Default,,0000,0000,0000,,direction divided by the\Nsize of that tiny step. Dialogue: 0,0:04:38.98,0:04:41.81,Default,,0000,0000,0000,,And then the y component\Nof our output here. Dialogue: 0,0:04:41.81,0:04:43.89,Default,,0000,0000,0000,,The y component of the\Nstep in the outputs base Dialogue: 0,0:04:43.89,0:04:45.89,Default,,0000,0000,0000,,that was caused by the initial tiny Dialogue: 0,0:04:45.89,0:04:47.88,Default,,0000,0000,0000,,step upward in the input space. Dialogue: 0,0:04:47.88,0:04:50.38,Default,,0000,0000,0000,,Well that is the change of f2, Dialogue: 0,0:04:52.34,0:04:55.54,Default,,0000,0000,0000,,second component of our\Noutput as caused by dy. Dialogue: 0,0:04:55.54,0:04:58.95,Default,,0000,0000,0000,,As caused by that little partial y. Dialogue: 0,0:04:58.95,0:05:00.48,Default,,0000,0000,0000,,And of course all of this is very specific Dialogue: 0,0:05:00.48,0:05:02.54,Default,,0000,0000,0000,,to the point that we started at right. Dialogue: 0,0:05:02.54,0:05:05.45,Default,,0000,0000,0000,,We started at the point (-2,1). Dialogue: 0,0:05:05.45,0:05:07.53,Default,,0000,0000,0000,,So each of these partial derivatives Dialogue: 0,0:05:07.53,0:05:09.29,Default,,0000,0000,0000,,is something that really we're saying, Dialogue: 0,0:05:09.29,0:05:12.71,Default,,0000,0000,0000,,don't take the function,\Nevaluate it at the point (2,-1), Dialogue: 0,0:05:12.71,0:05:16.51,Default,,0000,0000,0000,,and when you evaluate each one of these Dialogue: 0,0:05:16.51,0:05:18.90,Default,,0000,0000,0000,,at the point (2,-1)\Nyou'll get some number. Dialogue: 0,0:05:18.90,0:05:19.97,Default,,0000,0000,0000,,And that will give you a very Dialogue: 0,0:05:19.97,0:05:21.75,Default,,0000,0000,0000,,concrete two by two matrix that's gonna Dialogue: 0,0:05:21.75,0:05:24.06,Default,,0000,0000,0000,,represent the linear\Ntransformation that this Dialogue: 0,0:05:24.06,0:05:26.95,Default,,0000,0000,0000,,guy looks like once you've zoomed in. Dialogue: 0,0:05:26.95,0:05:28.27,Default,,0000,0000,0000,,So this matrix here that's full of all Dialogue: 0,0:05:28.27,0:05:31.58,Default,,0000,0000,0000,,of the partial derivatives\Nhas a very special name. Dialogue: 0,0:05:31.58,0:05:35.55,Default,,0000,0000,0000,,It's called as you may\Nhave guessed, the Jacobian. Dialogue: 0,0:05:35.55,0:05:38.78,Default,,0000,0000,0000,,Or more fully you'd call\Nit the Jacobian Matrix. Dialogue: 0,0:05:38.78,0:05:39.98,Default,,0000,0000,0000,,And one way to think about it is that it Dialogue: 0,0:05:39.98,0:05:43.19,Default,,0000,0000,0000,,carries all of the partial\Ndifferential information right. Dialogue: 0,0:05:43.19,0:05:45.49,Default,,0000,0000,0000,,It's taking into account\Nboth of these components Dialogue: 0,0:05:45.49,0:05:48.07,Default,,0000,0000,0000,,of the output and both possible inputs. Dialogue: 0,0:05:48.07,0:05:49.24,Default,,0000,0000,0000,,And giving you a kind of a grid of Dialogue: 0,0:05:49.24,0:05:51.19,Default,,0000,0000,0000,,what all the partial derivatives are. Dialogue: 0,0:05:51.19,0:05:52.26,Default,,0000,0000,0000,,But as I hope you see, it's much Dialogue: 0,0:05:52.26,0:05:54.53,Default,,0000,0000,0000,,more than just a way of recording Dialogue: 0,0:05:54.53,0:05:56.40,Default,,0000,0000,0000,,what all the partial derivatives are. Dialogue: 0,0:05:56.40,0:05:57.89,Default,,0000,0000,0000,,There's a reason for organizing it Dialogue: 0,0:05:57.89,0:05:59.79,Default,,0000,0000,0000,,like this in particular and it really Dialogue: 0,0:05:59.79,0:06:02.44,Default,,0000,0000,0000,,does come down to this\Nidea of local linearity. Dialogue: 0,0:06:02.44,0:06:04.54,Default,,0000,0000,0000,,If you understand that the Jacobian Matrix Dialogue: 0,0:06:04.54,0:06:06.15,Default,,0000,0000,0000,,is fundamentally supposed to represent Dialogue: 0,0:06:06.15,0:06:08.69,Default,,0000,0000,0000,,what a transformation\Nlooks like when you zoom Dialogue: 0,0:06:08.69,0:06:11.46,Default,,0000,0000,0000,,in near a specific point,\Nalmost everything else Dialogue: 0,0:06:11.46,0:06:13.100,Default,,0000,0000,0000,,about it will start to fall in place. Dialogue: 0,0:06:13.100,0:06:14.98,Default,,0000,0000,0000,,And in the next video, I'll go ahead Dialogue: 0,0:06:14.98,0:06:16.43,Default,,0000,0000,0000,,and actually compute this just to Dialogue: 0,0:06:16.43,0:06:18.14,Default,,0000,0000,0000,,show you what the process looks like. Dialogue: 0,0:06:18.14,0:06:19.38,Default,,0000,0000,0000,,And how the result we get kind of Dialogue: 0,0:06:19.38,0:06:20.76,Default,,0000,0000,0000,,matches with the picture we're Dialogue: 0,0:06:20.76,0:06:21.59,Default,,0000,0000,0000,,looking at, see you then.