Nullspace or Kernel of A

Consider Transpose[A]. If M is the GJSF of Transpose[A], then M=D.Transpose[A] (D is made up of elementary matrices, remember? Do you remember how we found D? Row reduce the matrix formed by adjoining Transpose[A] and the identity matrix. The resulting matrix will be M adjoined with D. ) Partition D by rows into D=Transpose[D11 D21], where D11 corresponds to the nonzero rows of M and D21 corresponds to the zero rows of M. The columns of Transpose[D21] form the standard basis for the Nullspace of A.

Why does this work? x is in the Nullspace of A if Ax=0 or Transpose[x]Transpose[A]=Transpose[0]. M=DTranspose[A], so anything in the last rows of D (corresponding to the zero rows of M) can be used as Transpose[x]. Since the rows of D come from a nonsingular matrix D (do you know why it is nonsingular?), they are linearly independent.

Look at A from above.


  a={{1,1,1,7},{1,-1,3,11},{2,-1,1,4}};
  MatrixForm[a]


  atI=AppendRows[Transpose[a],IdentityMatrix[4]];
  MatrixForm[atI]

Let's do it.


  GJSFofatI=RowReduce[atI];
  MatrixForm[GJSFofatI]

The last four columns will be D. Partition D by rows into D=Transpose[D11 D21], where D11 corresponds to the nonzero rows of M and D21 corresponds to the zero rows of M. The columns of Transpose[D21] form the standard basis for the Nullspace of A, in this case, the standard basis for the Nullspace of A is {Transpose[1,2,4,-1]}.

Another example:


  b={{1,0,1},{2,1,3},{1,1,2}};
  MatrixForm[b]


  MatrixForm[Transpose[b]]


  btI=AppendRows[Transpose[b],IdentityMatrix[3]];
  MatrixForm[btI]


  GJSFofbtI=RowReduce[btI];
  MatrixForm[GJSFofbtI]

In this example, the column vector Transpose[{1,1,-1}] is a basis for Null[A]. Recall that any scalar multiple of this vector is also in Null[A]: (Remember, Mathematica always takes care of whether or not we need a row or a column vector. Technically we should evaluate c.Transpose[{1,1,-1}], but Mathematica takes care of that detail. Mathematica will give {0,0,0}, but we know it to be Transpose[{0,0,0}] since a 3x3 matrix times a 3x1 matrix yields a 3x1 matrix.


  b.(scalar {1,1,-1})

This is how you would perform these calculations by hand. This also provides you with some knowledge of the theory of subspaces associated with matrices. The basis you calculate will be the standard basis. Mathematica does have a single command to find a basis for Null[A].


  NullSpace[b]

We get a different basis. Do you see why this is essentially the same as what we calculated before?

Up to Bases for These Subspaces