Let
It is known that is the reduced echelon form of . Find a basis for the kernel .
According to the article "How to solve a system of linear equations?", the kernel of can be written as for some homogeneous solutions 's, where is the number of free variables. Let . Then we have , which is one of the conditions for being a basis of . As long as we can show that is linearly independent, then is a basis of .
By observing the reduced echelon form, we know the indices , , , and correspond to the free variables. By setting one of them as and others as , we get the set of homogeneous solutions
By the way we solve the solutions, we know . Now we may check the linearly independency of . Suppose
By comparing the second entries on the both sides, we know . Similarly, the equation on the third entries gives . The fourth entries give , and the sixth entries give . Therefore, is linearly independent.
Combining all above results, we know is a basis of .
It turns out that by the way we found the homogeneous solutions, there is a "hidden identity matrix" in . (Use the electronic version of this note to see the red part above.) Therefore, The set of homogeneous solutions is always linearly independent by our choice (why?).
This means the dimension of is the number of free variables. This number is called the nullity of , denoted as .
Run the SageMath code below or simply click here. The code generates some random matrices. Use the code to do some practices by yourself, and then check your answer by modifying print_ans
in the code.
This note can be found at Course website > Learning resources.