# Revision history [back]

For constistency, let me use polynomial undeterminates instead of symbols. Does the following solve your problem ?

sage: F = GF(9)
sage: F
Finite Field in z2 of size 3^2
sage: R = PolynomialRing(F,'x',5)
sage: R
Multivariate Polynomial Ring in x0, x1, x2, x3, x4 over Finite Field in z2 of size 3^2
sage: R.inject_variables()
Defining x0, x1, x2, x3, x4
sage: R.gens()
(x0, x1, x2, x3, x4)
sage: M = matrix([list(R.gens())])
sage: M
[x0 x1 x2 x3 x4]
sage: substitution = {R.gens()[i]:F.random_element() for i in range(3)}
sage: substitution
{x2: 2*z2 + 2, x1: 1, x0: 2*z2 + 2}
sage: M.apply_map(lambda x : x.substitute(substitution))
[(-z2 - 1)         1 (-z2 - 1)        x3        x4]


If yes, i can add some comments and explanations on demand. If no, could you please be more precise ?