[Music] [Music] welcome back to the second lecture of our course on calculus of several variables so let us look at the title of the lecture inner product and distance so this notion of inner product and distance is going to play a fundamental role as we move along so what is an inner product so inner product has a following definition which I'll just give for two-dimensional vectors first so you know that in two dimensions if I draw the draw the picture so this is the two-dimensional plane with x-axis on horizontal axis and y axis as the vertical axis so that was I have two points P whose coordinates are x1 and y1 and some other point Q whose coordinate is x2 and y2 it could be anywhere in this plane it will be here here here does it matter so I'm just drawing for my own convenience and here is the origin which is the point you know zero zero so that so the tip of this vector o P is the point P ok so this vector o P is actually represented by this set of two numbers which actually decide the direction as well as the magnitude as we will see and here is another vector OQ so I can call this as R one vector o P and call this as R two vector I hope this drawing is clear and so now once this drawing is clear once this drawing is clear please have a look at this drawing once this drawing is clear then I define the following so your R 1 vector is the opie vector and which consists of points X 1 Y when I am writing this as wrote things rose as in a horizontal way just for space otherwise people usually hide it as columns r2 vector is the oq vector which as where Q has coordinates x-two y-two and now this inner product is also called the dot product the inner product is defined as follows or 1 inner product r2 is you take the first two so I have told you that there must be a kind of way to talk about multiplication in higher dimensions in way your two real numbers you know how to multiply so if you have two coordinates you know how to add them that is what we have learned in the last class I know how to stretch them pull them and all sort of things on how to multiply them what is the meaning of multiplication there could be several meanings so of course there are but the most natural ways to look at each of the components first component of this and first component of the other one and then multiply these two numbers and then keep on adding what we get and do component wise so here I take X 1 multiplied with X 2 and I take Y 1 I multiplied with y 2 of course you shouldn't forget that r1 and r2 physicists would like or what not to be represented as X 1 into I vector plus y 1 into J vector and you know these are vector 0 1 I 1 0 and 0 1 and our 2 can also be represented as x2 into AI vector plus y 2 into J vector so this is the definition of inner product now once you know about two dimensions you can talk about three dimensions and how can I go to n dimensions that is the question so in dot product in n dimensions dot product in n dimensions so how do I have so suppose I have two vectors now one is or one vector which has coordinates x1 x2 up to xn where is RN and then I have r2 vector which has coordinates y1 y2 yn and the dot product see the dot product is sometimes written like this or one or two this is called when when it is written like this it is called the inner product but anyway we can you can call it dot product in your product whichever one pleases you or suits you you can call you can give any name scalar products some people call it scalar product so you can choose you can you can give your own name also now this is nothing but the same story will go on so it will become X 1 y 1 plus X 2 into y 2 plus xn into y n which in a more shorthand form and be written as summation I is equal to 1 to N X I Y I or just to make physicists happy here those who are in physics this can be also written in kind of Einstein summation convention that it can be written as X mu Y mu where mu is running from 1 to n so you once the indices are repeated you basically this is a sum that's all so now with the basic definitions in we will now focus all our energy in looking at vectors in three dimension because beyond three dimension it becomes largely algebra and colonization becomes slightly difficult so you have to view it through more through an algebraic angle than a pure geometric angle where you draw figures so let me now draw the diagram of a vector in three dimension and I would like to figure out what is the distance of a given point in space from the origin so here is my three dimensional space x axis y axis z axis now here is a point P so it is given by the coordinates x y and z maybe I should put the point P here so this is the point P given by the coordinates X Y Z as I should write this point B is here and this is X Y Z now the question is what is the distance of o from P so we want to find now the distance of O or P rather P from O so basically I want to find the length of the vector o P find length of o P this length of the Opie vector it is sometimes called the norm normal whoopee so length of o P sometimes denoted as a symbol now how do I find this length the clue of finding this length is Pythagoras theorem and let us see how I can apply the Pythagoras theorem to find the length the key idea is that you draw a perpendicular from the point P straight onto the plane XY and see where it meets it will meet exactly at the point whose coordinates are X Y and 0 and call this point as P - so let us first see what is the length of so this if I drop once I drop a perpendicular they this OPP - they form a right angle triangle and now if I know the length of o P - and then I know that this length is nothing but Z I can use Pythagoras theorem to find o P so what is o P - so what do you do again drop a perpendicular on x-axis from o P - to come to a point which you call Q so this point is x0 0 okay so you know that these distance PQ this distance the length of this distance is nothing but the value Y here we are writing it in a positive here in the positive or tenth it is we are writing it as Y otherwise it is mod of Y the absolute value of y here it is x oq is X so opie - square if you take this vector and take the square of the length which I can write as norm length as it is norm it is nothing but the length of OQ square of o q + PQ square so this is nothing but X square plus y square so sorry Opie - square open s square is X s square plus y square and so what is Opie square again by using Pythagoras theorem Opie square is actually Opie - square plus Z square Z square is that is the length of PP - and here we are in the non-negative ortant if it is not it is mod of mod 0 square so this is nothing but mod Z square and red square is the same thing X square plus y square plus Z square this this is called a Euclid snore more Euclidean norm this is Oh P is equal to X square plus y square plus Z square so here you have square root of this non negative square root of course because we are talking about length and length is never negative so what do I see from this expression what do I see from here what do I get from this thing I get a very interesting feature this idea of finding the length through pythagoras theorem allows me to actually connect the notion of length and inner product and let us see how it is done so if i call o p vector as our vector then our vector can be written as x of i vector plus y of j vector plus Z of K vector this is very clear to you now once this is known you know let us see what if what what is the dot product of r with r dot product is nothing but X square plus y square plus Z square which is nothing but the norm of the vector o P Square since opens nothing but R this is so what I have I have a very interesting relationship here the relationship is like this or dot or is square of the length of our this is an important relationship and once this relationship is known you know what is what is our so our vector is equal to root over our dot or this is what we have so you see we have now linked these two things what does essentially this Opie is talking about this is the length of a vector a point from the origin so whenever I am talking about the length of the vector it is a distance between the origin and the point which the vector represents so these vectors Opie vector is called the position vector of the point P because it is establishing the position of P in space you take some other vector that will be position vector of that particular take another point position vector of the particular point Q so it's kind of vectors allow you to positioning positioning the position the coordinates and by that you see that because vectors to position different coordinate to different coordinates the vectors I have to have different directions and different magnitude different lengths and as a result of which these points these triads here this this coordinates 3 3 3 coordinates length height they can also be identified with the vector so these topple of three real numbers can be identified with a vector because of this notion of position vector because here is the point P so here is a vector here is a so different length here is the point Q so the reaction has change and the length is change so if the two points this point P here and you here have different directions and different lengths from the origin so with respect to the origin these can be thought of as vectors and that is exactly what it is and so you we are not just telling that whenever we are more than we whenever we have some real numbers accumulated in chain X Y Z W we will call them vectors you call them vectors because of this geometrical fact because you can position them you can you can identify their position in space by using vectors by using geometrical vectors ok so let us now see certain important properties of the vector of the notion of a length so properties of length so property one length has to be always greater than equal to zero obvious oh what is the spending obvious ok so this is an obvious property which we all understand we cannot say something as minus two lengths second property which I admire and a very interesting property very simple but very interesting is that the length of a vector if it is equal to zero if and only if our vector actually I identified with the zero vector R is identified with the origin so how do we do that so if our vector is identified with the origin that is our vector is zero eye vector zero J vector zero K vector then what happens then what is the length square of the length so squared is equal to r dot R and that is nothing but zero because zero plus zero plus zero 0 square plus 0 square plus zero square now suppose I have so these would imply if square of something is zero that whole quantity must be zero it's very natural so suppose suppose Maude are equal to zero then it implies that mod of our square is also zero so if our armoire or square is X I vector Y is a vector and ZK vector then implies that 0 is equal to its here it means that R is identified with the coordinates this so our R since square of the length is zero this is nothing but r dot R so R dot R is X square plus y square plus Z square and this is equal to zero so what we get from here is that X square plus y square plus Z square is equal to zero so now these are non-negative numbers X square Y squared Z square so non-negative numbers adding up to zero means all of them can be has to be zero is one of them is on zero then the sum would be non zero which means that here X square equal to zero X Y square equal to 0 and Z square equal to zero which also means that X is equal to zero Y is equal to 0 and Z equal to zero and hence we can identify the vector or with the zero vector and hence this rule holds now there is another interesting formula to calculate the dot product of two vectors in three-dimensional space and that makes use of the angle between the two vectors so let me use the board now so this going forth between the back end board and the this electronic board in the electronic slate is is much better because math is always traditionally been a subject of the board and it needs to go back to bored sometimes it's much more fun to see things being worked out so here I will have a scenario of two X Y Z X vector and we will increase the length of this part Y so x-axis y-axis said axis with origin and I have origin let me write it here I'll have two vectors a and B so this is the a vector this is the B vector and this is angle theta between the two vectors they are representing two different points a P and Q you are not writing the coordinates at this moment so you observe that opq is a triangle what we are going to show we are going to show we are going to show that a vector dot B vector is equal to the norm of a vector into the norm of B vector length of B vector into the cosine of the angle between them so those who have some idea or liking for Euclid's geometry would immediately understand that some kind of cosine law has to be used so this vector PQ if you look at this vector PQ those with the basic idea of geometrical vectors would immediately know that this is present this is representing the vector P hat - a hat B - a basically so PQ is representing the vector now if you look at the triangle OPQ in triangle OPQ apply the cosine law so once i know this angle b here i can actually use the cosine of this angle and the length of these two sides to find the length of this side that is the cosine law which you know apply the cosine law so how do i do it so i have to find the length of this and i know the cosine laws are you know i am just writing on the this this square is this is equal to this square plus this square minus twice this into this cos theta so b minus a whole square is equal to a square plus d square minus 2 2 norm a B cos theta this is what you know okay now how do I go about doing this I really have to play with this this side I've done something here already this part has appeared this part has appeared so some game has to be played here so let us see how the game is played and once we try to play that game we will see we will learn some law about how to take how to handle inner products so norm B hat - a hat whole square is equal to the dot product of B minus a into B minus a so it's B minus a vector dot product into B minus a vector now how do I actually do this inner product please do this dot product just think as if you are really multiplying numbers so you can actually do this you can do P hat - a hat dot product of B hat minus of B hat minus of B hat minus of a hat into a hat so you see you're playing just as if you are multiplying numbers again do the same game here so remember the thumb rule multiply take the dot product as if you are really taking dot products of numbers ordinary numbers but instead of the multiplication you put the dot product it is that easy to remember so of course I can prove them and of course I can do things prove that what I am doing is really true the dot product of these two is exactly this but I am just telling the thumb rule sometimes as john von neumann said you don't understand things in mathematics you just get used to them so sometimes you go by the thumb rule and later on you can check for yourself with simple examples that is indeed working you can actually prove it in detail so let's just do this so I'll have B dot B minus a dot B here I have minus B dot a minus minus plus a dot a so what do I get I get this by definition it is square of the length here I have minus 2 a dot B because a dot B and B dot a are the same thing because ultimately these are nothing but one relation of numbers and summed up and because standard multiplication of real numbers is commuted u X into y is same as Y into X and hence you have this one and we use Club them together plus norm so this is what so this side is this so taking in what I have here I will plug it into here so what do I get I get I hope I hope this is not blocking if this is blocking I just go to this side so I get now norm B square minus two a dot B plus norm a square is equal to norm a square just this is equal to this so I am writing on the right hand side so this is nothing but this so the right-hand side is equal to that we had square minus two the Euclidean geometry is at action here now what do you do here is you know that I can cancel this with this this with this the negative signs can be canceled and so two two can be cancelled and what you have is at the end this implies that a dot B is nothing but wallah as a French would say voila means that's it done so we have done this so once you know that a dot B is equal to mod norm a into norm B into cosine of the angle between them then you can definitely write if if norm a is not equal to zero means a is not equal to 0 and norm B is not equal to zero then you can obviously find theta theta as inverse cos cos inverse of a dot B by okay suppose we have this scene suppose we have two vectors and none of them are zero and suppose a dot B zero so if now in this case if if this holds that is this is not 0 this is not 0 and if a dot B is 0 then from this above inequality then theta equal to cos of 0 which is PI by 2 90 degrees so if you think of course inverse as a function cosine inverse is some cos inverse is really not a function it is a multi-function because for one particular value it can have many theatres corresponding to it but if you just take the acute angle values then it becomes a function the principal values then cos 0 is PI by 2 which means if a dot B is 0 then the vectors a and B are perpendicular in fact if a and B on the opposite side if a and B are perpendicular then theta equal to PI by 2 and it immediately implies that a dot B is equal to 0 so you see this the fact that a dot B equal to 0 gives me makes the two vectors perpendicular the theta becomes 90 degree so if one is here the other is here this is possible because of this formula this disk um this alternative formulation of a dot B so because of that you could now do such a thing try to figure out some make some vectors yourself play around a bit and see because we are also constrained by time and so what we are going to do we are going to talk about an interesting thing called Cauchy Schwarz inequality so what is Cauchy Schwarz inequality actually Russians won't like just to call it Cauchy Schwarz inequality they would call it Cauchy Schwarz neo Kowalski's inequality so there are a lot of credits giving in mathematics that okay Russian said okay we had done it sometimes without knowing what you guys were doing in the West and they would go Western oh no no no cause she's a great man his name has to be there but it seems several people already also knew it in fact as I know that Lagrange if I'm not wrong Lagrangian you about this idea so but some stories remain and some stories don't and so we call it the Cauchy Schwarz inequality inequality is actually are the hallmarks of mathematics what does it say what does cauchy-schwarz inequality says cauchy-schwarz inequality says that if you take the dot product of two vectors this is a real number it could be positive negative anything and you take its modulus value absolute value then this absolute value is less than the product of the lengths of these vectors that is what the Cauchy Schwarz inequality says so let us prove this quash Schwarz inequality and you will see that Cauchy Schwarz inequality is nothing but a consequence of this formula why let me tell you so you see proof that me pose like a mathematician though I'm truly not one but I am posing as if I am and then I am writing this word proof and trying to prove that this happen so that the Cauchy Schwarz inequality so I know this formula which we have deduced there on the blackboard here it is here is a formula so what I do I take the modulus of both sides and you know that if I take the modulus of a real number of a positive non-negative number so they're non-negative numbers will just come out they wanna it will be mean the modulus is the same modulus of two is two what modulus a minus two is two also so if it is not a negative number the modulus are then changed so it's just so if I take the modulus it is this into cosine theta modulus of cosine theta but you know the cosine value lies between plus one and minus one so mod absolute value of cosine theta has to be always less than one so it simply means a dot B is less than equal to how beautiful the proof is very simple as a consequence of that idea that that derivation this is the beauty of mathematics I am think I think this is a beautiful thing so here is my proof of cauchy-schwarz inequality okay now I come to the third property of length third property of length is another way of telling a very standard geometrical fact which you know that given a triangle in plane given a triangle in plane the sum of two sides of a triangle is greater than the third so if you have a triangle in space basically you can think of the triangle on the part of a plane it is lying in a plane essentially though it is a in a three-dimensional space we now we are talking about but still for example here this triangle OPQ you can think of honor that it is eyeing the plane that is passing through these three points so again that idea is built into what is called a triangle inequality so it does not matter whether you are in two dimension three dimensional in dimension this is true it says that this see we have two vectors x and y then X plus y is less than mod X plus mod y you can write a B also we had draw even writing a B so it doesn't matter whatever whichever so what I do the same thing I come if you want I can write this as a dot B in fact that's a better thing because it will be easier for you to follow because the Cauchy Schwarz inequality is written in terms of a and B alright though it doesn't matter these are dummy dummy things a or X is same when you know the meaning but I just want don't want to confuse you on the notation so let me just do the job here so now I consider a plus B whole square the same game this is the name of the game squaring up and then writing this as a plus B dot a plus B if you do it work it out then it will become a square plus B square plus 2 a dot B okay and once you know this now here so I can apply the Cauchy Schwarz inequality and write this is less than equal to square plus mod of its norm of B square plus so this part is less than two times norm of a into norm of P this is the Cauchy Schwarz inequality this is where I have applied the Cauchy Schwarz inequality this is something you have to keep in mind that this is where I have applied the Cauchy Schwarz inequality and hence once I have done it it is very simple so I have got a plus B whole square never write this this is nothing but mod a plus mod B whole square so now I cancel I know there are two non negative quantities whose square of 1 is less than the square of others this simply means and again voila we have done it and this is a very key inequality I think I am stretching this talk a bit but this is a very very important part this is the first you are you're being equipped with tools I hope this shock is been clear I hope this is so much clearer chalk I hope you'll be able to see this I don't know maybe I should go near at the board and I guess at least it can be seen maybe I would write to make it more brighter I do not know whether I should do it I hope you you would understand it in case you don't I just repeat Heather proof here so that you the main idea that what you do is to take a plus B whole square and this would give you nothing but a plus B dot a plus B and that leads to norm a square plus norm B square twice a dot B applying the formulas of computing inner products and now applying Cauchy Schwarz inequality you will get this and then that simply shows that a a plus B some reworking the proof here in case the thing that you do not see the whole thing clearly on the board compared to that trading that was much more deep cleaner so and that's it once you know that then this is nothing but norm a plus norm B whole square so this implies because they are two numbers which are triangle inequality is done so with this I end today's lecture there is something called projection formula the projection formula would be given in an assignment and I am trying to have some notes written down for the first few chapters which are very basic and this I'll hand over to the nptel's M staff here so that they can actually scan them up and put them on the course website so you have some basic idea now how to do things and that's very important to have a basic idea so I hope you understood it there if you have not will you please feel free to ask questions that can you can even ask for fundamental questions which I might have forgotten to tell you or I might have skipped for some reason or it might be I myself do not know so please feel free to ask questions because at then mathematics cannot be learned without discussions thank you [Music] [Music] [Music]