2
$\begingroup$

I have a list of vectors from a vector space over a finite field of order p for some prime p. For example: I have: {{1,0,1},{0,1,2}} where the vectors are in $\mathbb{F}_3^3$. I want a list of the 9 vectors which are all the linear combinations of my list. For example: from the 2 vectors in the above list I want {{0,0,0},{1,0,1},{2,0,2},{0,2,1},{0,1,2},{1,2,2},{2,1,1},{1,1,0},{2,2,0}}.

$\endgroup$
0

1 Answer 1

2
$\begingroup$

You could take all possible pairs from your field and use them for linear combinations of your two vectors.

pairs = Flatten[Table[Mod[{i, j}, 3], {i, 0, 2}, {j, 0, 2}], 1];
Mod[pairs . {{1, 0, 1}, {0, 1, 2}} , 3]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.