Why is averaging the vectors required in word2vec? While implementing word2vec using gensim by following few tutorials online, one thing that I couldn't understand is the reason why word vectors are averaged once the model is trained. Few example links below.

https://www.kaggle.com/ananyabioinfo/text-classification-using-word2vec/notebook?scriptVersionId=11358361&amp;cellId=7

https://www.kaggle.com/varun08/sentiment-analysis-using-word2vec?scriptVersionId=2185653&amp;cellId=15


My questions are:

Is it just to create a single vector instead of vectors of the dimension size or to increase the accuracy or is there any reason behind this?
Is it mandatory to take average of the vectors or are there any alternatives to this.

I have gone through the original paper on word2vec but that doesn't give clear explanation on this.
The reason to average the embedded vectors of the words in a paragraph or document is to obtain a single fixed-size vector that represents the whole text. Then, the document-level vector can be used as input to a document classification model or any other document-level model.
If you explicitly want to compute word-level representations and then combine them into a document/paragraph-level representation, then averaging is the standard approach.
On the other hand, to obtain document/paragraph/sentence-level representations in general, there are many alternatives to combining word-level vectors. Some remarkable examples include doc2vec for paragraph/document-level, or LASER or BERT for sentence-level representations.