Myself, Professor S.P. Mankani, Assistant Professor, Department of Mechanical Engineering, Walchand Institute of Technology, Solapur. Today we are going to study projection of profile lines. So at the end of this lecture, students will be able to understand the profile, projection of profile lines. So now we are going to have a bit previous review. The cases of lines in auxiliary vertical plane, auxiliary inclined plane. So then we can go for the profile plane. So based on this one, here just you can observe, this is auxiliary inclined plane. Means it is making a certain degrees of angle. Here this is a certain degrees of angle it makes with the HP. That we are given the notation as alpha degree of angle it is going to make with the horizontal reference plane. So this particular part you already studied because the line is situated in the auxiliary inclined plane. The line is situated in the auxiliary inclined plane. If this is a case, we are going to get it here as a front view. A dash, B dash you are going to represent as a front view. Here this angle is alpha angle. So that is what the angle is made by the line with the horizontal reference plane. This is the case of previous, we have studied this all the details. So in the same continuation here, we are going to be taken another as, so one more here this particular angle, the auxiliary vertical plane. We are going to be calling this as auxiliary vertical plane which is making as a beta degree of angle. So there the line is situated in the auxiliary vertical plane. If this is a case, you are going to observe this line from the top. So that projection you are going to be getting it in the horizontal reference plane. So that time it is going to make the angle as a beta here. So this alpha angle is the front view is going to make an angle of alpha degree with the horizontal XY line, this the reference line. We are going to consider this as a reference line XY line. The angle made by the plane with the HP. So here because the line is situated in the plane only. So continuation with this same thing, we are going to observe this one as a, this line is situated in the auxiliary vertical plane. We are going to observe from the top here. We are going to get this as a view. So here this is a top view. So that is nothing but the angle beta is the angle made by the line with this particular vertical plane. That we are going to be representing here as a below the XY line to the XY line. So this particular detail you have studied in the previous one of the lecture. So the continuation, this is the information required because we are going to tilt this, we are going to tilt this particular plate in the perpendicular to the vertical plane as well as perpendicular to the horizontal plane. That is what we are going to be considering it as a profile plane. So the next slide you are going to study as a line in a profile plane means in a plane perpendicular to both HP and VP. If this is the case just you can observe the same diagram that is a vertical plane, horizontal plane. Here we are going to set up this profile plane. The previously I have considered this is making certain degrees of angle either with the horizontal plane or with the vertical plane as we are called this as a AIP and AVP. So based on this one if supposed to be the line is situated on the profile plane. So this theёл the importance of this particular lecture is considered as line is situated in the profile plane. And one thing to observe here as, you are going to be observing from the left hand side. So here this line is situated, perpendicular line indicating the line is situated in the profile plane. So if the line is situated in the profile plane you are going to be observing as a front view as well as the top view. So here we have here is a front view we are going to observe in this direction top view where we are going to be observing in this direction. how exactly it looks. So suppose this line is you are going to be observing in this way and it is a front view that comes on the vertical plane. So it is looking as a straight line only. It is looking as a straight line only situated on the vertical plane. Similarly if you go for the top view that is also going to be observed in the this way as on the horizontal reference plane. So here it is this one. So if you tilt it this plate in the downward direction so that you are going to be getting as a single page in the next diagram. So here it is a top view are going to be representing here as a a b and front view are going to write it as a a dash b dash. The line is situated in the profile plane. So here the important thing is this particular line how exactly it looks in the front view as well as top view are going to draw it in the orthographic pattern. So here it is a the color code I given it as a same color here I take and means it's a vertical plane. The blue color I am going to be considering it as a horizontal plane that is coming as a below the xy line because intersection of these two are going to be considering it as a xy line. So now you are going to be taken this particular as a profile plane. So this profile plane you have taken it as a this side here profile plane is here. So now based on this one this line you are going to draw it on the orthographic pattern. So here this is a vertical line. So this is representing it as a front view and this is representing it as a top view here. So here both the points of the end point of this line is coming on the same projector line here. So this is xy line and now this is a dash and here we are going to be taken as a b dash and similarly we are going with the this is a and this is b. So we are going to consider this one as a front view and this as a top view. We are going to bring this particular projectors in the horizontally in this direction and here also you are going to bring it this particular projectors. You are going to bring it this one to bring it up to horizontal this particular point and this particular point that is an intersection point. So then keep the compass here take it this particular point as a length and draw the arc and similarly keep the compass here take it this length and draw the arc. So both the projectors are coming in this particular figure as like this. You bring it in the upward direction. So now this a point is going to be coming the projector here and this is a dash is coming here and both are going to be intersecting at this particular point. And that you are going to be given the notation as a double dash here we are going to give the notation as a double dash. Similarly you are going to get this b point as a, so here we are to bring it this b point and it is coming it as a intersecting point as a b double dash. A double dash, b double dash are the length of this particular line here this length is a true length. Just you can imagine here this the line is parallel to the this particular line okay the profile line this particularly a front view is parallel with this one means one in one view it is a parallel in another view the automatically are going to get this as a true length this is a true length of the line is concerned. So here the important thing is the line is making a certain degrees of angle with the horizontal plane and this is a horizontal plane and this is a vertical plane. So in one of my previous lecture you have studied that particular as a quadrants first in the first quadrant it is a vertical plane and the horizontal plane if you are going to tilt this one you are going to be getting this as a one more as a profile plane here. So based on this one and this angle and this angle is very important here. So summation of these two angles this is a horizontal reference plane and this is a vertical reference plane. So if you consider this is a vertical reference plane and this is a horizontal reference plane this is also making a certain degrees of angle with the horizontal reference plane and this is a certain degrees of angle with the vertical reference plane. So HP angle you are going to be considering it as alpha and this is a beta. So based on this particular angle if the summation of these two angles are 90 degree then the line is situated in the profile plane you are going to be considering it as a profile plane then you are going to solve the problem based on this one. So here just you can observe it here. So this is front view and this one is a top view and this is a profile line as in the side view. So here this is you are going to be observing from the left hand side and this particularly plate you are going to be treating in this way and it is coming on the right hand side of this particular figure. Right hand side of this particular figure is concerned. So here is the left hand side view. So now you are drawn this as this particularly a double dash b double dash it is looking as a true length it is looking as a true length. So here just you can think it so why you are drawing this one this side only why not you can take it this side just you think it a minute why you are drawn this green color square on the right hand side of this figure. So why not you can draw it on the left hand side of the figure just you think it. So now as far as the first angle method is concerned you are going to draw the right hand side view on the left hand side of the figure and left hand side view you are going to draw it on the right hand side of the figure is concerned. So as far as this particularly lines problems are concerned so even you can take it this way or you can take it this way is concerned. So here you doesn't have any problem but the thing is that in another whenever you are going with the orthographic projection there you have a constraint of to draw the line as either it is there as a left hand side view or right hand side view based on that one you are going to draw this particularly as a profile plane is concerned. So now here you are going to consider this as a profile plane as so this side only. In generally you are going to be taking it as the right hand side only. So now we are drawn this as the one more point as this is a horizontal trace and this is a vertical trace. So this is just an extension of this line where it intersects with the this horizontal plane as well as a vertical plane. If it is intersecting with the horizontal reference plane we are going to be calling it as a HD and if it intersects with the vertical reference we are going to be calling this as a vertical trace. So this detail I have one more lecture in my lecture series. So there you can study the detail of this what exactly the horizontal trace as well as a vertical trace. So here this is a theta and phi this angle is summation of this angle is 90 degree. Theta angle is angle made by the line with the horizontal plane and phi is angle made by the line with the vertical and these are the true inclination here I taken as a previously as alpha and beta those are apparent angles. Here it is a theta and phi as a true inclination. So the same explanation is also given here you can refer it once again this information also. So this concludes the information related to the profile line is concerned the line which having an angle as 30 degree or 60 degree like this the summation of this angle as 90 degree. In this type of problems you can solve with this particular method. Thank you.


All right, so actually what a conference to have Leonard as kind of an opening act to To my talk. So this is gonna be a kind of a general talk about system performance With systems, I mean Linux systems and to be more specific. It's basically about Linux servers Before I start a little bit about myself I actually like computers a lot. I like them fast and I've been lucky enough to always find employers Who kind of provide me those so I used to work for AMD In in Dresden, which is about two hours south of where we are right now And I was there when we had the first one gigahertz processor or x86 processor I should say I was there when AMD introduced the x86 46 bit extensions That was quite an interesting time and since five and a half years. I'm now was was amazon and what we do in Dresden is Basically all the kernel and hypervisors that amazon runs on their servers and I truly can tell you know And the kernel and hypervisors is coming From a group that has multiple offices, but A big one is in Dresden I promise to put this up. So we are hiring If you're interested in this have a look or talk to us several people here All right, but for the talk talk, so I agree the the title is a little silly because What does it really mean to be fast? That guy here He was fast so about two weeks ago in Berlin. There was marten and the guy Run it in in a little bit over two hours two hours one minute or so Cut a new world record An interesting thing there is You know, you have one number and you can compare them and that's really it, you know you say Go and you measure a wall clock time and when the guy comes back in after the 42 kilometers You have a number and you can compare those things Computer systems, unfortunately, why not unfortunately, but they are way more complex than that and there are way more things you you can measure So Let's have a look how Um, uh, the desktop is is presenting you basically an idea of of how fast it is so Gnome has this system monitor. They call that and on top you see, uh, cpu usage over time You see memory usage and and network usage over time. I mean not a big surprise, but I probably would also add Uh Your your hard drive, uh That's also an interesting, uh number to see how much this guy we have um, I guess most of you, uh with ssh into server and, uh Run something like top or htop, uh, which gives you a little bit more, uh information um One of the numbers you probably cannot really read here is, uh Is load um I remember back at the days at at AMD So I basically started in the it infrastructure team there and we had a weekly ops meeting for database service and all those things And one of the numbers we always looked at was load and I think every other week or so there Started the big discussion what this figure actually means and if it's useful to look at it or not and Uh, and we repeated this over and over again and that is Basically the slide is for my co-worker. So, um From the documentation in the file that is implemented, uh, it basically is the number of running processes plus the number of uninterruptible processes um in the run queue of the news kernel And since this number goes up and down like crazy, you want to have an average over one five and And 15 minutes and that was an exponential decay um It's totally interesting to a look of the To check out the history of you know, where where load actually came from and, uh Here is a quote from the guy, uh, materials always who actually added this, uh, uninterruptible Uh, processes which at the time mainly meant, uh, this guy And you can read all of that, uh In a blog post from brand greg who was a hero when it comes to to performance measurements But I will quote him a couple of times in this in this talk um The thing to remember is load is a very good indicator for humans to look at the system and see What it's doing, but if you start to think about it for longer than 10 seconds What this really means and if this is actually telling you anything then look for something else um Before we dive into all of that a little bit deeper, um, I'd like to come to a common understanding of, uh Some statistics and and chart types Um, so the first thing is, uh the mean value versus the median, um Mean basically means you have a bunch of numbers and With the the sum of this and and uh divide by the count of those Median is you line them all up Order them and then pick the one in the middle. Um Interestingly, uh, the median is the one you should choose for performance analysis in in many cases Or probably most cases because it's way more robust. You will see that in a in a second um Another thing, uh, you should be familiar with because, uh, that is extremely helpful is, uh things like mean standard deviation percentiles so that is probably probability density function of, uh, the normal distribution um Percentile basically means again you you order all your, uh, your measurements In in a long row order them by size or by by by number and then you would have the 50 percent percentile right in the middle um for this, uh normal distribution, uh, that the mean and, uh, the median are exactly at the same point right in the middle and well, uh, at two sigma you have the 79 dot whatever, uh, percentile and that means that basically, you know, all your measurements, uh Or that 97 percent of your measurements are below this this number So why is that important? Um, just imagine, uh You measure, um over time uh Some apis and some web api, you know, which you query um And what you're interested in how long does it take to to get the response latency for that thing? um The green thing is the the median and you see that this number is pretty robust, right? So if you are actually if you want to eliminate outliers from from your matrix, uh That is really the thing to use The light blue one is, uh, the mean value where you see this is indicating a little bit And if you serve this service, uh, to to real users, um, you're probably interested in in the percentile That I think is the 95 percentile here and you really see how this How this goes up and that still means that five percent of your users have a have a worse experience at this point Which is not good all right, another thing to Uh, always keep in mind when you do performance measurements is caches. Um So here's a guy, um, who measured, uh Latency I believe for his his hard drive And what do you see is in this chart in this histogram here? Uh, it goes up and it goes down and it goes up again and Well, by the title you probably will have guessed Here you basically measure cache. So it might be you really measure just, uh, access to memory here Where that probably is where your system has to really scrape things off the hard drive um, and so of course the first comment on this block was, uh, to use, uh or direct Or direct IO to basically bypass the the cache um For latency. Yeah, I was expecting that this is hard to read here. Um Things to keep in mind. So, uh If you want to check that out, there are many more examples, uh on on this gist um If you say that one cpu cycle which takes about Zero three nanoseconds, uh, would be one second, right? Uh, then A level three access cache access, uh, would be some like, uh 43 seconds, which is quite some time compared to um One cache access which is three seconds. However If you go further and you go you talk to real memory or you have to talk to real memory That's already would be six minutes. Um I mean you can read all of that all of that here, but, uh Another number, uh, a tcp retransmit which One two three seconds in in this perspective would already be something like, uh 100 years and A physical system reboot, um Um Let's say this takes five minutes They had and and that's why I put this up here That means, uh, at this time if you would take this time back in in the world history, uh, that was when the Sahara still was an ocean um, so that is something, uh I think you should remember from time to time that really caches are a very good idea and Well, if you if you have too much network i o That already adds a lot of uh of latency So the I took this, uh table out of this book Um to be honest with you, um, you should be reading this book and not, uh, listening to me Brent greg is really one of the Of the guys to listen to, um I truly highly recommend this book I would know a good place where to order it, but I leave that to you um We have seen a couple of uh chart types already. I had this line chart. I had the histogram bar charts, uh This has nothing to do with with computers, but uh, I wanted to introduce the concept of those, uh scatter plots so this is basically, uh How much people pay in a restaurant for their bill? Uh, sorry, how much tip people give in a restaurant depending on the price of the bill and of the gender So what do you see if you go out for lunch? That's Pretty much the same. So in this chart you have multiple dimensions. You have gender Um, you have the tip of course, uh the total bill um And you see those, uh clusters of of information and interestingly, uh When it comes to to dinner then Male customers tend to give way more tip than female ones. I don't know why um another chart type which, uh is Very very informative for humans. Uh, those are heat maps What you basically see is I mean down here is a heat map for for network latency um where, uh, at some point a bandwidth limitation kicks in and then, uh You see, you know, how the latency is distributed for you for your packets and that is not something Uh, a single number could kind of tell you Or a distribution Um another thing that also, uh, Brandon pushes quite a lot of flame graphs They also are extremely informative of understanding what what goes on in in your system Um Right now I'd like to come back to more the Categories we we were at before It's a cpu memory disk i o network i o um, and let's start with cpu performance. So Basically the question is how long does a computational task take? I was asking One of our principal engineer is how he would put this in three Bullet points for a slide and his answer was it all depends um But it's true, uh It really really really depends on on the architecture. So my first computer had a set 80 cpu in there. That was something you could easily understand um modern computers or modern cpu's Are quite complex systems, um, it also depends on on caches as we saw before memory latency IPC so that is instructions per per cycle clock speed And if you are after integer or a floating point performance Um, so on the good old days clock speed was the thing I already mentioned we had the one gigahertz And then it was two and three and then people found out oh actually we cannot scale this up to infinity Then they started to add more cores and and and stuff But of course if you have an application which is bound to one core then The other 71 you saw before are kind of idle So the answer really is It's a mix of of different micro benchmarks You would need to run to answer this question and this really comes down to To your workload or to your application to really say Uh If you have the right cpu performance or not, um, there are standardized ways like spec cpu, but this costs money to use. Um a free thing I a free Benchmarking or stressing tool, uh, I find extremely valuable is stress and g So by now they have some like 70 cpu specific. We call this stressors. Basically, it's it's micro benchmarks and The tool lets you say, okay. I want to have everything you consider to be a cpu Benchmark or cpu stressor and a cpu cache stressor Run this for a minute and uh, just dump the matrix um And then you get a long long table like this um They call actually the the result bogo ops Which is not a bad name because you know, we never know really What that number at the end of the day means but you know, you can compare those numbers between different cpu's and different architectures and actually the the art at the end is To pick the right ones out of those and combine them in the right way And yeah, that is basically what uh, the spec consortium does with with spec cpu um Even though you have to be careful that you use the same config if you want to compare two spec cpu runs um with each other so I mentioned stress and g um Overall, they have now about 200 of those stressors. They hit various uh subsystems like block io for network. Um You can do things like threshing caches. So basically uh invalidating them um They are also targeted kernel Interfaces um And uh, yeah It's also a very good tool to to check if your system is is robust um Right, let's get to to block io um the question here is I mean we want to read and write uh files.  So Like you will see in the others The tradeoff always is high throughput versus uh low latency. Um A few more parameters, uh One has to understand when uh, we talk about uh block io so IOPS uh input output operations per second. Um or people call it io capacity and uh Sometimes you have uh manufacturers that come up with a big big IOPS number and uh, they want to impress you with that. Um It's not It's not always the the truth to what your Block devices they actually are capable of. Um Another one another parameter to look at is is q depth. Um, that basically means how many IO Uh operations can be in flight or it can be queued. Uh At a certain time or at the same time I should say, um and Latency basically means how long does this uh io operation take? So and when you have a big q depth and you basically get tons of of IOPS But it doesn't mean that uh, your latency is actually where it should be for your application. Let's assume Uh, that your application needs a very very low latency. So and you have a little formula how to calculate your IOPS Um That is a nice, uh visualization of the linux storage System I found so basically up here is uh file systems and caches.  Um, the one I find extremely useful The one, which uh, I use the most is is fio that stands for flexible io mapper And it's actually from the kernel maintainer That uh Is in charge of this block io player in the linux kernel Um to get started with it, I recommend uh to look at the examples uh that come with it. Um, there are even examples how you can measure s3 So it's capable of of many things as you will see over the next couple of slides. Um It also can do uh even hcdp requests So this is a default command. So Name is basically the file on the disc we we use to write. Uh, we say we want to have uh a random read write Uh benchmark We want to have direct io. So we don't want to measure memory performance in terms of of caches Uh, we use the io engine lip aio The block size is one megabyte the mix for Random read write is that we want to have 75 percent read and 25 uh write Um, which is usually a pretty good mix. Um the size of this file here we create for for writing is one gig Um, we want to have group reporting. I mean even though it doesn't fit them on slide the output And iodeps of four means we have uh four i operations in flight, but this is not what underserved controller is And we want to have two jobs in in in parallel so and then you get tons of output There are block articles that discuss those I also have to warn you that with newer versions of fire that from time to time changes if you want to pass that don't fire has Fire can output all of that in for instance jason and other file formats. Uh, you can easily Uh pass later on um, but what you get here is uh, basically, uh the read iops are I didn't like this of 166 So i operations per per second. Um That gives us the bandwidth of about uh, 66 uh, maybe bytes. Um Yeah, um Another thing Where i may be confused a little bit is uh, he gives you this uh, s led C led and led. So those are latency For submission and completion Another thing, uh, you should be aware of I know it's probably hard to read. Um Always look at the at the units here because sometimes you can get confused why those numbers don't add up and then you see It's all about the units. Um, you also get percentiles. Um In your output and yeah, there's tons of more information. Uh, it even reports you page faults So whenever you say major page faults, uh, then there's probably something else Cropped um network Um, we basically have the same problem, but this time we call it transmit and receive. So receive is reading and transmit Writing to network. Um, we have the same things. It might be we, you know, want to stream this talk to the internet Then we are all about throughput Um, it might mean we want to do a vibe call over the internet Then latency is is a big issue. So basically round trip time um, and we have the problem that, uh, networks usually are unreliable. So if you transport something over the internet, uh, There's no guarantee that your packets arrive um Yeah, I showed you this, uh kind of picture before. Um It's actually done with this file. So file also can can target, uh client server and then it's, you know, the same thing We we measure i o and if you if you take the latency for each packet that gets transferred and Use something like my purple In that case, uh, you can get this very nice, uh heatmap charts where You can try to understand what's going on for many many hours. Um So if you know what's going on here, so we again kick in bandwidth limitation and then At some point those two, uh, spread out here. Um, so far, I haven't found out what this means um Right, I said, uh, one of the challenges is that uh, you have packet loss and packet corruptions and retransmits and all those things.  Um, so basically, uh, you load it into the kernel. Um To your root Qtask you edit and then, uh, you do things like I want to have a delay introduced between 50 and 10 milliseconds. Uh, I want to have them normally distributed. Um, I want to have 0.1 percent corruption and I want to have 0.1 percent packet loss and Yeah, that's What do you get? So basically the the latency and stuff is much more spread out so for memory, um Again, it's the same thing read write. So we are interested in in throughput You are interested in latency. We have to make sure to not measure cache performance. Um Other things to keep in mind, uh page faults or how you actually access your memory. Uh, So if you have no more notes, uh, keep that in mind to to really measure the thing you want to. Um, one option, of course is again stress and g. So this time we use the class memory and vm uh again that, uh Takes time to find the right stresses for for your workload. Um, There are other benchmarks like this one called x mem Uh, mainly developed by by microsoft, but it's open source which, uh, basically has all the features, uh, you might be interested in. Um And, uh, also supports basically, uh, many many different platforms. Um, So in case you're interested in arm, uh x mem Serves the purpose um Right some other performance measurement tools. Uh, I find Useful and it, uh came to my mind when I made the slides. Um First of all again, I'd like to stress brands, uh brands block. So there are tons of of tools like I don't know really where to start. Uh, perf is a very important one s trace. Uh, iotop block trace ios stat. Uh, There's a great talk by brendon himself. Uh, Where you find a link on brengarack.com slash young's perf. The hml Uh, totally worth to to spend this hour and he basically goes over many of those tools here And explains in which cases they are useful. Um, another one I found, uh, extremely helpful Uh, is sysjitter. So sometimes you have the problem that, uh, or Yeah, maybe I explained first was sysjitter does.  So the system first of all looks pretty even and also, uh, looks pretty much okay um and then you have those, uh tools that More or less try to do everything. So those are more frameworks. One of them is Suspense, so if you don't want to get into details of finding out what are the best, uh CPU micro benchmarks and stuff then maybe suspense or something similar is good So they have one Number you get for for cpu one for memory and and other things they also have a mysql database benchmark Um, yeah, and you cannot your own and uh I i'm not sure if they provide charting there But this gets you gets your job done pretty quickly Um, another one is hpcc. I especially mentioned that for the stream memory benchmarks um They're pretty useful Uh, I like their chart where they basically uh Have the numbers of all the the benchmarks they they support and then you get the circle, which is good and you know, you get this weird Uh distributions where one benchmark is good and another one is not um Perfkit is something from from google uh Where they basically uh wanted to provide a framework they can uh Benchmark different cloud providers. Um Even though you're not even if you're if you're not interested in in cloud computing, but you know have your own servers They have a long list of uh of benchmarks that make sense And the other good thing is they already come preconfigured. Uh, so you know which which parameters are A good pick Um, and of course you can run those things individually Another one probably the largest one is the foronix tests suite. Um, they really have a large collection of benchmarks and tests Um in there, it's a framework. Um Yeah, you will see on their webpage. They sometimes try to uh attract readers in kind of a clickbait way uh A big warning Make sure you do not upload your your test results to the foronix servers. Yeah It is said that some companies did this accidentally with products. They even they didn't even have shipped That's probably not really what you want. Um right and uh I like to close my talk with at a case study I found uh Couple of days ago. So the the headline is running a database server and easy to your clock could be slowing it down so they obviously also had the performance problem and they did long analysis and they figured that uh They were using a clock source which the extent clock source Which required as a score and that totally slowed them down. So Sure use tsc where you don't have to Execute as was called to get the time Uh, the thing I want to say with that is uh, it might be that you really try to chase down performance bottlenecks And then it's something completely different um, so last slide, uh Understand your systems and and bottlenecks monitor continuously and also benchmark from time to time all right Thank you


All right, first bad news. The final exam will be on December 19th. Exactly one month from today. Well, that's good news in some sense, right? You still have one month. And the exam will be from 12.30 to 3.30 in the afternoon at Hearst Gym, which I think is very appropriate because, you know, perhaps I put some physical exercises on some of the problems. Shoot some hoops and run a couple of circles. You have a question? So again, you can find this information online. I don't remember, but I hope it's not swimming pool.  So last time we had this discussion about this Thursday, next Thursday. So this is next month, okay? December, not this month. All right. But in the meantime, we continue with vector calculus. And today actually, so we're kind of getting to more and more interesting stuff. And today we will do some preparatory work for a generalization of a Green's theorem which we discussed last time to the three-dimensional case. Come on, guys, let's focus, okay? So this three-dimensional generalization of a Green's theorem is called Stock's theorem. And it is actually very useful in many areas of science and engineering. I'll talk a little bit about Maxwell equations today because we'll finally have all the tools needed to actually formulate Maxwell's equations which govern electromagnetism. But let me start by drawing an analogy. And I guess this has become sort of a prevailing theme in this course in the last few weeks. And I have to say that mathematics is really about finding and exploiting analogies. There are a lot of things which are parallel and kind of the same ideas and same patterns play out in different domains in slightly different ways. And if you learn how they play out in one place, you can actually gain some insights about how they play out in other areas. So case in point is this type of theorems which we are discussing right now which as I said already many times take the kind of general form integral over some domain over derivative of some differential form and here there's a boundary of this domain and then here you have this form itself. So this is a guiding principle. And what we are doing now is we are finding concrete realizations, incarnations of this general principle in different dimensions. So let's see what we have found so far. So first of all, we have worked with the case when the dimension of D is one. In other words, this object D is a curve, okay? So there are, this tells us the dimension of this object of the curve, right? But we should always remember that geometric objects, they live in some space, right? So there is some ambient space and there is a geometric object itself and we have to distinguish between them. So if you are talking about a curve, that's a one dimensional object. It could live in a one dimensional ambient space or it could live in two dimensional ambient space or it could live in three dimensional ambient space. And I would like to distinguish between these cases now, okay? So let's first look at the case when the curve is in the ambient space is R. That is to say just a real line. So here is a real line. And in this case, the one dimensional object which we will be integrating over will be just an interval. And generally it could be a union of several intervals but in that case the integral will be just a sum over those integrals. Therefore, without loss of generality, we might as well assume that our domain is a single interval. So that would be an interval from A to B. So now we are in the realm of one dimensional calculus and in the realm of one dimensional calculus, this formula, this general formula takes the following shape. So omega first of all is just a function. And so on the right hand side, we're simply evaluating the function at the end points. Whereas on the left hand side, we are differentiating the literally the derivative of this function over this interval. So that's the formula that we are talking about in this case. And that's the simplest case really because this corresponds to the smallest possible dimensions of all objects involved. Our domain of integration is one dimensional and it lives in the one dimensional ambient space. So next, we generalize this. So let me do it like this. So here, I will do it like this. Next we generalize it and we consider ambient space which is two dimensional, okay? So now we are talking about the more general curve on a plane. So a curve on the plane would look something like this. So there is some, and now that's some wiggling room, so we can play with it. It doesn't have to be a segment of a straight line because now we are on the plane. Okay, in this case, we also have a formula and that's what we call the fundamental theorem for line integrals. In this case, again, we have a function F. We have two end points. I will now denote them by capital A and B because here A and B really corresponded to some real numbers. And now this points, this A and B, they represent points on the plane. So these are not numbers anymore, right? And so in this case, on the right, we just evaluate our function at those two points. So it's very similar. And on the left, we are taking the line integral over this curve. Let's denote this curve by C as we always do. And here we'll have the line integral of nabla F dr, a line integral of the gradient vector field, right? So that's what we have in the case when the domain is one dimensional. There is actually one more. There will be one more square when the ambient space, so I would have to draw it here, right, the ambient space will be three dimensional. And actually we stop there. I don't have to go any lower, because in this class, as I said many times, we only talk about lines, planes, and three dimensional spaces. We don't talk about four dimensional spaces, for example. And we'll talk about three dimensional spaces later next week and the week after next. For now, I just wanna focus in this line integrals. I would like to just look at R and R2. So now I would like to make an analogy. And my analogy will be with the case when the dimension of D is two. In other words, now the domain D in this formula on the left, didn't put a bracket, nobody told me. Do tell me if you see something odd on the blackboard. So the domain now is two dimensional, okay? So now if it's two dimensional, we certainly cannot fit it in a one dimensional space. So the simplest example here for the ambient space is not R, but R2. So the ambient, let me abbreviate this, ambient space is R2. That is really the simplest example, right? We don't have smaller, we cannot put a two dimensional object into a smaller dimensional space. And so what is it going to look like? The analog, what's the analog of each of this form, you know, all the formulas, the pictures and the formulas. What's the analog of this formula? The analog, or first, what's the analog of this picture? The analog of this picture is the following. It's just a domain which looks something like this. We'll have some corners, it doesn't matter. And I mean really the interior here, the shaded region. So this is D, this is now D. And this domain has a boundary, which I would like to do, maybe I'll use a different color for it. So let's just call it B of D, the way we did last time, B of D, the boundary. So maybe to make it more, to make the picture more analogous, I'll put yellow here also. That's the boundary. So what I'm saying is if the first piece of the analogy is that this red interval is analogous to this red domain. And these two points, these two yellow points are analogous to this curve, right? Is that clear? Yes? Okay, so that's the first thing. So clearly there is a simple geometric analogy, we just bump all dimensions by one. Whereas here the domain was one dimensional and the boundary was zero dimensional. Now the domain is two dimensional and so the boundary is one dimensional. Okay, just bump everything by one. Now the formula. The formula is the formula we learned last time. In this formula on the right hand side, on the right hand side, we have the line integral of a vector field. So we can write it like this, p dx plus q dy over the boundary, right? That's the right hand side. Because now this omega is actually a vector field and we take the line integral of this vector field over the boundary. The boundary, remember, is oriented according to a rule, special rule, goes counterclockwise. Okay, what about the left hand side? The left hand side now is going to be a double integral because we are going to integrate over D. And so it is going to be the integral over D, double integral of the expression, which at first looked mysterious, but then we discussed last time what the meaning of this expression is. So that's the left hand side. So what I'm saying now is that this formula, the analog of this formula in this column is the left hand side of this here, right? And the analog of the right hand side of this formula in this column is this right hand side. So this is very important to realize. Because once we see a general pattern with all of these formulas, they start making a lot more sense. If we don't see this analogous, it looks like a collection of different formulas which seem to be totally unrelated. But in fact, what I'm trying to explain is the fact that actually they're very closely related. You see, okay, so this is Green's theorem. This is Green's theorem, which we discussed last time. So we have found these three corners, right? Of this diagram, of this picture. And as always, when you do an IQ test, we talked about this before. You're asked to complete the diagram, right? That's what we are going to do. Not, we will not do it everything today, but we will start laying the foundations for proper understanding of what should go here. And that's what's called Stokes's theorem. So, but we can use this picture to see the different elements of what's to come in this corner, okay? So we should just try to generalize by using analogy between the left and right, and also kind of see the progression from the first line to the second line. So what should this theorem be about? I mean, we know, we see that there must be some result here as well. So what should it be about? Well, first of all, we are still within this column, which means that the dimension, I will use now this board because I don't have enough space to work this out here. So I'll just think of this as a magnified corner of this blackboard. So we're still in the second column, and that means the dimension is two. So on the left, we're still going to integrate over two-dimensional object. But now the ambient space should be three-dimensional, right? Why? Because I want to establish an analog of what I had here when the ambient space was R2. The ambient space was R2, whereas the object was a curve. So the gap between the dimension of the object and the dimension of the ambient space was one. And so we want the gap to be one here as well. That means two-dimensional object inside three-dimensional space, okay? So what kind of object, let me give you an example of such an object. Well, the simplest example of such an object would be, would be a plane, a plane in three-dimensional space. And here is our favorite example of a plane. This is our, you see, this is why, by the way, I erased that, but there is a big game this weekend. So of course, I hope everybody knows about this and will come to support Brokliak. So anyway, this is our plane. So you see, if we were in the top column, so to speak, in the top column, our two-dimensional domain is confined within a given plane. So let's say that plane was this vertical plane. So our domain would be part of this, right? And the plane is rigid. So if we are within that plane, that's all we can do. But now we say, okay, there is actually three-dimensional space out there. So let's look at more general two-dimensional objects within that three-dimensional space. And the first thing we can do is we can take, for example, this same plane and just rotate it like this. And we can also move it like this, right? So this way, we can actually get any plane. And then we can take a piece of that plane. So that would be a more general object than before. Slightly more general object because it would not fit in the original two-dimensional plane, which was just this. So now it would say this one would not be exactly like this. Would not be exactly like this one, right? So this is a very small generalization, but generalization nonetheless. If we were in this column, if we were still in this column, that would correspond to just restricting our attention to line segments, but line segments which can go anywhere on the plane. Whereas before we had a line segment confined within particular line, okay? But of course, here there is a lot more to curves. We don't just consider line intervals, we also consider this wiggly curves like this, right? So what's the analog of that kind of object in this context? So that would be something which does not fit even in a rotated plane, right? So for instance, of course the simplest example is a sphere. Or a sphere is kind of difficult to draw. So what I'll draw is an upper hemisphere. Let me draw an upper hemisphere. And let me use red. So this is upper hemisphere. You see, I mean the, it's like this. So it doesn't fit in any plane. It doesn't fit in this plane. I'm drawing it on this plane, but it doesn't live on this plane, right? Unlike this one, which actually fits in a particular plane. So, right? So this is what I'm trying to say is that this is the analog, this is a proper analog, two dimensional object analog of a curve on the plane. And it also has a boundary, also has a boundary. Now I know that there's one confusing point here. Oftentimes people get confused why do we assign to this upper hemisphere or to sphere itself dimension two and not three. And this is kind of common confusion about how we count dimensions. And I said it before and I'll say it again. You have to distinguish between the geometric object and the ambient space. Here I'm drawing a sphere, think of a dome, a roof, a dome shaped roof like this. It lives in a three dimensional space, but it doesn't mean that it itself is three dimensional. It is two dimensional because if you have a little bug on this, living on this dome, the bug can only go in two independent directions. There are two independent, two only two degrees of freedom so to speak in which the bug can move, not three. I mean, it doesn't go inside or outside. If it lives here, then that's the way it is. So, a more mathematical way to think about it is the following. You can actually think of flattening this dome, this half dome, onto the disk which lies at its foundation, at its base. And so we can actually identify points on the dome with the corresponding projections onto this flat disk. So there is actually one-to-one correspondence between the dome, the hemisphere, and the disk. Now the disk surely is two dimensional. So because we established such a one-to-one correspondence, that also is an indication or actually is a proof of the fact that this is also two dimensional. So this is all to say that it is this kind of objects that we will have to integrate in this corner on the left. So on the left we will be integrating over things like a sphere, like a sphere or upper hemisphere. Okay, and on the right, what are we supposed to integrate on the right? Well, you see now we actually, so to understand this picture, we looked at this analogy with analogy on this side crossing from right to left. Now to understand what we're going to be integrating, we cross from bottom to top. You see, if we were in this column, the right-hand side actually stays the same. The right-hand side stays the same. We just take the values of the function at the endpoints here and here. The difference is that these are the endpoints of an interval on the line. And these are the endpoints of a curve on the plane. But structurally it's the same. So that's why we should expect that going from top to bottom within this column, we should also be integrating very similar objects. So what are we integrating here? Here we are integrating a vector field which has components P and Q, and we integrate it over the boundary. So we should do the same thing here. So this will be an integral of a vector field over the boundary. So I will now write it out in more detail. And so basically I have already assembled the formula that we need, the stock's theorem. I have already assembled most of the elements. The only thing which is missing right now is this, the question mark here. What should appear here? And that should be the analog of this expression, dQ dx minus dP dy. So that's the only thing which is missing right now. So, but let me write this, let me write out the right-hand side in more detail first before I explain what that question mark stands for. So now F is going to be a vector field in R3. We shouldn't be scared of that. I mean, we understand that vector fields can be on a plane or it can also be in three-dimensional space. Remember, we talked about wind maps. Well, if you think about wind map, wind map is two-dimensional. So a wind map would represent a vector field on a plane. But what does it mean? It actually means that we have to say where exactly do we measure the wind vector for this map? And usually we just measure it on the surface, right? But in fact, if you look at the entire three-dimensional space, each point in that three-dimensional space has some wind vector. Even now in this classroom, there is some mass winds. Winds of change, as they say. So you can sense some winds, right? But the wind actually depends, it lives in a three-dimensional space, not just a two-dimensional space. And so that's a vector field in a three-dimensional space. That's totally natural. So that's what F is going to be because now that we live in a three-dimensional space, let's look at the most general vector fields in a three-dimensional space. There's no reason to confine ourselves to vector fields in a two-dimensional space. So that vector field now has three components. There's some p, which is a function of x, y, z times i, plus q, also a function of x, y, z, but let me not write it out just to save time, and r times k, where, remember the i, j, and k are the three basis vectors. This is i, this is j, and this is k. This is x, this is y, and this is z. Okay? So the difference is that in this corner of the diagram, we consider a vector field on the plane. That vector field, first of all, does not have a third component, so it only has p and q. And second of all, because it only lives on the plane, it does not have a dependence on z. So this is a more general situation in two ways. First of all, we have a third component, r, which corresponds to the third direction, k. And also p, q, and r all depend on x, y, and z. Okay? So then what is f dr? Well, dr, as always, is just dx times i, plus dy times j, plus dz times k. And so you just take the dot product of these two guys, and you find pdx, plus qdy, plus rdz. Just like before. Before, we did not have r. So that's why what we got was just pdx, plus qdy, which you see on the upper right corner. Now we'll have a slightly more general expression, pdx, plus qdy, plus rdz. So let me now write down the theorem which we would like to formulate in more detail. In that theorem, we will have on the right hand side a line integral of pdx, plus qdy, plus rdz, where p, q, and r are three functions, three functions of x, y, z, of x, y, z. But in fact, it is better to think about them as components of a vector field, components of one single vector field. And we have, we are going to integrate over the boundary over surface in three dimensional space. And a very good example of this is upper hemisphere. So that's just a good picture for it, okay? But of course there are, you can always make something more fancy like this. So it looks like a little rabbit. You see what I mean. Okay. And that's the right hand side. And on the left hand side, we will have a double integral because we're going to integrate over the rabbit's head or over the upper hemisphere. I want to stay politically correct, so I hope I don't offend any rabbits. So let's just, let's just do an upper hemisphere. Just to be on the safe side. So we integrate over. Maybe I should emphasize that here we're integrating over the yellow thing. So maybe I should erase it now, right? So actually the whole thing. Now I'm really politically correct. And here I'm integrating over the red thing, of which the yellow is the boundary. So in fact, now I don't even have to, to make it a dotted line. It is, we can actually see the entire boundary. So boundary is here. Okay, is that clear? So that's exactly the same as in previous cases. And the only question that remains is what do we have here? What should we integrate here? And that should be something which is the analog, analog of the expression dq dx minus dp dy. So you can ask, why not just put the same expression? dq dx minus dp dy. That worked in the case when we had a flat region, which fit entirely in on the plane. Well, there is a problem with that expression. The problem with that expression is that it does not depend on r at all. Only depends on p and q. That's why it worked when we were on the plane. On the plane, our vector field only has two components, p and q. So such an expression makes sense. It depends on both of them. But now the right-hand side depends not only on p and q, it also depends on r. So surely this r should appear on this side, right? Because of course, if we change r, we will get different answers on the right. So it's impossible to have a formula where on the right you have r, but on the left you don't have r. So it has to be something like this, okay? It has to be something like this. And that's what we're going to find out. What exactly is it? So here's the plan. I will have to explain what kind of integrals. First of all, we'll have to learn how to integrate over general surfaces, general surfaces in R3. And the second is that we will have to find an analog of this expression. And the analog of this expression is what's called curl. So just define, explain what is a curl, curl of f, which also can be written as a cross product between nabla and f. And finally, we will put everything together and we will write the left-hand side of this formula. We will have to write the following thing. It will be double integral over d of what we'll call curl or nabla f like this, dot ds. And that will be the answer. That's the answer which will go instead of the question mark over there and that will complete our diagram. But you see, we can't do it right away now because there are a couple of things which are missing. First of all, we don't know yet how to integrate over surfaces. What we do know is how to integrate over flat surfaces. But see, there's a big difference between a region like this and a region like this, which is what we are talking about now, okay? Or think about this curtain. You can bend and shape it in any way you like, unlike a flat region like this. For flat regions, we know how to integrate. For this curvy regions, we actually do know something because remember at the very beginning of this course, we talked about surfaces of revolution and about areas of such surfaces. So we actually know a few examples of formulas for surface areas. And what we'll do, we'll just generalize that. First of all, to get surface areas for general surfaces, but also to get surface integrals of vector fields which are like line integrals of vector fields that we found for curves. So we'll now proceed to develop this and to kind of laying down the foundations for explaining what the left-hand side is. And so the first thing we'll do, what I would like to do is to talk about the curl because that's sort of the easier part. This kind of algebra, more kind of algebraic part. So what is the curl? Any questions about this, by the way? So speaking of the exam, I'm actually going to put some materials on the course homepage by the end of this week. I've been asked by some students to put the review problems and things like that before Thanksgiving so that you guys have more time to work on this. So I'll do it this week. All right, so first, so we talk about curl. So here F is again a vector field like on that board with components P, Q and R. And curl is just what you would get by taking the cross product formally between this vector field and nabla. What do I mean by nabla? By nabla, I mean a vector which has components d, dx, d, dy and d, dz. So we just follow the general rule. How to do cross product? To do cross product, we have to make this diagram like this where in the first row, we put i, j, k. In the second row, we put the components of the first of the two vectors involved. In this case, it's going to be d, d, dx, d, dy. And d, dz. And then we'll have P, Q and R which are the components of the second vector involved, right? That's just the usual formula for the cross product except the novelty is that, well, one of this is actually bona fide vector field. The other one is kind of strange looking expression. It has partial derivatives as components. But nevertheless, we can assemble this diagram, this picture, matrix really is a proper name for it and take its determinant, right? So what is this determinant equal to? Just the usual rules apply. In front of i, we should have d, dy of R minus, well, here we should multiply them in the order from the second row to the third row. So it would be d, dz of Q. So let me write this down. This means dR, dy minus dQ, dz times i. You see what I mean? Just this minus this. But you have to, the derivative goes first. It wouldn't make much sense if we wrote Q times d, dz. So, but d, dz of Q makes sense as a partial derivative of Q. And then we proceed in the same way. So the next one will be dR, dx. Minus dP, dz, and that's the j component. And finally, we will have, for this one, we'll have dx of Q minus dP, dy. And so what I'd like to say is that actually this expression should be thought of as the analog of the expression dQ, dx, minus dP, dy. So let me convince you that this is a good analog for that expression. It's a good analog for this expression. Well, first of all, let's try to reduce this formula to the two-dimensional case. The two-dimensional case can be obtained from the three-dimensional case by first of all setting R to be equal to zero and also saying that P is a function of X and Y and Q is a function of X and Y only, right? If we do that, then our vector field PQR will actually become just a vector field PQ on the plane. So let's see what will happen with this formula. If indeed we say that R is zero, P depends on the X and Y, and so does Q. Well, first of all, because R is zero, all terms involving R will disappear. Second, because I said that P does not depend on Z, this will disappear. Q doesn't depend on Z, this will disappear. So the first two summands in this formula will disappear and what will we be left with? We'll be left with this. So in other words, we get the old expression DQDX minus DPDY, but now we actually, before we thought about it as a function, but now we think about it as a vector. We think about it as the third component of a vector. So in other words, in space we arrange it like this. Our vector field F is a wind map on the X, Y plane. And the curl of that vector field actually happens to be going in the vertical direction, direction of K, and its magnitude is equal to DQDX minus DPDY at each point. So it's a slightly different perspective on this expression. Before it was a function, now it's a vector, but always pointing in the Z direction in the three-dimensional space. But this is already the first indication that this is a good candidate for it. For replacing this formula in the three-dimensional case. In a sense, you see, it's very symmetrical because each time what happens is, let's say we take K and we get an expression which involves derivatives of the remaining two variables, remaining two components, P and Q. So K gives us P and Q and we take derivatives, cross derivatives for the remaining two coordinates X and Y. And likewise here, for example, here's J, but we work with the things which correspond to X and Z. Here it's I, but we work with things corresponding to Y, X and Z and Y and Z here. So that's the first reason why it's a good replacement for it. But there is actually a better reason because actually this expression played a very important role when we talked about conservative vector fields. And that's the next thing that I want to explain. Remember, conservative vector field is a vector field which is a gradient of a function. And these are very nice vector fields. For example, for these vector fields, it's very easy to calculate line integrals. We just have to know the values of the function at the end points and take the difference. So conservative vector field, vector field, I recall. First of all, let me recall what happens in R2. In R2, it means that your vector field, which is P times I plus Q times J is the gradient of a function, for some function, for some function, okay? And if a vector field is conservative, we can use the fundamental theorem for line integrals to evaluate line integrals of such vector field. And we saw examples of how nicely this works. So it is good to know when is a vector field conservative, when is F conservative, conservative. And we had a very simple criterion. We said that it is conservative, F is conservative, if and only if the following formula holds, dQ dx is equal to dP dy, right? Remember, now there was a caveat. There was a subtle point here, which was that actually, that's not always true. It is true if your vector field is defined over a simply connected domain, because we didn't really talk about the reasons for this, but actually there's a very simple geometric reason. The point is that if you have a non-simply connected domain, in other words, for example, you have something like this, or even just remove one point. And your vector field is only defined here and it cannot be extended to inside. What happens, what could happen is that when you take integrals over, say, circles or some curves going around this region, you could get something non-trivial. Even if this equation is satisfied, you could get something non-trivial. But we know that the vector field is conservative if and only if its line integral over closed curve. No matter whether it goes around some hole, it doesn't go around some hole. Over all closed curves should be zero. So the problem is that this equation almost guarantees that such integral is at zero. What it surely guarantees that such integral is at zero when you can contract your curve, your closed curve to a point. Here, you cannot contract to a point. And that's why this argument breaks down. So this is only true if your vector field is defined on a simply connected domain. Now, what are the simply connected domains? In this, if you look at all the, say, homework exercises that we have, 99% of the examples are vector fields which are actually defined everywhere on the plane. They don't have any poles, any singularities, right? So in fact, this is the main, in this course, we mostly focus on such vector fields. So let's assume for now that the vector field actually is defined everywhere on the entire plane. And the plane is simply connected.  That would mean that your vector field actually has poles. You have something like one over x squared plus y squared in a denominator. So let's suppose to simplify matters that f is actually defined everywhere. It's defined on the entire plane everywhere. Everywhere. It's defined, defined everywhere on R2. Then this issue does not arise and this is actually true statement. It would not have been a true statement had I not made this assumption that the vector field is defined on a simply connected domain. So then this is actually very simple criterion. But what is this formula? What does this formula say? It says that the difference between these two guys is zero. Let me erase this. We will remember this. Suppose that it's defined everywhere. So this is the criterion. And now we can appreciate more, even more this strange looking expression dq dx minus dp dy. This strange looking expression tells us whether our vector field is conservative or not. If it is zero, this vector field is conservative provided it's defined everywhere. And if it's not zero, then for sure it's not conservative. You see, that's exactly this expression that we're talking about. That's the expression which appears in Green's formula. Okay? And if this formula is correct, is this formula satisfied? Then we actually have an algorithm how to find, how to find F. We talked about it before and you must have done some exercises doing this. And you see the point is that you can try to apply this algorithm in the case when this formula is not satisfied but you'll get stuck. You'll see that it doesn't work. The algorithm doesn't work. You will not be able to find a function F. So the first step when you're asked whether the vector field is conservative or not is to compute this expression and see if it is zero or not. Okay? So the reason why I'm saying all this is because the notion of conservative vector field makes sense not only for vector fields on the plane like this, but also for vector fields in the three dimensional space. And if I want to prove to you or convince you that this curl now in the three dimensional case plays the role of this expression, that would be a very simple test. Would I be able to use this expression to test as to whether or to see as to whether my vector field is conservative or not? So that would be the second argument in favor of this expression. So let's talk about vector fields in the three dimensional space. Now in R3, in R3, we have a vector field which is PI plus QJ. And now there is a third component which is RK. And what we would like to do is we would like to apply the same notion. Well, a vector field is called conservative again if it is equal to nabla F. You see nabla F, the gradient, makes sense on the plane and in space. It's just that now it is going to have as components, it's going to have dF dx i plus dF dyj plus dF dzk. In the two dimensional case, we would not have this term. And now we have this term, but this notion makes sense anyway in both cases. And now we can again ask the question, when is F conservative? And the answer is given by the following theorem. Let's suppose again that F is defined everywhere is well defined. Well defined means that it does not have poles. So for example, if you have a vector field which you may have seen minus yi plus xj divided by x squared plus y squared. This is what makes it ill defined or not well defined because this gives you in zero at when x and y are equal to zero zero, you get a pole. You cannot evaluate this vector field at this point. So this vector field is not defined on the entire plane. But for example, vector field like this is certainly defined everywhere on the plane. That's what I mean when I say that F is well defined. Defined everywhere in Rc. So I assume that if we assume that then saying that F is conservative is equivalent to saying that the curl is zero. And that is a justification for saying that that's another justification for saying that the curl is a good replacement for this expression. Which in fact, which in fact can be found as one of the components, this one for the curl. And this is actually proved. This is actually proved by using stock theorem which we are now trying to establish. So this is to tell, this was all this long discussion was to convince you of the importance and usefulness of the strange looking expression. Because you probably thought on Tuesday that this looks strange. Well now this looks even more strange, right? So like what does it mean? We'll talk more about the meaning of this later. But at least now you see that it is useful. It is a very functional thing. It is, first of all, it reduces to the old expression for when our vector field actually is a vector field on the plane. And second of all, it can be used as a criterion or for a criterion as to whether the vector field is conservative in the three dimensional space just the way we used this criterion on the plane. So let's see how it works in practice. Let's suppose you are given a vector field now in the three dimensional space and you're asked, is this vector field conservative? And if so, find the potential function. Find the function F for which this vector field is, of which this vector field is the gradient. So here's an example. Suppose your vector field is like this, e to the zi plus j plus x e to the zk. So the question is, is it conservative? Well, first of all, let's see. It is well-defined everywhere. There are no poles, there are no singularities. We can evaluate, we can find the value of this vector field for any x, y, z. No expressions like one over x squared plus y squared. So great, we can then apply this theorem. This theorem says that if F is well-defined everywhere, it is to find out whether it's conservative, it's sufficient to just calculate this. So let's calculate the curl. Oh, we just write i, j, k, d dx, d dy, d dz. Then we have e to the z1 and x e to the z. So we start calculating. What do we find? So here you have to take the derivative of respect to y, partial derivative with respect to y of this expression. It does not depend on y, so that's zero. Minus d dz of one, that's zero two. So zero. Good, next. You have j, let me put minus. d dx of x e to the z, that's e to the z. Minus d dz of e to the z, also e to the z. So that's zero also. Plus k times d dx of one, that's zero. Minus d dy of e to the z, that's zero also. So zero k. So this is indeed the zero vector. Please note that I put an arrow over the zero. Remember we had a conversation about this a while ago about different zeros, right? A curl is not a function, it's a vector field. So we cannot, if you put it like this, if you put zero like this, that would mean, that would be okay for a function. But saying that it's zero is more than saying that the function is zero. It means that three functions are zero. Not just one, but three functions, the components in front of i, j, and k. And that means that this is zero as a vector. It has all components zero. That's what this criterion means. So criterion is actually a collection of three equations, not just one, but three equations. Okay, great, so this is satisfied. So it is conservative, so answer is yes. Okay, a follow-up question. Follow-up question is if you're so smart and you know it's conservative, find the function for which it is, the gradient, right? And that's really very easy to do. We just follow the same algorithm that we used in the two-dimensional case. So find f such that f is equal to nabla, okay? So what we do is we start doing anti-derivatives. And the first time you take anti-derivatives is back to one of the three variables, and then you continue. So we have to make a choice. So let's just do this three-fourth way. Let's take anti-derivative with respect to, of the first function. Take anti-derivative of e to the z with respect to x. So what do we get? We get x times e to the z, but that's not all. We have to add a constant when we take anti-derivatives. But now this constant is not really a constant. It is a constant with respect to x, which is a variable under which we differentiate. So this constant actually could depend on y and z. So it's not really a constant. It's a function of y and z. That's what the first step of the algorithm tells us. Now we're going to differentiate this with respect to y. Differentiate, well, let's just say, take d dy. Take d dy. Well, this will be zero. And this will be d c d y. We are supposed to get the second component of our vector field, which is one. You can see I wrote the second component is j. It means one times j. So this should be one. If this is one, it means that c is equal to y plus another constant. Let's call it c one. But so if we were working with a vector field in two variables, vector field on the plane, which depends only on x and y, that's where we would stop. But now we have a third variable. So a priori, this c one could depend on the last variable, which remains, which is z. So we have to just make one more step in this algorithm. Otherwise, it looks exactly the same as before. So now we should take d dz of this, of what? We have to assemble our, what we've learned so far. But we've learned so far is that f is equal to this, but this c is equal to this. So that means that we can replace now this c in this formula by y plus c one of z. And now we have to take the derivative of this whole thing with respect to z. So we find x e to the z, the derivative of this is zero plus c one prime from z. And we should compare it to the expression which we were given. We were given x e to the z. So that means that c prime is actually zero, which means that actually c prime is a constant. Sorry, c one prime. So c one prime, c one, not c one prime. C one prime is zero. C one is actually a constant. Is an honest constant. It doesn't have any hidden dependence on anything. So the answer is, the answer is that f is number of the function which we found, which is x e to the z plus y plus c one. But this is actually constant. Okay? Any questions? Yes. Yes. Let me switch the board. I think the derivative of, first I have to reload f to use all the information I found so far. Right? I have found that it is equal to this from the previous step, where this is already just a function of z. Because I found that c of x, this was c of y z, but we have found that it's y plus c one of z. So I already put this back for the function f. Right? And now, I think the derivative of this with respect to z. And this is what I get. And now I have to compare it to my component, the third component of my vector field, which is x e to the z. Right? And the very top row in front of k, you have x e to the z. So I say this is equal x e to the z. So I can cancel out these guys. And I end up with c one prime is zero. That means c one is actually a constant. It actually does not depend on z. And that gives me the answer. Okay? All right. Any other questions? Okay. So this is how it works. This actually works in a very similar way. And this was all to convince you that of importance of this curl. And this is the expression which we will use for which we will use to establish the stocks formula that elusive formula which appears in a lower right corner. If you think, if you thought this was too many formulas, there's actually one more, which is called divergence. And divergence we won't need until the last lecture. But since it is in this chapter of the book, I guess the idea being, let's just put it all on the table. All the derivatives that we have. And let's look at all of them at the same time. Okay? So we might as well, I might as well write a formula for divergence. So divergence is also an operation on vector fields in three dimensional space, which we can think of as a dot product, a dot product as opposed to a cross product with nabla. So in other words, it is dp dx plus dq dy plus dr dz. So it's a very interesting operation. It takes the vector field and it spits out a function, not a vector field, but spits out a function. And the nice thing about it, so far it's not clear what this is good for. But here is one result which is, which might convince you that it is important, which is that if we take the divergence of a curl. So let's say we have some vector field F. Let's first apply to it curl, that is to say cross product with nabla. That's what's given by this formula. So we get some expression, right? And let's take now the divergence of the result. In other words, you substitute these three components, this, this, and this into this formula. These are not the P, Q, and R of the original F, but these are P, Q, and R of the curl, okay? So you'll get actually double derivatives.  So that's the good thing. So this is something, this is kind of a kryptonite for curl. That's what kills curl. So curl looks very complicated, but there is a nice formula which actually kills curl. And now we can actually assemble all of this, all of this operations we've learned up to now. And now we can actually see that there is some system to this, that it's not random. So let me explain this. We have learned, we have learned three different operations. We have learned three different operations. The first one was the gradient. The gradient goes from functions to vector fields. You have a function F, you get a vector field nubla F, right? That's the first operation we've learned. The second operation which we've learned today goes from vector fields to vector fields, all in R3, all in space. And that's the curl. It takes the vector field and it sends it to its curl, which maybe it's better to call it curl to kind of emphasize that it's different from this guy. Even though I really like this notation nubla cross F, but for the purpose of this diagram, maybe I'll just stick to curl to emphasize the difference. And now we've learned one more, which is the divergence. And divergence now goes from vector fields to functions. So you start with functions, go to vector fields and vector fields to vector fields. And there is another operation which goes from vector fields back to functions. So this one takes the vector field and it maps it to divergence. So three different operations. And now we've learned a very interesting aspect of this. Since you have these three different operations, you can apply two operations one after another. You can start with a function and you can apply the gradient, you get this vector field. Because it's a vector field, we can apply to it the curl, right? And what do we get this way? Zero, right? This is exactly the theorem which I have formulated. In other words, if you apply this operation twice and you take curl of nubla F, you get zero. This is this formula. Because again, curl is the same, I recall, let me maybe write it one more time. So divergence we can write like this and curl we can also write as cross. This is just notation, the same notation, two different choices of notation for the same thing. So you see, apply these two operations one after another and you get zero, but zero is an error. That's interesting, right? What about if we apply this one and then this one? So that means take a vector field, take its curl and then apply the divergence. Also get zero. That's this formula right here. It's the same as writing it, you can write it like this. This is zero without an error because it is a function. It's a function zero, it's not a vector zero. So you see, we have three different operations and these operations have this property that if you apply two of them in sequence, you'll get zero. I would like to contrast that with something we discussed last time about taking boundary. You have geometric object, if you have a geometric object like a domain we discussed, then we can take its boundary, right? We can take its boundary. So we just get this and let's apply boundary one more time. Is there a mistake? What if you take the gradient of divergence? I see, I see. So in other words, you wanna apply it like this. Well, you get what's called Laplacian, so I think. No, Laplacian is the other way. Sorry, see the point is that actually, that would be like going up, that would be going from like kind of going back to the bottom to the top. And in fact, it should be, we should only be going down. So it doesn't look, it doesn't look right. But it's a good idea. In a way it's a good idea, but it's important here to go down. Just like for boundaries. So see what I'm trying to explain now. When you, the point that I'm trying to explain is that this property that you have an operation which kind of goes, makes you go one step. And if you take it twice, you get zero. And what I'm trying to explain is it's exactly like taking the boundary. When you take the boundary, you go, you lower dimension by one. And you see, and if you take boundary one more time, you get nothing. So this, by the way, is another zero. This is empty. This means empty set. For our purposes, it's like zero, right? It's nothing. So the point is, if you think about, this is a very intuitive concept, boundary, right? Any geometric object has a boundary. And then you can, once you realize that there is such a thing as boundary, and you just start thinking about it. It's like, what is a boundary of a boundary? Why not? If you take a boundary, why not take boundary of a boundary? And at first it looks like a good idea, but then you realize that actually, it always gives you empty set. So there is this very interesting geometric structure taking the boundary. And it has this very interesting property, which mathematicians call nilpotency. It's a nilpotent operation. Nilpotent meaning that if you square it, you get zero. So now you try to look for such an operation algebraically in the algebraic world, in the world of functions and vector fields. And this is what you find. You find that there indeed exists such operations, which have the same nilpotent property, that if you square it, if you apply it twice, you get zero. And this is a very important aspect of this formulas that we are trying to establish. The formulas relating integrals in different dimensions because this is what I call in this guiding principle. This is what I call D. You see, I explained already many times that the general guiding principle we are pursuing here has to do with integrating over domains and boundaries. And then here you have some algebraic object and it's derivative. So going from left to right, you take the boundary, just like this. And going from right to left, you take the derivative. And now here is a derivative that I'm talking about. Here I lay it all on the table. If you start with a function, when you are doing, when it's sort of going from zero to one, you take the gradient, then you take the curl, and then you take the divergence. And this operation D, which kind of an algebraic operation, it lives in a different world. But turns out that first of all, there is a trade-off between these two, which gives us this beautiful identity. And also it has exactly the same property as B. In other words, D squared is zero, just like B squared is zero. So there is this parallel analogy between the geometric world and the algebraic world in which taking boundary on the geometric side corresponds to taking the derivative in this sense on the other side. And this formula is just the expression of the fact that one operation is kind of dual to the other. So in some sense, they are one and the same, okay? So that's what these formulas are all about. They look complicated, they look very abstract, but in fact, they are all part of a very conceptual phenomenon, very conceptual thing, and very important phenomenon in mathematics. And as a bonus, we can now write down the Maxwell equations. Because Maxwell equations use, so this is a curl, this is divergence. And now I can write down Maxwell equations because these equations use curl and divergence. So in the Maxwell equations, Maxwell equations are the equations which govern electromagnetism, which govern the behavior of electric and magnetic fields. Well, you know that there are, first of all, there are electric fields. For example, if you have charged particles, they will, if they have opposite charges, they will attract, if they have the same charges, they will repel each other, right? That's electric field. So if you have, if you put a charge somewhere, if you put, for example, the nucleus of an atom consists of some protons and neutrons and protons have positive charge, so neutrons have neutral charge, but protons have positive charge, so they all, they create a field which would grab and attract electrons which are negatively charged particles. So it's a very important field. There's also magnetic field. That's the field that you have when you have a magnet and you have a, someone told me a story that they drop the key at night in a paddle and it's like, what do you do? And there is a very nice solution. You take a big magnet and you put it in the water and boom, you got your key, see? So that's magnetic field. So that's also very important. And not just for finding keys, I suppose, right? So now you look for equations which govern electric and magnetic fields. And here are the equations which were written in 19th century by Maxwell as well as other people. So the, usually the notation we choose is like this. E for electric field and B is for magnetic field. This are just vector fields, just like the kind of vector fields which we talked about, like on that board, here is a vector field. Electric and magnetic fields are just, vector fields like this. But they change, you know, they change in space and they also depend on time. And these equations describe how they depend on space and time. And the equations look surprisingly simple, deceptively simple, perhaps I should say. But let me assume that there are no charges and currents. So it's kind of equations in the vacuum, if you will. Just to simplify, just to give you a flavor of what these equations look like. No charges or currents. So the equations just involve the divergence and the curl. So that's the first equation. See, this is the divergence of E is zero. And you have divergence of B is zero. And then the curl of E is minus one over C dB dt, the derivative with respect to time. And the curl B is one over C dE. Now, what is C? C is the speed of light, speed of light, which is approximately equal to 300,000 kilometers per second. So it's very fast, but it's not infinite, it's finite. So this is very important actually. So you see, so these are the equations. We wouldn't be able to even understand, to read these equations, to even understand these equations if we did not define the curl and the divergence. What's perhaps more important is that these methods, these formulas that we are proving now, this guiding principle and various incarnations that we are talking about. By using those, we can actually derive very important consequences. For example, the Gauss law, the Ampère's law and things like that. But if you just look at this, and it's really, I think it's amazing that such complicated interaction, which governs basically the entire universe, there's two forces in the entire universe, can be summarized basically on half of the blackboard in this very neat and beautiful way. And just looking at these formulas, you already see some very important things which actually were, which were sometimes the cornerstones of physics of the 20s, maybe 21st and 22nd and so on centuries. The first thing you see is that these numbers, you have this number which doesn't see, speed of light does not depend on anything, right? It's just a constant here, which is actually an incredibly powerful statement because in our real, in kind of, in our everyday life, we are used to the fact that velocity or speed depends on who the observer is. If you are standing here and there is a bicycle going in this direction, right? Doesn't matter, okay? So let's say with some speed, right? This is the speed which you see, but if you are going on a bicycle in this direction or if you are walking with some speed, right? You will see, you will observe a different speed. But if you are with speed of light, it's not like this. Speed of light will appear in the same way to this observer and to this observer. You don't add the velocities one way or the other. It is constant. This is what Maxwell's equations indicate. And this was one of the first arguments for Einstein to create his special relativity theory. He said, look, these equations work. So what they show us is that the speed of light is constant in all inertial coordinate systems. That was one of the first steps in creating special relativity. I'm telling you all this to convince you that the kind of stuff we are doing is not just a bunch of formulas that you need to memorize, but actually this stuff makes sense and this stuff is very important, okay? So we'll continue on Tuesday and go bears.


The Minnesota Department of Natural Resources will collect groundwater samples from about 90 wells in Cass County this summer for use in the Cass County Geologic Atlas Part B. The DNR is planning to contact select owners by mail or phone to gain permission to sample their wells. Sampling involves measuring the depth to the water and collecting a water sample for laboratory analysis. Participation is voluntary and owners will receive a full report detailing the results. The DNR County Geologic Atlas Program is funded in part by the Minnesota Environment and Natural Resources Trust Fund as recommended by the Legislative Citizen Commission of Minnesota Resources.