# Matlab: Nullspace of a matrix mod p (i.e. over a finite field)

How can one compute the nullspace (or a basis of the nullspace) of a given matrix modulo a prime number $p$? I am specifically looking for the case $p=2$.

I have been googling heavily to find a solution to this question, but was unable to find anything.

edit: For example, Mathematica provides the command NullSpace[A, Modulus -> 5] which gives the basis vectors for the nullspace of A mod 5. And I was wondering whether there was a similar command in Matlab

• Are you looking for information about how to calculate this, or about how to do it in Matlab? If the latter, the Matlab stackoverflow would be a better place to ask. – dfeuer Sep 10 '13 at 22:12
• Note: unless the matrix is very large, a brute force approach of checking all possible vectors should be fine on a computer. – dfeuer Sep 10 '13 at 22:14