1 | initial version |

Your vector `ans`

is not in `A.kernel()`

because of how `A.kernel()`

is defined. From its documentation:

```
Returns the left kernel of this matrix, as a vector space or free
module. This is the set of vectors "x" such that "x*self = 0".
Note: For the right kernel, use "right_kernel()". The method
"kernel()" is exactly equal to "left_kernel()".
```

So with `A`

and `ans`

defined as you did:

```
sage: ans in A.kernel()
False
sage: ans in A.right_kernel()
True
```

`A.right_kernel()`

is what you want.

2 | No.2 Revision |

Your vector `ans`

is not in `A.kernel()`

because of how `A.kernel()`

is defined. From its documentation:

```
Returns the left kernel of this matrix, as a vector space or free
module. This is the set of vectors "x" such that "x*self = 0".
Note: For the right kernel, use "right_kernel()". The method
"kernel()" is exactly equal to "left_kernel()".
```

So ~~with ~~since `ans * A`

~~and ~~is not zero, `ans`

~~defined as you did:~~is not in `A.kernel()`

.

```
sage: ans in A.kernel()
False
sage: ans in A.right_kernel()
True
```

`A.right_kernel()`

is what you want.

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.