Did I find the right examples for you? yes no      Crawl my project      Python Jobs

# sympy.matrices.Matrix.nullspace

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

```                [ 4,  1, -4,  3,  1],
[-2,  0,  2, -2, -1]])
assert M*M.nullspace() == Matrix(5, 1, *5)

M = Matrix([[ 1,  3, 0,  2,  6, 3, 1],
```
```
# now check the vectors
basis = M.nullspace()
assert basis == Matrix([-3, 1, 0, 0, 0, 0, 0])
assert basis == Matrix([0, 0, 1, 0, 0, 0, 0])
```
```    # issue 1698; just see that we can do it when rows > cols
M = Matrix([[1, 2], [2, 4], [3, 6]])
assert M.nullspace()

```

```                [ 4,  1, -4,  3,  1],
[-2,  0,  2, -2, -1]])
assert M*M.nullspace() == Matrix(5, 1, *5)

M = Matrix([[ 1,  3, 0,  2,  6, 3, 1],
```
```
# now check the vectors
basis = M.nullspace()
assert basis == Matrix([-3, 1, 0, 0, 0, 0, 0])
assert basis == Matrix([0, 0, 1, 0, 0, 0, 0])
```
```    # issue 1698; just see that we can do it when rows > cols
M = Matrix([[1, 2], [2, 4], [3, 6]])
assert M.nullspace()

```

```                          [0, 0, 0, 0, 0, 0, 0]])
# now check the vectors
basis = M.nullspace()
assert basis == Matrix([-3, 1, 0, 0, 0, 0, 0])
assert basis == Matrix([0, 0, 1, 0, 0, 0, 0])
```

```                          [0, 0, 0, 0, 0, 0, 0]])