Transcript
Use with ChatGPT / Claude Auto-scroll A
okay this is lecture 12 we've reached 12 lectures and this one is more than the others about applications of linear algebra and and I'll confess when I'm giving you examples of the null space and the row space uhI create a little Matrix you you probably see that I just invent that Matrix as I'm going um and I feel a little guilty about it because the truth is that real linear algebra uses matrices that come fromsomewhere they're not just like randomly invented by the instructor they come from applications they have a definite structure and anybody who works with them gets uh uses that structure uh I'll just report like this weekend I was ata an event with chemistry professors okay those guys are row reducing matrices and what matrices are they working with well their little matrices tell them how much of each element goes into the OR each molecule how many molecules
of each go into a reaction and what comes out and by row reduction they get a clearer picture of a complicated reaction and this weekend I'm going to the uh to a c to a sort of birthday partyat math works so math works is out route nine in natic that's where mat lab is created it's a very very successful uh software tremendously successful and the conference will be about how linear algebra is used and soI feel better today to talk about what I think is the most important model in applied math and the discrete version is a graph so can I draw a graph write down the Matrix that's associated with it andand that's a great source of matrices you'll see so a graph is just so a graph to repeat has nodes and
edges okay and I'm going to write down the graph a graph so I'm just creating a small graph here a as I mentioned last time we would be very interested in the graph of all uh websites or thegraph of all telephones I mean or the graph of all people in the world here let me take just uh maybe nodes one two three well I better put in an I'll put in that edge and maybe anedge to to a node four and another Edge to node four how's that so there's a graph with four nodes so n will be four in my n equal four nodes and the Matrix will have m equal thenumber there will be a row for every Edge so I've got one two three four five edges so that will be the number of rows and I have to to write Down The Matrix that I want to I
I want to study I need to give a direction to every Edge so I know a plus and a minus Direction so I just do that with an arrow say from 1 to two 1 to 3 2 to3 1 to 4 3 to 4 that just tells me uh if if I have current flowing on these edges then I know whether it's to count it as positive or negative ative according as whether it's with thearrow or against the arrow but I just drew those arrows arbitrarily okay because I I my example is going to come the the example I'll the words that I will use will be words like potential potential difference currentsin other words I'm thinking of an electrical network but that's just one possibility my applied math class Builds on this example it could be a hydraulic Network so we could be doing uh flow of water flow of oil
uh other examples this could be a a truck a structure uh like the a design for a bridge or a design for a Buckminster Fuller uh uh uh Dome or many other possibilities so many so but let's takepotentials and currents as as a basic example and let me create the Matrix that tells you exactly what the graph tells you so now I'll call it the incidence Matrix incidenceMatrix okay so let me write it down and you'll see uh what it's proper properties are so every row corresponds to an edge I have five rows from five edges and let me write down again what this graphlooks like okay the first Edge Edge one goes from node one to two so I'm going to put in a minus one and A+ one in this corresponds to Node 1 2 three and four the four columns the
five rows correspond the first row corresponds to Edge one Edge one leaves node one and goes into node two and that and it doesn't touch three and four Edge two Edge two goes oh I haven't numbered these edgesI just figured that was probably Edge one but I didn't say so let me take that to be Edge one let me take this to be Edge two let me take this to be Edge three this is Edgefour oh I'm discovering no wait a minute did I number that twice here's Edge four and here's Edge five okay all right so so Edge one as I said goes from node one to two Edge two goes fromtwo to three node two to three so minus one and one in the second and third columns Edge three goes from one to
three I'm I'm tempted to stop for a moment with those three edges edges one two three those form what what would we what do you call the the little the little the subgraph formed by edges 1 two andthree that's a loop and the number of loops and the position of the Loops will be crucial okay actually here's an interesting point about loops if I look at those rows corresponding to edges 1 two three and theand these guys made a
loop you want to tell me if I just looked at that much of the Matrix it would be natural for me to ask are those rows independent are the rows independent and can you tell from looking at thatif they are or are not independent you see a a relation between those three rows yes if I add that row to that row I get this row so so that's like a hint here that Loops correspond todependent linearly dependent column A linearly dependent rows okay let me complete the incidence Matrix number four Edge four is going from node one to node four and the fifth Edge is going from node three to nodefour okay there's my Matrix it came from the five edges and the four nodes and if I had a big graph I'd have a big Matrix and what questions do I ask about matrices can I can I ask
can can we here's the review now there's a matrix that comes from somewhere if if it was a big graph it would be a large Matrix but a lot of zeros right because every row only has two nonzerosso the number of it's a very sparse Matrix the number of non non Zer is exactly 2 * 5 it's 2 m every row only has two nonzeros and that's with a lot of structure and that my thatwas the point I wanted to begin with that graphs that real graphs from Real uh real matrices from from genuine problems have structure okay we can ask and because of the structure structure we can answer the the mainquestions about matrices so first question what about the null space so what am I asking if I ask you for the null space of that Matrix I'm asking you if if I'm looking at The Columns of the Matrix
Four columns and I'm asking you are those columns independent if the columns are independent then what's in the null space only the zero Vector right the null space contains tells us what combinations of the columns it tells ushow to combine columns to get zero can and is there anything in the in the null space of this Matrix other than just the zero Vector in other words are those four columns independent or dependent okay that sothat's that's that's our question let me uh I don't know if you see the answer whether there's so so I let's see I guess we could do it properly we could solve ax equals 0 so let me solveax equals 0 to find the null space okay what'sax can I I put X in here in in little letters X1 X2 X3 X4 that's it's got four columns ax now is that Matrix times x and what do I get for ax if the camera can keep
that matrix multiplication there I'll put the answer here ax equal what's the first component of ax can you take that first row Min - one 1 0 0 and multiply by the X and of course you get x2- X1 the second row I get x3 - X2 from the third row I get x3 - X1 from the fourth row I get X4 - X1 and from the fifth row so I get X4 - X3 andI want to know when is the thing zero that's that's this is my equation ax equals z notice what that Matrix a is doing what we we've created a matrix that computes the differences across every Edge the differencesin potential let me let me even begin to this interpretation I'm going to think of this Vector X which is X1 X2 X3 X4 as the potentials at the nodes so I'm introducing a word potentials at the
nodes and now if I multiply by a I get these these I get these five comp components X2 - X1Etc and what are they they're potential differences that's what a computes if I have potentials at the nodes and I multiply by a it gives me the potential differences the differences in potential across the
edges okay when are those differences zero so I'm looking for the null space of course if all the X's are zero then I get zero that that just tells me of course the zero vectors in the null spacebut there's more in the null space those columns are of a are dependent right because I can find solutions to that equation tell me tell me the tell me the null space tell me one vector in the nullspace so tell me an X it's got four components and it makes that thing zero so what's a good X to do that 11 one one constant potential if the potentials are constant then all the potential differences arezero and that X is in the null space what else is in the null space if if yeah let me ask you just always uh give me a basis for the null space a basis for the null space
will be just that that's a that's a good that's it that's a basis for the null space the null space is actually onedimensional and it's the line of all vectors through that one so there's a basis for itand here's the whole null space any multiple of 111 one it's the the whole line in four-dimensional space do you see that that's the null space so the so the dimension of the null space of a is oneand there's a basis for it and there's everything that's in it good and what what does that mean physically I mean what does that mean in the application that guy in the null space it meansthat the potentials can only be determined up to a constant potential differences are what make current flow that's what makes things
happen it's these potential differences that will make something move in the in our Network between X2 between node two and node one nothing will move if all potentials are the same if all potentials are C C C andC then nothing will move so we're we have this one parameter the this AR this arbitrary constant that raises or drops all the potentials it's like ranking football teams whatever we have a there's a there's a constant orlooking at temperatures you know there's a flow of heat from higher temperature to lower temperature if temperatures are equal there's no flow and therefore we can measure temperat we can measure temperatures by uh Celsius or or we canstart at absolute zero and that arbitrary it's the same arbitrary constant that that was there in calculus in calculus right when you took the integral the indefinite integral there was a plus c and you had to set a
starting point to know what that c was so here what often happens is we fix one of the potentials like the last one so a typical a typical uh thing would be to ground that node to set itspotential at zero and if we do that if we fix that potential so it's not unknown anymore then that column disappears and we have three columns and those three columns are independent so I'll leave the column in therebut we'll remember that grounding a node is the way to get it out and grounding a node is the way to setting a node setting a potential to zero tells us the the base for all potentials then wecan compute the others okay but what's the now I've talked enough to ask what the rank of the Matrix is what's the rank then uh the rank of the Matrix so we have a 5x4 matrix we've located its
null space onedimensional how many independent columns do we have what's the rank it's three and the first three columns or actually any three columns will be independent any three potentials are independent good variables the fourth potential is notwe need to set and typically we ground that node okay rank is three rank equals three okay let's see do I want to ask you about the column space the column space is all combinations of those columns II could say more about it and I will let me go to the null space of a transpose because the equation a transpose y equals 0 is probably the most fundamental equation of Applied Mathematics let's talk about thatthat that deserves our attention a transpose y equals z let let me put it on
here okay so a transpose y equal 0 so I'm now I'm finding the null space of a transpose oh and if I ask you its Dimension you could tell me what it is what's the dimension of the nullspace of a transpose we now know enough to answer that question what's the general formula for the dimension of the null space of a transpose a transpose let let me even write out a transpose this a transpose willbe n by m right n by m in this case it'll be 4 by 5 those columns will become rows -1 0 -1 -1 0 is now the first row the second row of the Matrix one Min -1and three zeros the third column now becomes the third row 0 1 1 0 -1 and the fourth column becomes the fourth
row okay good there's a transpose that multiplies y y1 y 2 Y3 y4 and y5
okay now you've had time to think about this question what's the dimension of the null space if if I said all those wow usually sometime during this semester I'll drop one of these erasers behind there that's a greatmoment there's no recovery there there's there's uh centuries of erase are back there
okay okay what's the dimension of the null space give me give me the general formula first in terms of R and M and N this is like crucial you the are we struggle to to decide what dimension meantand then we figured out what it equaled for an M byn Matrix of rank R and the answer was M minus r right there are m equal five components m equal five columns of a transpose and R ofthose columns are pivot columns because they'll have R pivots it has rank R and M minus r are the free ones now for a transpose so that's 5 - 3 so that's 2 and I would like to findthis null space I know it's Dimension now I want to find out a basis for it and I want to understand what this equation is so let me say what a transpose y actually represents why I'm interested in
that equation yeah I I'll I'll come I'll put it down with those old erasers and continue this here's the great picture of Applied Mathematics so let me complete that there's a matrix that I'll call C that connects potentialdifferences to currents so I'll call these These are currents on the edges y1 Y 2 Y3 y4 and y5 those are currents on theedges and this relation between current and potential difference is ohms law this here is Ohm'sLaw ohms law says that the current on an edge is some number times the potential drop that's and that number is the conductance of the edge one over the resistance this is this is the old current is isuh resist the relation of current resistance and change in potential so it's a change in potential that makes some current happen and it's ohms law that says how much current happens okay and then the final step of this
framework is the equation a a transpose y = 0 and that's what do that saying it has a famous name it's Kirk
off's current law KCl Kirk off's current law a transpose y equals z so that when I'm solving when I go back up with this Blackboard and solve a transpose y equal 0 it's it's it's this uh it's thispattern of that that I want you to see that we had rectangular matrices but and real applications but in those real applications Comes A and A transpose so our four subspaces are exactly the right things to know aboutall right let's know about that null space of a transpose wait a minute where did it go here it is okay okay null space of a transpose we know what its Dimension should be let's find out tell mea vector in it tell me now so what am I asking you I'm asking you for five currents that satisfy Kirk off's current law so we you better understand what that law says that that law a transpose y
equals 0 what does that say uh say in the first row of a transpose that says so the first row of a transpose says minus y1 - Y3 - y4 iszero where did that equation come from let me I'll redraw the graph can I redraw the graph here so that we maybe here so that we see again the the there was node one node two node three nodefour was off here that was that was our graph we had currents on those we had a current y1 going there we had a current Y what were the other what are those Edge numbers y4 here and Y3here and then a y 2 and a y5 I'm just copying what was on the other board so it's convenient to see it what is this equation telling me this first equation of Kirk's current law what does that
mean for that graph well I see y1 Y3 and y4 as the currents leaving no one so sure enough the first equation refers to node one and what does it say it says that the net flow is zerothat that equation a transpose y Kirk's current law is a balance equation a conservation law physicists be overjoyed right by this stuff it's it says that in equals out and in this case the three arrows are all goingout so it says y1 Y3 and y4 add to zero let's take the next one the second row is y1 minus Y2 and that's all that's in that row and that must have something to do with node twoand sure enough it says y1 equals y 2 current in equals current out the third one Y 2 + Y3 - y5 = 0 that's certainly be what's up at the third node Y 2 coming in Y3 coming
in y5 going out has to balance and finally y4 + y5 = 0 says that at this node y4 + y5 the total flow is zero we don't you know charge doesn't accumulate at the nodes it travels aroundokay now give me I come back now to the linear algebra question what's a vector y that solves these equations can I figure out what the null space is for this Matrix a transpose by looking at the graphI I'm happy if I don't have to do elimination I can do elimination we know how to do we know how to find the null space basis we can do elimination on this Matrix and we'll get it intoa good reduced row Echelon form and the special Solutions will pop right out but I would like to even to do it without that but let me just ask you first if I did elimination on that on that
Matrix what would the last row become what would the last row if I do elimination on that Matrix the last row of R will be all zeros right why because the rank is three we only going to havethree pivots and the fourth row will be all zeros when when we eliminate so elimination will tell us what uh what we spotted earlier what's the null space all the all the information what are the dependencies we'll we'llfind those by elimination but here in a real example we can find them by thinking okay again my question is what is a solution why how could current travel around this network without collect in any charge at thenodes tell me a y okay so a basis for the null space of a transpose how many vectors am I looking for two it's a two-dimensional space my bases should have two vectors in it give me one one
set of currents suppose let me start it let me start with y1 as one okay so one unit of one amp travels on edge one with the arrow okay then what what is Y2 it's one also right andof course what you did was solve Kirk's current law quickly in the second equation okay now we've got one amp leaving node one coming around to node three what shall we do now well what shall I take forY3 in other words I've got a choice but why not make it what you said1 so I have just sent current 1 amp around thatLoop what shall y4 and y5 be in this case we could take them to be zero this satisfies Kirk off's current law we could check it patiently that minus y1 minus Y3 gives zero we know y1 is Y2the others y4 + y5 is certainly zero any current around a loop satisfies a satisfies the current law okay now you know how to get another one take current around this Loop so now let y 3 be one
y5 be one and y4 be minus one and so so we have the first basis Vector sent current around that Loop the second basis Vector sends current around that Loop and I've and those are independent and I've gottwo solutions two vectors in the null space of a transpose two solutions to Kirk off's current law of course you would say what about sending current around the big loop what about that Vector one for y1 one forY2 nothing on Y3 one for y5 and minus one for y4 what about that is that is that in the null space of a transpose sure so why don't we now have a third Vector in the basis becauseit's not independent right it's not independent this Vector is the sum of those two if I send current around that and around that then on this Edge Y3 it's going to cancel out and I'll have allog together current
around the whole the the outside Loop that's what this one is but it's a combination of those twoyou see that I've now uh I've identified the null space of a transpose but but but more than that we've solved Kirk off's current law and understood it in terms of the network okay so that's uh that's thenull space of a transpose I guess I there's always one more space to ask you about let's see I guess I need the row space of a the column space of a
transpose so what's what's and what's its Dimension yep what's the dimension of the row space of a if I look at the original a it had five rows how many were
independent so we I'm I guess I'm asking you the rank again right and the answer is three right three independent rows when I transpose it there's three independent columns are those columns independent those three the first three columnsare they the pivot Columns of the Matrix no those three columns are not independent there's a in fact this tells me a relation between them there's a vector in the null space that says the First Column plus thesecond column equals the third column they're not independent because they come from a loop so the pivot columns the pivot Columns of this Matrix will be the first the second not the third but the fourth one columns onetwo and four are okay where are they those are the Columns of a transpose those correspond to edges so there's Edge one there's Edge two and there's Edge
four so there's a that's like that that is a smaller graph if I just look at the part of the graph that I've that I've uh thick used with thick edges it has the same four nodes it onlyhas three edges and the those edges correspond to the independent guys and in the graph there those three edges have no Loop right the independent ones are the ones that don't have a loop all the all the dependenciescame from Loops they were the things in the null space of a transpose if I take three pivot columns there are no dependencies among them and they form a graph without a loop and I just want to askyou what's the name for a graph without a loop so a graph without a loop is has got not very many edges right I've got four nodes and it only has three edges and if I put another Edge
in I would have a loop so it's this graph with no loops and it's the one where the rows of a are independent and what's a graph called that has no Loops it's called a tree so a treeis the name for a graph with no
loops and just to take one last step here using our formula for dimension using our formula for Dimension let's let's look once once um at this at this formula the dimension of the null space of a transpose isM minus r okay this is the number of Loops number of independent Loops m is the number ofedges and what isr what is r for our we have to remember way back the rank came we from looking at The Columns of our Matrix what so what's the rank let's let just remember rank was you remember there was oneone we had a one-dimensional n the rank was n minus one that's what I'm struggling to say because there were n columns coming from the N nodes so it's minus the number of nodes minus one because of thatc that one one one one vector in the null space The Columns were not independent there was one dependency so we needed minus one this is a great formula this is like the first shall I shall I write
it slightly differently the number of edges let let me put let me put things on have I got it right number of edges is M the number is M minus r okay so so I'm getting let me putthe number of nodes on the the other side so the number of nodes I'll move that to the other side minus the number of
edges plus the number of Loops is I have minus minus one is one the number of nodes minus the number of edges plus the number of Loops is one these are like Zero Dimensional guys they're the points onthe graph the edges are like onedimensional things they're they connect nodes the loops are like two-dimensional things they have like a an area and this count works for every graph and it's known as Oilers formula we see Oileragain that guy never stopped okay and can we just check so what am I saying I'm saying that linear algebra proves Oilers formula Oilers formula is this great topology fact about any graph okay I'll draw let me drawanother graph let me draw a graph with more edges and Loops let me let me put in lots of okay I just drew a graph there so what are the what are the quantities in that formula how many
nodes have I got looks like five how many edges have I got 1 2 3 4 5 6 7 how many Loops have I got one two three and Oilers right I always get one that this this formulais uh is extremely use ful in understanding the relation of these quantities the number of nodes the number of edges and the number of Loops okay I just complete this lecture by completing this picture this cycle so letme come to the to the
uh so this expresses the equations of Applied math this let me call these potential differences say e so e is ax that that's the that's the equation for this step the currents come from the potential differences Y isCE the potential the currents satisfy kof's current law those are the equations of with no Source terms those are the equ equations of electrical circuits of many those are like the most basic three equations applied math comes inthis structure the only thing I haven't got yet in the picture is an outside source to make something happen I could add a current Source here I could I could add external currents going in and out of nodesI could add batteries in the edges those are two two ways if I add batteries in the edges they they come into here let me add current sources if I add current sources those come in here so there's
a there's where current sources go because the f is like a current coming from outside so we have our edges we have our graph and then I send 1 amp into this node and out of this node andthat gives me uh a right hand side in Kirk's current law and can I to complete the lecture I'm just going to put these three equations together so I start with X my unknown I multiply by a thatgives me the potential differences that was our Matrix a that the whole thing started with I multiply by c those are the physical constants in Oh's law now I have y I multiply y by a transpose and nowI have F so there's the whole thing there's the there's the basic equation of Applied math coming from these three steps in which the last step is this balance equation there's always a balance equation to look for these
are the when I say the most basic equations of Applied Mathematics I should say in equilibrium time isn't in this problem I'm not Newton's law isn't acting here I'm I'm looking at the at the equations when everything issettled down how do the currents distribute in the network and and of course there are big codes to solve the this this is the basic problem of numerical linear algebra for systems of equations because that's how they comeand my final question what can you tell me about this Matrix a transpose CA or even a transpose a I'll just close with that question what do you know about the Matrix a transpose a it is always symmetricright okay thanks so I'll see you Wednesday for a full review of these chapters and Friday you get to tell me
thanks