galois.FieldArray.column_space() Self

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

Returns:

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

Given an $$m \times n$$ matrix $$\mathbf{A}$$ over $$\mathrm{GF}(q)$$, the column space of $$\mathbf{A}$$ is the vector space $$\{\mathbf{x} \in \mathrm{GF}(q)^m\}$$ defined by all linear combinations of the columns of $$\mathbf{A}$$. The column space has at most dimension $$\textrm{min}(m, n)$$.

The column space has properties $$\mathcal{C}(\mathbf{A}) = \mathcal{R}(\mathbf{A}^T)$$ and $$\textrm{dim}(\mathcal{C}(\mathbf{A})) + \textrm{dim}(\mathcal{N}(\mathbf{A})) = n$$.

Examples

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

In : m, n = 3, 5

In : GF = galois.GF(31)

In : A = GF.Random((m, n)); A
Out:
GF([[ 1, 19, 26, 10, 22],
[ 5,  0, 28, 11,  7],
[25, 18, 25, 14, 27]], order=31)

In : C = A.column_space(); C
Out:
GF([[1, 0, 0],
[0, 1, 0],
[0, 0, 1]], order=31)


The dimension of the column space and null space sum to $$n$$.

In : N = A.null_space(); N
Out:
GF([[ 1,  0, 10, 14, 17],
[ 0,  1, 25,  6, 19]], order=31)

In : C.shape + N.shape == n
Out: True