galois.FieldArray.left_null_space() Self

Computes the left null space of the matrix $$\mathbf{A}$$.

Returns:

The left null space basis matrix. The rows of the basis matrix are the basis vectors that span the left null space. The number of rows of the basis matrix is the dimension of the left null space.

Notes

Given an $$m \times n$$ matrix $$\mathbf{A}$$ over $$\mathrm{GF}(q)$$, the left null space of $$\mathbf{A}$$ is the vector space $$\{\mathbf{x} \in \mathrm{GF}(q)^m\}$$ that annihilates the rows of $$\mathbf{A}$$, i.e. $$\mathbf{x}\mathbf{A} = \mathbf{0}$$.

The left null space has properties $$\mathcal{LN}(\mathbf{A}) = \mathcal{N}(\mathbf{A}^T)$$ and $$\textrm{dim}(\mathcal{R}(\mathbf{A})) + \textrm{dim}(\mathcal{LN}(\mathbf{A})) = m$$.

Examples

The left_null_space() method defines basis vectors (its rows) that span the left null space of $$\mathbf{A}$$.

In [1]: m, n = 5, 3

In [2]: GF = galois.GF(31)

In [3]: A = GF.Random((m, n)); A
Out[3]:
GF([[ 6, 12,  0],
[17,  5,  1],
[13, 12, 27],
[15, 26, 23],
[ 3,  5,  9]], order=31)

In [4]: LN = A.left_null_space(); LN
Out[4]:
GF([[ 1,  0, 29, 20, 10],
[ 0,  1,  2, 22, 10]], order=31)


The left null space is the set of vectors that sum the rows to 0.

In [5]: LN @ A
Out[5]:
GF([[0, 0, 0],
[0, 0, 0]], order=31)


The dimension of the row space and left null space sum to $$m$$.

In [6]: R = A.row_space(); R
Out[6]:
GF([[1, 0, 0],
[0, 1, 0],
[0, 0, 1]], order=31)

In [7]: R.shape[0] + LN.shape[0] == m
Out[7]: True