Dear linear algebra students, This is what matrices (and matrix manipulation) really look like

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this video was sponsored by brilliant every matrix paint some kind of picture while matrix manipulation or arithmetic tells us story and that's not just the one of how boring this can be in school at least for me the beginning of matrices was one of my least favorite parts of math so I won this to at least show you what this all looks like with cool 3d software as well as an application I never learned in school so here we go when you're given a matrix it can often be useful to think of it as a set of vectors I'll be working mostly with 3x3 matrices and you can think of these both as a set of three column vectors or three row vectors we'll look into each where the column vectors come in immediately is when we use this matrix to represent a system of equations here I'm sure most you know this gives you three linear equations for example the first is 1x plus 2y plus 4z equals some b1 and the rest of the matrix is all the other coefficients but another way to visualize this same thing is to write it as a sum or linear combination of the column vectors where XY and z are now just scale factors here the first equation would be 1 times X plus 2 times y plus 4z equals b1 the exact same thing so given some system to solve you can visually think of this two ways for the first option you say if I were to graph each of these or in this case three planes where do they all intersect because that intersection is our solution XYZ and in this case it'd be 1 comma 1 comma 1 now I'm going to switch to geogebra real quick because it's better for vectors but the second option says to instead take the columns of our matrix and consider them as vectors then find which scale factors are needed such that those vectors add tip-to-tail to get some other vector b1 b2 b3 so instead of an intersection we're looking for scale factors and in this case all of them would be 1 just add the vectors together as they are thus 1 comma 1 comma 1 is our solution just like we saw before so we have two totally different visualizations for the exact same question I like using the intersection one when I have to solve for x y&z but when I'm asked what are the possible outputs here for B then I like thinking of vectors now I'm going to change the matrix just a bit and also make the B vector all zeros this then changes the other equations and now let's go back to the 3d plot here we have the first and third equation and unless they're parallel two different planes will always intersect in a line now if the remaining plane happens to intersect that same line as well which it does then we have an entire set of solutions XY and Z such that all these equations are zero the name we give to those solutions is the null space it's just the intersection of all your equations when they equal zero often that solution is just zero comma zero comma zero but sometimes there's more here the null space is one dimensional just a line in 3d space now on your homework you want it graph three planes most likely you do something like Gaussian elimination where you take two equations multiply one or both by a constant and cancel out one of the variables but instead of just multiplying by negative two immediately I'm gonna sweep the constant from zero to negative two and watch what happens to the resultant function which currently is just that second graph in pink so look you can see when you add any two of these linear equations regardless of the scale factor in front their intersection or the null space in this case is preserved the new plane just rotates about that intersection so we may have a totally different plane here but we haven't lost the solutions so we can just replace either equation one or two and still go through the analysis but now the arithmetic is a little easier because one of the coefficients is 0 if you do the same thing with equations 1 & 3 then one plane actually becomes another this happens because if we replace equation three these last two planes are the exact same now that means if we were to continue the elimination we get a row of all zeros and four square matrices at least a single row of zeros means we have a single free variable this tells us we have infinitely many solutions to the system and we say Z can be anything it's free but x and y depend on that value so we don't just have any solution those dependent variables correspond to something called pivots and since there's only one free variable then our null space will be one dimensional and by the way if we did have three planes that only intersect at a single point then the elimination eventually leads to a plane of one variable like in this case Z equals one and from there we would back solve to get Y and X but anyways now I want to complete the picture by putting back the original equations and graph now what if I told you that the dot product of the vector 1 comma 2 comma 4 and some random vector X Y Z is 0 well that means these two vectors are perpendicular but look the actual dot product or 1 X plus 2y plus 4z equals 0 is our first equation an XYZ represents the null space that line of solutions so our equation says the first row vector of our matrix 1 comma 2 comma 4 is perpendicular to the null space and the second equation says the second row vector is also perpendicular to that same line and same with the third these are all just dot products being equal to 0 and the set of all vectors perpendicular to the null space line is this plane here and this is what we call the row space this is always perpendicular to the null space it contains the three row vectors all three are in that plane and it also contains every linear combination of those row vectors so we have a one-dimensional null space and a 2-dimensional row space which add to 3 and that matches this dimension of the matrix just note that this will always be true but don't forget these equations which represent planes and now we know also dot products with the null space can also be thought of the combination of the column vectors since this is the exact same question we already know there are XYZ solutions to this that sum to the zero vector it's just all the values that made up that null space line from before so there are infinitely many scale factors that make this work and when a set of vectors can combine to the zero vector given scale factors that aren't all zero then those vectors are linearly dependent or you can also say one of these vectors is just a linear combination of the other two same thing when you have a square matrix with linearly dependent vectors it means those vectors don't span the entire space therein they're confined to like a line or in this case a plane all the column vectors are found here and also all of their linear combinations all possible tip-to-tail summations the name we give to that plane that the vectors span is the column space see often you could put any three vector here and find a solution which would mean the vectors are linearly independent but in the dependent case we can't have any solution the output vector has to lie within this plane the column space in order for a solution to exist the column space and the row space which I'll throw in here as well usually look very different but they're always the same dimension both are 2d in this case for non square matrices the row and column space are way different here the column space is just the XY plane these four vectors can only combine to some other X comma Y vector but the row space is the plane spanned by these two vectors in four dimensional space however both those spaces are planes that are themselves two-dimensional so that aspect does match but graphically these are very different now with regards to elimination the obvious reason as to why this is important is because it's used to solve systems of equations when there are many of those equations which can come up in circuits or other physical systems then we might not solve things by hand but we do have to tell computers how to get a solution however there's even more of a picture and story beyond just solving these equations and that has to do with graph theory and networks let's say we have some directed graph with four nodes and five connecting edges and I'll actually label all these edges e1 through five and the nodes and one through four now you can think of this like a circuit where the edges are either resistors or a battery or whatever where current flows and the nodes would all have some specific voltage in fact I'll change the labels to voltages to say consistent with this then the arrows would sort of represent current although we can't know the direction yet until at least here we know if the voltage is positive or negative now we can represent this network with something called an incidence matrix that will have four columns for the four nodes and five rows for the five edges to fill this in just consider the first edge on the graph it's coming out of v1 and going into v2 so we put a negative one under v1 and a positive one under v2 the rest are zero since they aren't connected to e1 e2 is then coming out of v2 and going into v3 so we put a negative one under v2 and a 1 under v3 then zeros for the non connected notes this is all there is to it negative ones for the out of nodes and positive one for the into notes so the rest of the matrix would look like this now when we multiply this matrix by a vector of the voltages it equals every difference between connected nodes or really potential differences that's like the voltage drop across resistor or a battery so now what does the null space of this matrix represent will remember the null space is all the solutions here or the voltages that output all zeros or no potential differences which is like asking which voltages will result in no current well I'm not going to show it but using Gaussian elimination we get this matrix here which again has the same null space all we did was rotate the higher dimensional equations around their intersection and this matrix has three pivots and one free variable this means v4 can be whatever and the rest of the voltages are dependent on what we pick I'll say v4 equals some arbitrary T and since the other equations are just going to lead to V 4 equals V 3 V 3 equals V 2 and V 2 equals V 1 then every variable would have to be T or whatever V 4 was selected this is our null space just a line in four dimensions we can pick something for V 4 like ground or 5 volts or whatever and so long as everything is the same then we have no potential differences or really no current yeah it's pretty obvious if you know your circuits but it gives you an idea of what the null space really means here and with regards to the row space if you were asked whether some vector is a part of it or it can it be made by combinations of the rows then all you gotta do is see if it's perpendicular to the null space and doing a dot product we see that it is since we get out 0 in fact so long as all these numbers add to 0 then it's definitely in the row space for this matrix one thing that did have some more meaning though is the elimination we did to reiterate what we have here is the original incidence matrix on top and the reduced matrix on bottom the original graph looked like this but now I'm going to plot the graph or network associated with the bottom or reduced incidence matrix which would give us this here it's the same graph minus 2 edges but the thing to realize is that it has no loops meaning it's a tree and it turns out this will always be the case every connected graph reduces to a tree and certain rows or edges that create loops like this one that represents this edge eventually reduce to all zeros so we can say cycles lead to dependent rows since they reduced to 0 also the dimension of the row space or 3 in this case means you can have three edges in this graph without any loops but any fourth edge will create one lastly the column space is just what all the columns can combine to or any possible output vector be from a linear combination of these vectors if you go through with the analysis you find the columns combined to any vector so long as B 1 plus B 4 minus B 5 equals 0 and B 1 plus B 2 plus B 3 + B 4 equals 0 this definitely has a physical meaning I'm using the letter B as a filler but really B 1 is just the first row summation so really V 2 minus V 1 B 4 is V 1 minus V 4 and B 5 is V 2 minus V 4 so these values really just represent potential differences between two connected notes and bringing back our original graph in circuit form we find those are the voltage drops in this loop thus the potential differences in this loop sum to zero and this is a fundamental law of circuits known as Kirchhoff's voltage law it emerges from analyzing the column space of the matrix and by the way the other equation corresponds to the larger loop where the voltages must also sum to zero so if you were given a vector and had to determine whether it's in the column space you just need to see whether it obeys kerkoff's voltage law this vector does not cuz this loop fails to sum to zero for example thus it's not in the column space everything we've seen here might not be what you typically learn when it comes to elimination row and column spaces and so on but within linear algebra there's almost always an interesting picture or story going on beyond what your textbook is telling you and if you want to dive deeper into what we've seen here as well as more advanced topics you can check out brilliant org the sponsor of this video to continue with the applications of matrices and linear algebra brilliant actually has several courses to learn from first their linear algebra course covers all the basics of matrices but it even gets to adjacency matrices the use of matrices in graph theory and unique applications like the Google page rank algorithm you can go beyond this though in their differential equation series which covers on damn systems matrix Exponential's and even more advanced applications like laser technology and the associated equations covering this wide range of applications really does help connect all the little pieces of linear algebra from determinants to eigenvectors to diagonalization and so on so you gain a much better understanding of the big picture and as you can see brilliant courses all come with intuitive animations and tons of practice problems so you know you have a solid understanding of whatever topic in math science or engineering you're interested in learning also the first 200 people to go to brilliant org slash text are or click the link below will get 20% off their annual premium subscription and with that I'm gonna end that video there thanks as always my supporters on patreon social media links to follow me or down below and I'll see you guys in the next video
Info
Channel: Zach Star
Views: 582,850
Rating: undefined out of 5
Keywords:
Id: 4csuTO7UTMo
Channel Id: undefined
Length: 16min 26sec (986 seconds)
Published: Thu Mar 05 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.