|
|
|
|
|
Kernal
How to Examples Exercise How to: The kernal of a linear transformation, A*x, is the set of all zeros of the transformation. (That is, the set of all vectors, x = [x1; x2; ... ; xN], such that A*x = 0). To find a kernal, we have to think of our linear transformation as a system of equations that are all set equal to zero. So, we enter our original values of A into MATLAB, and end each row with a '0'. Then we need to find the reduced row-echelon form of our augmented matrix by typing: A = rref(A). If, our rref(A) has a leading one in each column then our matrix is consistent and the only element of our kernal is the zero-vector, 0 = x1 = x2 = ... = xN. (NOTE: the zero-vector is trivially a member of every kernal, also NOTE: even if there are more rows than columns, our matrix cannot be inconsistent, because there is no way that the number in the final column can change to a non-zero value, creating a row with '0 0 ... 0 : 1'). So for every column without a leading one in it, you end up with a row that might look something like this: '1 0 6 0 ... 0 : 0', or if we think of this in terms of an equation we have: 1*x1 + 0*x2 + 6*x3 = 0, or x1 = -6*x3. As you can see, we will NOT be able to represent our kernal in terms of a simple numeric vector. Since x3 can take any scalar value, and x1 (and probably x2) are dependent on x3, our kernal might look something like this: [-6*x3; 2*x3; x3; 0; ...; 0]. Or, simplifying it: x3*[-6; 2; 1; 0; ...; 0]. Here, x3 can take any value, so our kernal is actually the span of [-6; 2; 1; 0; ...; 0]. The more columns without leading one's we have, the more individual vectors there will be to span. Examples: Finding a kernal and understanding where it comes from can be a rather daunting task at first, so let's do an example and take it through step-by-step. Let's start with the matrix R = [1 -2 0 3; 2 -4 4 -14; 3 -6 3 -6]. We want to look at the reduced row-echelon form of the augmented matrix, so we have to add zeros to the last column. Now, R = [1 -2 0 3 0; 2 -4 4 -14 0; 3 -6 3 -6 0] and we can find it's rref: R = rref(R) You'll notice that in the final column, no matter what we do, the zeros are going to remain unchanged. So, if it's easier for you to remember what you are doing, go ahead and add the zeros in, but they are unnecessary. The resulting matrix is: R = [1 -2 0 3 0; 0 0 1 -5 0; 0 0 0 0 0]. Thinking of these as separate equations we have: 1*x1 -2*x2 + 0*x3 + 3*x4 = 0 0*x1 + 0*x2 + 1*x3 -5*x4 = 0 0*x1 + 0*x2 + 0*x3 + 0*x4 = 0 We can simplify these to: x1 = 2*x2 -3*x4 x3 = 5*x4 So, here we are dealilng with two columns that are lacking leading one's. Since our original x vector was [x1; x2; x3; x4], we can replace x1 and x3 with the equations we found above. Now we have: x = [2*x2 -3*x4; x2; 5*x4; x4] Simplifying even further we have: x = [2*x2; x2; 0; 0] + [-3*x4; 0; 5*x4; x4] And simplifying one final time: x = x2*[2; 1; 0; 0] + x4*[-3; 0; 5; 1] Since x2 and x4 can take any scalar value, our kernal is actually the span of these two vectors. We would formally write as our answer: kernal(A) = span([2; 1; 0; 0], [-3; 0; 5; 1]) Exercise: |