R/rrefmodp.R
rref_p.Rd
rref_p() calculates the unique reduced-row echelon form of a matrix with entries in the finite field \(F_p\).
rref_p()
rref_p(A, p)
A matrix
A prime integer
A matrix of the same size as A which is the unique reduced-row echelon form of A.
A
B <- matrix(c(3, 4, 1, 3, 2, 0), 2, 3) rref_p(B, 5) #> [,1] [,2] [,3] #> [1,] 1 2 0 #> [2,] 0 0 1 C <- matrix(c(0, 2, 0, 0, 0, 2, 0, 1, 1), 3, 3) rref_p(C, 3) #> [,1] [,2] [,3] #> [1,] 1 0 2 #> [2,] 0 1 2 #> [3,] 0 0 0