I read this stackexchange about whether to say "basis of" or "basis for". Does the answer given there (that both are correct, of is newer and for is still more common) apply to mathematics as well?
The two forms are completely interchangeable. English in mathematical publications is "Global English", and often written by non-native speakers who get the traditional grammar wrong, but it doesn't matter because the meaning is carried by the mathematical symbols.
As I expect you know, for and of have directional connotations, with for meaning towards and of meaning away from. However, the association between a vector space and a basis works both ways.
That said, your reference to the basis and the vector space may be written in a directional context, e.g. with one step preceding another in your exposition. One form may sound more natural than the other.
Or you may have a personal preference based on how you see a basis being used in general, e.g. you find a basis because you intend to use it for something. However, this varies according to a person's first language, which basically gets us back to Global English and the interchangeability of the two forms.
I think the prepositions are (as they are in English, in natural language):
Basis for / basis of (as stated in your linked answer, both can be correct)
The latter might be what has you confused. When talking about V, you might say B represents a basis. Specifically, it is a basis (of / for) V. So in your example sentence, I would write:
B is a basis for V
But you could equivalently say:
a basis representation of vector space V
Whether you use of or for may depend on dialect or style. Just like some use or omit the definite article in the following sentence:
going to (the) hospital
I also looked at the Ngram comparing be a basis of and be a basis for, as that construction with be seems common in science (and less so in natural language). It shows the version with for is more common. The trends seems to be the same when changing to American or British English.