If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content
Current time:0:00Total duration:13:59

Dimension of the null space or nullity

Video transcript

let's say I have this matrix B here and I want to know what the null space with the null space of B is and we've done this multiple times but just as a review the null space of B is just it's just all of the X's it's just all of the X's that are our member it's all the vector X's that are a member of what one two three four five that are members of our five where be the my matrix B times any of these vector X's is equal to zero that's the definition of the null space I'm just trying to find the solution set to this equation right here and we've seen before that the null set the null set of the reduced row echelon form of B is equal to is equal to the null set of B so what's the reduced row echelon form of B and this is actually almost trivially easy so if we just let me just take a couple of steps right here if we to get a zero here let's just replace Row 2 with Row 2 minus Row 1 so what do we get Row 2 minus Row 1 Row 1 doesn't change it's just 1 1 2 3 2 and then Row 2 minus Row 1 1 minus 1 is 0 1 minus 1 is 0 3 minus 2 is 1 1 minus 3 is minus 2 4 minus 2 is 2 we're almost there we just let's see so this is a free variable right here this is a pivot variable right here we have a 1 so let me get rid of that guy right there and I can get rid of that guy right there by replacing Row 1 with Row 1 minus 2 times Row 2 so now Row 2 is going to be the same 0 0 1 minus 2 2 and let me replace Row 1 with Row 1 minus 2 times Row 2 so 1 minus 2 times 0 is 1 1 minus 2 times 0 is 1 2 minus 2 times 1 is 0 3 minus 2 times minus 2 so that's 3 plus 4 is 7 right we're two times this is minus four we're subtracting it and then 2 minus 2 times 2 that's 2 minus 4 it's minus 2 so this is the reduced row echelon form of B of B is equal to that right there and then if I wanted to figure out its null space if I want to figure out its null space of x1 x2 x3 x4 and x5 equaling I'm going to have to zeros right here now I can just write this is just a set of system or a system of equations so let me do that I get X 1 I get X 1 I'm going to write my pivot variables in a green color X 1 plus 1 times X 2 so plus X 2 plus 0 times X 3 plus 7 times X 4 plus 7 times X 4 minus 2 times X 5 is equal to that 0 right there and then I get I get my this is X 3 right 0 times X 1 plus 0 times X 2 plus 1 times X 3 so I get X 3 X 3 minus 2 times X 4 minus 2 times X 4 plus 2 times X 5 is equal to that 0 right there and then if we solve for our pivot variables right these are our free variables we can set them equal to anything if we solve for our pivot variables what do we get we get X 1 is equal to I mean I should do that in green the color coding helps I get X 1 is equal to minus X 2 minus 7 X 4 plus 2 X 5 just subtracted these from both sides of the equation and I get X 3 is equal to we've done this multiple times 2 X 4 minus 2 X 5 and so if I wanted to write the solution set kind of in vector form I could write my solution set is my solution set or my null space really is or all the possible X's X 1 X 2 X 3 X 4 X 5 this this is my vector X that's in an R 5 it is equal to a linear combination of these so let me write it out it's equal to the free variables are X 2 times some vector X 2 times some vector right there plus X what is X 3 no X 3 is not a free variable plus X 4 that's my next free variable times some vector plus X 5 times some vector run out of space plus X 5 times some vector and what are those vectors well let's see let me let me actually I don't want to make this too dirty so let me see if I can maybe move nope that's not what I wanted to do let me just rewrite this sometimes I haven't mastered this pen tool yet so let me rewrite this here so X 3 is equal to 2 X 4 minus 2 X 5 let me delete this right over here so just so I get some extra space you just cross that out think that's good enough so I can go back to what I was doing before X 5 times some vector right here and now what are those vectors we just have to look at these formulas X 1 is equal to minus 1 times X 2 so minus 1 times X 2 minus 7 times X 4 minus 7 times X 4 plus 2 times X 5 fair enough and what is X 3 equal 2 X 3 is equal to 2 X 4 is equal to 2 X 4 2 X 4 right it didn't it had nothing to do with X 2 right here so it's equal to 2 X 4 minus 2 X 5 minus 2 X 5 and then what is n is 0 times X 2 right because it had no X 2 term right here and then what did what is X 2 equal to well X 2 is just equal to 1 times X 2 and so all of these terms are 0 right there and I want you to pay attention to that let me I'll write it right here x2 is a free variable so it's just equal to itself right one and you're at a zero and a zero x4 is a free variable and this is the important point of this exercise so it's just equal to 1 times itself and doesn't have to you don't have to throw in any of the other free variables and x5 is a free variable so just equals 1 times itself and none of the other free variables so right here we now say that all of the solutions of our of our equation BX equal to 0 or the reduced row echelon form of B times X is equal to 0 we'll take this form where there are linear combinations of these vectors let's call this v1 v2 and v3 these are just random numbers of random real numbers I can pick any combination here and to create this solution set or to create our null space so our in the null space of a which is equal to the null space of a which is of course equal to the null space of the reduced row echelon form of a is equal to this although possible linear combinations of these three vectors is equal to the span of my vector v1 v2 and v3 just like that now the whole reason I went through this exercise because we've done this multiple times already is to think about whether these guys form a linear independent set so my question is are these guys linearly linearly independent and the reason why I care is because they are linearly independent then they form a basis for the null space right that we know that they span the null space but if they're linearly independent then they that's the two constraints for a basis you have to span the the subspace and you have to be linearly independent so let's just inspect these guys right here this v1 he has a 1 right here he has a 1 in the second term because he corresponds to x2 to the free variable x2 which is the second entry so we just throw one here and we have a zero everywhere else and all of the other vectors in our in our spanning set and that's because for the other free variables we always wanted a multiple time's the 0 right and it's going to be true of any kind of null space problem we do for any free variable if this free variable represents the second entry we're going to have a 1 in the second entry here and then a 0 for the second entry for all of the other vectors associated with the other free variables so can this guy ever be represented as a linear combination of this guy in that guy well there's nothing that I can multiply this 0 by and add to something that I multiplied this zero by to get a 1 here it's just going to get zeroes so this guy can't be represented as a linear combination of these guys likewise this vector right here has a 1 in the fourth position why is it a fourth position because the fourth position corresponds to its corresponding free variable X 4 so you this guy's a 1 here these other guys will definitely always have a 0 here so you can't take any linear combination of them to get this guy so this guy can't be represented in your combination of those guys and last this X 5 guy right here has a 1 here and these guys have zeros here so no linear combination of these zeros can equal this one so all of these guys are linearly independent you can't construct any of these vectors with some combination of the other so they are linearly independent and so this is actually so V 1 the set V 1 V 2 and V 3 is actually a basis is actually a basis for the null space for the null space of oh you know what I have to be very careful for the null space of B I defined just for a variety I defined my initial my initial matrix as matrix B so let me be very careful here the null space of B was equal to the null space of the reduced row echelon form of B it's good to switch things up everywhere now you start thinking that every matrix is named a if you don't and that's equal to the span of these vectors so these vectors and we just said that they're linearly independent we just showed that because there's no way to get that one from these guys that one from these guys with that one from these guys these guys form a basis for the null space of B now this raises an interesting question I in the last video I defined what dimensionality is and maybe you missed it because that kind of proofy and you know it but the dimensionality the dimension of a subspace of a subspace I'll redefine it here is the number of elements number of elements in a basis for the space for the subspace and in the last video I took great pains to show that all bases for any given subspace will have the same number of elements so this is well-defined so my question to you now is what is the dimension of my null space of B what is the dimension of my null space of B well the dimension is just the number of vectors in a basis set for B well this is a basis set for B right there and how many vectors do I have in it I have 1 2 3 vectors so the dimension of the null space of B is 3 or another way to think about it or another name for the dimension of the null space of B is the nullity the nullity of B and that is also equal to 3 and let's think about it you know I went through all of this exercise but what is the nullity of any of any matrix going to be equal to it's the dimension of the null space well then the dimension of the null space you're always going to have as many vectors here as you have free variables as you have free variables so in general the nullity the nullity of any metric of any matrix of let's say matrix a is equal to is equal to the number of I guess you could call it free variable columns or the number of free variables free variables in well I guess we could call it in the reduced row echelon form of a and the way or I guess we could say the number of non-pivot columns I guess it's the best number of non-pivot columns the number of non-pivot columns in the reduced row echelon form of a because that's essentially the number of free variables all of those free variables have associated linearly independent vector with each of them right so the number of free variables isn't is the number of vectors you're going to have in your basis for your null space and the number of free variables is essentially the number of non-pivot columns in your reduced row echelon form right this was a non pivot column that's a non pivot column that's a non pivot column and they're associated with the free variables X 2 X 4 and X 5 so the nullity of a matrix is essentially the number of non-pivot columns in the reduced row echelon form of that matrix anyway hopefully you found that vaguely useful