 So, we have kind of wrapped up the story with this Jordan canonical form. So, we started with our motivation being the solution of differential equations. And we saw that if you have a matrix which you can then diagonalize through a similarity transformation that is through some change of basis, then it is easier to solve the differential equation. And finally, all of this culminated in the fact that even if you cannot diagonalize it, you can still get it down to a very nice looking form, an upper triangular form and a very specific upper triangular form which is the Jordan canonical form where at most one super diagonal that is one term above the diagonal is nonzero and exactly equal to unity at most and everything else is still 0. So, it is still a very thin sort of a matrix around the diagonal and that is the best you can do right. There is also another form which we shall not have the time to delve into which is the rational canonical form right. So, I would urge you to do this as part of some self study it is not very difficult. Once you have wrapped your head around the notions the basic notions of how we went about this Jordan canonical form, the idea of minimal polynomials and the techniques we have employed. You can I would venture to say read this up on your own and understand a good part of it, but strictly speaking this is not going to be part of our syllabus. Just to complete the story I mentioned that just like you have the Jordan canonical form. Similarly, the rational canonical form is another very important canonical form into which we often want to cast our matrices into right. So, before we proceed because now we will only talk about few applications one or two in whatever times remaining in this course. If you have any queries about the Jordan canonical form what we discussed in the previous module please feel free to ask. If not I will just very quickly summarize. So, you have a matrix which we saw could be brought down to a block diagonal form such as this and thereafter we focused our attention on these block diagonal this individual block diagonals and we saw that these can be cast into some sort of a nice looking form where you have these Jordan blocks yeah. So, this generates a chain. So, this has an eigenvalue lambda i each of these a i i's has an eigenvalue lambda i only repeated d i times where d i is the geometric algebraic multiplicity of lambda i and this overall matrix that is a right. So, size is d i cross d i for each of these. So, this lambda i is the only eigenvalue of this fellow. Therefore, lambda i minus a i i turned out to be a nilpotent matrix and because we have this beautiful result that we proved that a nilpotent matrix can be cast into a form through some basis and we also give you a choice of the basis. Therefore, you can transform this object to have lambda i's at the diagonals the size of this largest such block it can be multiple in number by the way. So, if you have attempted one of the questions in the quiz yesterday you might have figured that out. So, it can have multiple blocks of the same size which is equal to the maximum size or it can have exactly one nonetheless the size of the largest block is exactly going to be equal to what the degree to which lambda i minus sorry lambda minus x or rather x minus lambda has to be raised in the minimal polynomial right. So, the degree of this fellow that is this f in the minimal polynomial this f is going to dictate the size of this it is f cross f the number of such Jordan blocks yeah is exactly going to be equal to the geometric multiplicity all right. So, how many blocks are there this is one this is two this is three like this. So, the number of blocks is equal to the geometric multiplicity and of course, the overall size this is di cross di. So, size of matrix a i i is equal to the algebraic multiplicity of lambda i right. So, you see already if you have geometric multiplicity equal to algebraic multiplicity what can you conclude well of course, the obvious right that it is going to be a diagonal block because geometric multiplicity dictates the number of blocks and if that is equal to the algebraic multiplicity then you have exactly di blocks in a di cross di matrix. So, each of them is just a diagonal entry right that is just another way of stating that the Jordan form a special case of the Jordan form is the diagonal form now right. The f the f is going to be the size of the largest Jordan block. So, that is what we said that if in the minimal polynomial every factor x minus lambda i has to be raised to a power 1 that is another equivalent condition for diagonalizability because then the size of the largest block is 1 right. So, then it has to be diagonalizable right. So, that is another equivalent condition for diagonalizability of a matrix in terms of the minimal polynomial. So, it is good to know because you never know when you have to prove a result which technique or which equivalent relation is going to be more handy. Of course, if you know how this works you will be able to prove one through the other you can also at this point you can go about proving the Cayley Hamilton theorem as well. So, when you want to prove the Cayley Hamilton theorem for a matrix just assume two things first not assume it is true we have shown that first thing is that the characteristic polynomial or the characteristic equation yeah it does not change with a change of basis. So, therefore, given a matrix you might as well transform it to a Jordan canonical form and then look at the corresponding characteristic equation the roots will be the same. Now, if you apply the Jordan canonical form as the argument x in the characteristic polynomial and replace suitably like with i's identities now it is an equation in an operator yeah then you will see that if you raise it to the power d i and the largest block is of size f i f i is strictly less than or equal to d i which is just another way of saying that the minimal polynomial divides the characteristic polynomial something that we used earlier, but now you can explicitly see how this works. So, each of those terms will go to 0 individually yeah because this is just got once here it will vanish away before you raise it to the power sufficiently large I mean at most if you raise it to the power d i it is guaranteed to vanish away yeah. So, that is exactly the argument behind this right. So, that is why this is also another way of proving the Cayley Hamilton theorem and none of this have we used any ideas from a determinants as you might notice right. We have from time to time gone on to use determinants to sort of compute the characteristic polynomial but that is more or less it because the determinants if you want to really define them there are a bunch of properties that it satisfies and that is how it comes in a rather non-intuitive way is what I feel which is why I would not bother with you know explicit definition of determinants and going along that route. So, with this we have come to sort of a culmination of the theoretical part or whatever tools and techniques we wanted to wanted to teach or pass on to you in this course. So, we will not start looking at few applications yes. Yes, a i i is for given lambda i this is sitting somewhere here. So, just this fellow becomes 0. Yes, this is a i i yeah this is just a i i this. So, I am just zooming in on this through a magnifying glass I am looking at this one of these objects is of size f which which is how many times it appears in the minimal polynomial overall minimal polynomial. So, the minimal polynomial of a i i is just this, but this will be a factor of the overall minimal polynomial of a that is what we have seen right. The overall minimal polynomial is a it is constituted by obtaining individual minimal polynomials of these blocks that is also something we have proved. So, you can just go back and trace your way back to all the way to see that this fits in nicely with the overall picture. Any square matrix any operator on a vector space it has to have a canonical representation right ok. So, today we will start looking at some objects which did not just appear out of some abstract ideas or thoughts, but from some problem some 400 years back maybe 400 or a little more than that. So, there was this bridge in it or a number of bridges over a river in a city called Konigsberg. Anyone has heard of this Konigsberg the name of the city. So, it looked something like this I am not a not an artist. So, I will not try to be very good at this drawing here. So, there was a river here and there were a couple of deltas like so ok. So, these are land masses in the middle of the river and there were a number of bridges I am told that in the modern day out of there are 7 bridges in all. So, this is a this is a city of Konigsberg there were 7 bridges out of which only 2 survive in the current day. I think it is currently in it was in Germany at that time it is currently in Russia yeah it is Kaliningrad is probably the current name of the place. So, the bridges were something like this I hope I have drawn 7 right yeah my arithmetic is correct. So, now interesting mathematical question arose. So, how many land masses are there 1, 2, 3, 4 right. So, these are the land masses so on. So, the question that intrigued people for a while was which is until the solution was proposed by a brilliant man right. So, the question was can we start from any one of these land masses traverse through all these bridges yeah and come back to the same point is it possible to do this all right and in order to solve this problem people thought and thought about several you know probably in combinatorial terms and in several other ways that they could think of, but no one could give a satisfactory answer as to why I mean people for after a while I am sure they felt it was impossible if not anything else they could just walk by and try different combinations and they probably realize the futility of it, but mathematicians as you might have already reasoned throughout this course are not happy with just carrying out some experiments multiple times and simulating stuff and believing it to be true just because someone isn't able to do it they want some concrete evidence in support of or against some proposition right. So, how do you explain to someone that it is indeed an impossible task to undertake the fact that you can never start out from take any land mass here start out from that land mass and then go about your business of traversing through a bridge yeah and then when you are in this land mass you again go through another bridge and then from that you have to take another bridge and so on and you have to traverse every bridge right. So, why is it impossible? So, you have any ideas why it could be impossible yes yes well. So, you can go about all the bridges, but you have to be back at the same point is it possible? So, can you can you do solve it if it is not once can you solve can you sort of traverse multiple times over the bridges and come back to the same point sorry keep walking and then keep walking multiple times yeah sure yes. So, it only makes sense when you have there restriction of only being able to traverse once across a bridge yeah why not why is it so definite okay graph theory, but that is the problem you see at that time graph theory did not exist. So, it is one of a problem such as this that actually prompted people to look for an abstraction. So, not all abstractions are ugly and monstrous beasts that are there to trick you during exams you know abstractions help with better visualizations. So, in order to solve this problem you can actually look up Euler's paper although you will not understand the I mean sorry you will not understand the German that is written over there, but the point is that there is an abstract way of solving this. So, you name each of these land masses A, B, C and D. So, there are four land masses essentially that are separated by water bodies all right. So, let us say I represent the land mass A with just this one circle here and the land mass B with another circle here and the land mass C with another circle here and the land mass D with another circle here and let us say I will represent the bridges by drawing lines right. So, what can you say about between A and B? There are two bridges right right between B and C again two bridges between B and D this one bridge again between D and C this one bridge and between D and A this another bridge. It turns out this is actually a representation of this structure through a graph, but at the heart of it this graph is not what this picture depicts what do I mean by that? If I consider myself to be a Pablo Picasso of sorts I can sort of take this edge that is also this graph it is an abstract object at the end of the day this graph is nothing but these objects what are these objects. So, I define a graph in the following manner it is V which is a set of vertices or nodes that are these A, B, C and D and E which is a set of edges what are these set of edges can you guess what they are? How do you capture an edge? How do you describe an edge to vertices? So, it is basically if I were to put it down in mathematical terms it is contained inside a Cartesian product of V with itself. Of course, we can get rid of the ordering if this is symmetric I mean you can traverse this bridge any way you like. So, having a bridge between A and B is the same as having a bridge between B and A. So, this is an ordered pair of course every element in the edge set is an ordered pair, but in case that it is a symmetric relationship the ordering does not matter. So, you can kind of with an abuse of notation you can sort of get rid of this ordering and say that A, B is the same as B, A. But nonetheless an edge has a representation in terms of this. So, what is the maximum number of elements that you can have in this? Well clearly here you are having repetitions here. So, such graphs are not actually simple graphs they are called multi graphs. In general most often what you will encounter are simple graphs that is to say that between a pair of nodes or vertices if you have one edge that is it you cannot have multiple edges they are not identified as different that is still going to be identified as the same right. It is either there is an edge between them or there is no edge between them whether you have 20 edges or 20 billion edges between two nodes we do not care that is how a simple graph is defined. Now, this is not a simple graph well this is an abomination. So, let me just get back to the more conventional style yeah. So, this is a multi graph or a non-simple graph where multiple edges are allowed between the same pair of vertices sorry you do not need to write now here it is actually a little more complicated because every object can have a duplicate as well. So, you have to repeat it you have to repeat it yeah you have to repeat it you have to repeat the object and you have to specify in the structure construction of the set itself that when you are repeating it it should count towards its cardinality right normally if you say the set of fruits you would say oh you have apples you have oranges. So, how many kinds of fruits do you have that could be the cardinality of the set, but if you are specifically saying how many oranges do you have it means you are identifying every oranges different. So, with that kind of an understanding you have to say that well even though these are both oranges but when you are looking for sets of oranges then they are two in number right. So, the cardinality two they will they will add to the little contribute to the cardinality of the set if the even if there are repetitions. So, that is what happens in a multi graph, but we digress I mean. So, how is this construction going to help us in a more formal way to see that this problem is not solvable. So, here is the reasoning first thing is the reasoning for this problem. So, if you start from any point you have to exit through a bridge right. The moment you enter any of these landmasses you have to also exit through another bridge not the same bridge right which means what exactly unless you are at the first land mass or the last land mass you have to have an even number of bridges that have one of their ends on that particular land mass is it not. Every land mass here must have at least an even number of bridges connected to it otherwise you cannot go about this business without repetition is it not. So, in a language of graphs if I now translate it here what we are looking for is basically something called a degree. So, I am going to go about this very loosely because again graph theory or algebraic graph theory is not the primary goal of this course, but if you can absorb a bit of it it will probably be interesting to you. So, I am going about it informally these have all formal definitions ok. So, the degree of a vertex first thing I have defined is a graph set of vertices set of edges now comes the degree. So, what is the degree of a vertex the degree of a vertex is the number of edges that are incident on it again I have used a lot of terms incident on it pictorially speaking although again I repeat you should not think of graphs as mere pictorial objects, but pictorially speaking whenever there is an edge that is connecting a particular vertex to some other vertex then that edge is said to be incident on those two vertices which it connects alright. So, the degree of a vertex in a graph is exactly the number of edges that are incident on that particular vertex not necessarily we will assign something called an orientation later when we look at these objects through matrices we will get there shortly. For now let us not think about that we will we will describe that when it comes to that actually we will not deal with multigraphs I am just motivating this as a starting point for graph theory we will not deal with multigraphs we will deal with simple graphs later on. The point is that by whatever we have seen so far according to whatever we have seen so far what must the degree of every vertex be every vertex should have an even degree because the moment you are entering a land mass you have to leave it through some other bridge. So, the total number of bridges every time you enter you are allowed to enter the land mass multiple times, but you are not allowed to traverse the any bridge multiple times. So, you can come into the land mass as many times as you wish of course eventually you will run out of bridges, but if you have already run out of bridges when you are in the land mass that can only happen if you have an odd number of bridges right. Because every time if there is an even number every time you enter you will always find some way to escape a unique way to escape yeah. So, if you look at this graph here what can you say about the degrees of the vertices all of them have odd. In fact, if I did not ask you to come back to the same point, but visit every bridge there might still have been a solution why because not with this one of course then you can relax the condition that every vertex has to have an even degree. You can say that the starting vertex and the terminal vertex might afford to have an odd degree because you start from the starting vertex once and you have to come back necessarily as many times as you leave. So, the starting vertex can afford an odd degree the terminal vertex also can afford an odd degree, but when you fold back the starting vertex and the terminal vertex to be the same then it means that every vertex has to have an even degree and this is quite the opposite of that every vertex has an odd degree in fact right. So, this is how you establish that this Konigsberg bridge problem cannot be solved you cannot find a path that allows you to traverse every bridge once yeah and come back to your starting position right. In this case can could you have solved this problem if you for instance did not have to come back to the same point still no solution right because all of them have odd degrees you can at most afford any two of them having odd degrees in which case you start from one of them end at the other and traverse the others in between perhaps there is a path, but in this case there is absolutely no chance. So, even if I did not ask you to start from here and come back to it the problem would still not be solvable right. Now, in view of this people then wondered like is there a better way of capturing these objects. So, many years passed by and people made progress yes, not at not the end point and the starting point are not the same, not sure not, but you need not. You mean every vertex you have to visit only once that is a very difficult problem the starting for the vertex will never come back no. So, are you saying that you start from this A and you can come back to A, but you cannot terminate at A or are you saying that you cannot even come back to A. No, we can come back to A. Okay, you can come back to A, but you should not terminate at A. In that case is it not. The edges of the starting and the terminal vertices have to be odd then. Mandatory they have. Yeah, but again the total number of some of the degrees is still going to be even some of the degrees of all the vertices is still even because the terminal vertex and the starting vertex have odd degrees. The rest of them are even degrees. So, some of two odd numbers is even and some of the other even numbers is also even. So, that is the condition. So, the general condition I am glad you asked. So, the general condition is that the sum of the degrees of every vertex in this case also that is true because there happened to be like four of these fellers. So, four multiplied with any number. In this case they are all three, right? Oh, this is five. Okay, but still I think it's still even, right? 30009 plus 514. But still that doesn't solve the problem. Yeah, so you cannot have more than two. So, that's a complicated question because if I allow for things like self-loops because when you are allowing multigraphs you have to also account for the possibility of self-loops and that's when things start getting more interesting and also if you have directed graphs for example. So far we haven't considered any direction on these. If it's one way like a diode, diode allows current to flow in only one direction. So, if you have and it's not like some pigment of my imagination, I wish to actually cover a bit of something called a consensus like protocol by the end of today's lecture. But even before that, if you have a number of mobile robots, for example, which want to communicate with each other and decide where to go, it's not necessary that if robot one is listening to robot two, that robot two has to also listen to robot one. So, that sort of an information exchange is not bidirectional. So, there is an inherent asymmetry there. So, such interactions are also captured by graphs. In that case, if you have an edge connecting the nodes one and two, which are robots one and two, that will have to have a direction to specify who is listening to whom. If both were listening to each other, then you would just have an undirected edge and it wouldn't matter not. But when you are specifying that only one side is listening to the other, the other party isn't. Kind of yeah, it's something called a leader follower kind of thing. So, there's a leader that's sort of a hierarchy, you know, listen to someone at the top and the other person doesn't listen to you. That shouldn't happen in a democracy, but unfortunately, okay, that's a different story. Let's not get there. Okay, so now that people have pictures of these graphs and all, we want to understand if there's a better way to capture these relations without having to draw these pictures. Because pictures, there's only so much you can do with pictures, right? Let's say now you have 10 nodes, you might still be adventurous and draw it on the blackboard. Let's say there are 100 nodes, right? And you want to feed it to a computer. Do you want to draw a graphic image on a computer and feed it and sort of ask it to solve it for you? No, right? You want to feed some numbers, you want to capture these relations through arrays of numbers, if possible, and be able to discern or recover as much information about this graph or this networked system as you possibly can. So that is what spawned this area called algebraic graph theory. And as you shall see that it has a lot of applications of linear algebra, right? So again, this is going to be very informal sort of an approach, but I hope you'll be able to take something from this that you'll probably find useful at some time in your career later on. So algebraic graph theory. In order to capture these graphs through numbers, if possible through matrices as we shall sort of shortly see, this subject came into being, right? So I will again not motivate this through a bunch of definitions as I usually do for other topics. Rather, I'll draw figures and accompanying them, I'll write out some matrices and you'll be able to visualize how things work out, okay? So with every graph that you can draw, say for example, a graph like this, suppose this is a graph, it could mean anything. It could mean an electrical circuit, for instance, right? Where you know you do mesh analysis and node analysis, Kirchhoff's current law, Kirchhoff's voltage law, right? So this is basically an electrical circuit. If I tell you this is an electrical circuit with three loops and these are the nodes, you can sort of ground this node and I tell you what the impedances of these objects are, resistances, capacitors, inductors, and so on. You should be able to solve for the currents through any of these branches or any of these currents in any of these loops. That's an abstraction of an electrical circuit as well, right? So anyway, let's not be very specific here, but when you want to capture this graph, if you want to transmit this, do you think you're going to copy this picture and pass it to your friend? Okay, with four nodes, you can do this. When it gets bigger and bigger, you want to transmit this image to some friend sitting in some other part of the world through a chat. The friend is not going to wait for you to draw this on a piece of paper, you know, hundreds of nodes and edges and then you send it and the friend then because of what's this handwriting, they want some very crisp understanding of what graph you're talking about. How do you capture that? So one of the first objects that comes to mind is again starting with the degree. So let us call a matrix D as a degree matrix, okay? And what is this degree matrix? It's going to have a size equal to, what do you mean by this? This is the cardinality of the vertex set. So if there are four vertices here, this is going to be four cross four. So this degree matrix is going to be a diagonal matrix. Again, I'm not defining this, but I hope you get the idea of how this works. So it's a diagonal matrix. What's the degree of this? So let's immediately have to give numbers to this graph, to this vertices here. This is two, this is three and this is four. So the degree of one is three, the degree of two is three, the degree of three is three and the degree of four is also three. So it just so happens that in this case, it's just this diagonal matrix. So that's the degree matrix. Mind you, it need not be like this, like some multiple of identity. If I remove one of these edges here, for example, if I remove this edge, then the degree of one and degree of three would reduce to two each. So these numbers would have become two and two, right? So this is a degree matrix, right? The next important object is A, sorry? Which one? Sorry? Yeah. Yes. We will see. We will see. There is an interesting interplay. There's a reason why we are putting them in a diagonal and not as a vector. You're right. We could have just transmitted the same information through just four numbers. Why cook up four cross four? There is a reason. So then there's this next important object that is the adjacency matrix. So how is this adjacency matrix going to look like? This is also going to have the same size, all right? The same size. And actually we want D and A to be conformal for a reason. Because we'll see that writing them up as a difference leads to another important matrix for a graph, which is called the graph Laplacian matrix. So what is this adjacency matrix? Well, it's got to have zeros in the diagonals unless there are self-loops. So since we are dealing with simple graphs with no self-loops, the diagonal entries are going to be zero. What about the off diagonal entries? So if I denote the ijth entry of this adjacency as aij, aij is going to be either one or zero, depending on whether there is an edge connecting the ith vertex to the jth vertex or not. If there is an edge connecting the ith and the jth vertices, then aij is going to be one. If there is no edge connecting the ith to the jth vertex, then aij is going to be zero. That is how this adjacency is defined. And aii is going to be zero identically for a simple graph. So what about the 1, 2? Well, there's nothing really to see here, right? This one connects to this, this one connects to this, and this one connects to this. So it's going to be basically once everywhere. Is it not? I mean, this is what we call essentially a, you know anyone what this is called? It's a complete graph because it has all possible edges that you can see in the graph, right? So this is actually v cross v, every object is sitting inside it, yeah? So this is 1, 1, 1, 1, 1, 1, all right? So this is the adjacency matrix. Once we are done with this adjacency matrix, what we then define is a very important object called as the graph Laplacian. Already, if you feed the degree and the adjacency matrix to any friend of yours, just these two matrices, they already know what the graph is. You don't have to draw this figure, you see, right? And based on this degree and adjacency, you now have, so, d minus a, that is why we wanted to have that degree matrix in a diagonal form because it aids us in defining the so-called graph Laplacian. Why is this graph Laplacian important? Why is this important? You've already seen Laplace's equation many lectures back, maybe in the first lecture we discussed, first or second lecture when we took this area and split it up into measures, remember that Laplace's equation that nabla squared, you know, field theory, we discussed it. Just think about this. What is this Laplacian going to look like in this case? Is it not going to look like 3 minus 1, minus 1, minus 1, minus 1, 3, minus 1, minus 1, minus 1, minus 1, 3, minus 1, minus 1, minus 1, minus 3, right? This is what the graph Laplacian is going to look like. I wonder what is the significance of this graph Laplacian? If every vertex has a number associated with it, suppose this one has a number 7.1, this one has a number 10.1, this one has a number 8, this one has a number 6 and you stack it up as a vector, so that vector will look like 7.168 and 10.1. Are you following what I'm saying? So, suppose every one of these has a potential or a number, right? What do you think is going to happen if this is what I call as x, right? And I look at the object Lx. What is this going to be equal to? What is this equal to? The first entry is going to be 3 times x1, minus x2, minus x3, minus x4. Second entry is going to be minus x1, plus 3x2, minus x3, minus x4. If you distribute them, is it not like writing x1, minus x2, plus x1, minus x3, plus x1, minus x4, right? So, essentially this is going to be like 7.1 minus 6, plus 7.1 minus 8, plus 7.1 minus 10.1 and you are summing up the differences, the potential differences across all these nodes and you are writing them as the sums of those potential differences. So, these are my potentials at these different vertices. Now, this is the summation of the phi 1j's. This second entry is going to be the summation of phi 2j's. The third entry is going to be the summation of phi 3j's, where phi 1j is phi 1 minus phi j. You follow? And the fourth one is going to be summation phi 4j. So, in one shot, given node potentials, this Laplacian immediately converts it to what? It converts it to potentials across what are these numbers? These are absolute potentials with respect to some common frame of reference which is the earth. You follow? Some energy with respect to some base datum. Now, what I have here is the relation of that in terms of relative potentials. Phi 1j is phi 1 minus phi j that is 7.1 minus 6. So, these are relative potentials that are sitting over here, right? So, I have converted the variables which are the absolute values of these to sums of relative variables, right? The point is, can you solve for this now? That is, can you solve for these relative variables in terms of the absolutes? In order to understand that, we have to look at the property of this Laplacian, okay? So, we will do that in the next module, but I at least hope that you see why this Laplacian is such an important matrix. So, not so that we wanted to cook up the Laplacian using a artificially enlarged or bloated degree matrix when as your friend pointed out that the degree matrix could have just been depicted as a vector only instead of a diagonal matrix like this, right? Because this aided us in constructing the Laplacian which now gives us the relation of this load potential or the vertex potential to relative potentials or what we shall call as the edge potentials. Point is, if given the load potentials, can you solve for these edge potentials uniquely? Spoiler alert, in the next module we will see, you cannot do that unless you earth one of these nodes which should be no surprise really. From an electrical circuit perspective, if every point is a floating point and you only know Yeah, you have to at least fix up one of them as the base datum, right? So, we shall see that in the next module.