The null space of an m x n matrix A, denoted as null A, is the set of all solutions for the homogeneous equation Ax = 0.
Calculating the null space of a matrix helps us in identifying all the potential values of x that help solve the equation Ax = 0.
In order to calculate the null space of a given matrix, we would be using the built-in nullspace function available within the sympy package.
In order to understand how the null space of a given matrix can be calculated, let us consider the following example:
- Initialize the matrix:
M = Matrix([[1, 2, 3, 0, 0], [4, 10, 0, 0, 1]])
- Calculate the null space of the matrix by using the nullspace function:
M.nullspace()
- The output of the preceding code is:
[Matrix([[-15],[ 6],[ 1],[ 0],[ 0]]), Matrix([[0],[0],[0],[1],[0]]), Matrix([[ 1],[-1/2],[ 0],[ 0],[ 1]])]
In order to...