- galois.FieldArray.row_space() Self
Computes the row space of the matrix \(\mathbf{A}\).
- Returns:¶
The row space basis matrix. The rows of the basis matrix are the basis vectors that span the row space. The number of rows of the basis matrix is the dimension of the row space.
Notes¶
Given an \(m \times n\) matrix \(\mathbf{A}\) over \(\mathrm{GF}(q)\), the row space of \(\mathbf{A}\) is the vector space \(\{\mathbf{x} \in \mathrm{GF}(q)^n\}\) defined by all linear combinations of the rows of \(\mathbf{A}\). The row space has at most dimension \(\textrm{min}(m, n)\).
The row space has properties \(\mathcal{R}(\mathbf{A}) = \mathcal{C}(\mathbf{A}^T)\) and \(\textrm{dim}(\mathcal{R}(\mathbf{A})) + \textrm{dim}(\mathcal{LN}(\mathbf{A})) = m\).
Examples¶
The
row_space()
method defines basis vectors (its rows) that span the row 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([[26, 27, 14], [17, 7, 11], [20, 16, 13], [25, 6, 14], [23, 30, 13]], order=31) In [4]: R = A.row_space(); R Out[4]: GF([[1, 0, 0], [0, 1, 0], [0, 0, 1]], order=31)
The dimension of the row space and left null space sum to \(m\).
In [5]: LN = A.left_null_space(); LN Out[5]: GF([[ 1, 0, 9, 29, 4], [ 0, 1, 9, 14, 18]], order=31) In [6]: R.shape[0] + LN.shape[0] == m Out[6]: True